sbt/sbt-app/src
BrianHotopp 0ecc581256 [2.x] fix: Apply dependencyMode filtering to internal project deps (#9250)
Fixes #9009.

dependencyMode := DependencyMode.PlusOne strips every internal
project dependency from the compile classpath, even direct ones --
LibA/compile fails with Not found: CoreClass despite
LibA.dependsOn(Core). Direct mode happens to work today, but only by
accident (filterByDirectDeps matches against allDependencies, which
includes projectDependencies -- the bug surface is one step removed).

Root cause: ClasspathImpl.filterByPlusOne resolves the
direct-dep key set from UpdateReport, which only contains externally
resolved (LM) modules. Internal project refs never appear there, so
resolvedDirectKeys is empty for internal entries; plusOneKeys is
likewise empty; the final filter strips every internal classpath
entry whose moduleIDStr identifies an internal project. Diagnosis on
the issue by eureka0928.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 06:56:33 -04:00
..
main [2.0.x] ci: Scalafmt 3.11.1 (#9280) 2026-05-31 16:30:32 -04:00
repo-override-test [2.x] feat: repositories_force support (#8761) 2026-02-20 01:52:59 -05:00
sbt-test [2.x] fix: Apply dependencyMode filtering to internal project deps (#9250) 2026-06-01 06:56:33 -04:00
test/scala/sbt [2.0.x] ci: Scalafmt 3.11.1 (#9280) 2026-05-31 16:30:32 -04:00