sbt/main
BitToby 99471da5f1
[2.x] fix: Fix ProjectMatrix base directory resolution for source dependencies (#8983)
**Problem**

ProjectMatrix.baseSettings computes sourceDirectory and unmanagedBase using base.getAbsoluteFile, which resolves relative paths against the JVM's working directory. This works fine within a single build, but breaks for source dependencies - when an external build loaded via ProjectRef(file("ext/lib"), "lib") uses projectMatrix.in(file(".")), the file(".") resolves to the root project's directory instead of ext/lib/.

As a result, the matrix project picks up wrong sources and compilation fails.

**Solution**
Replace base.getAbsoluteFile with IO.resolve((ThisBuild / baseDirectory).value, base). Since ThisBuild / baseDirectory is set per build unit during loading, this correctly resolves against each build's own root directory.

sourceDirectory and unmanagedBase now derive from the resolved projectMatrixBaseDirectory setting.
2026-03-25 22:41:56 -04:00
..
src [2.x] fix: Fix ProjectMatrix base directory resolution for source dependencies (#8983) 2026-03-25 22:41:56 -04:00
NOTICE Transfer copyright to Scala Center 2023-06-20 16:39:07 +02:00