fix: Fixes exportJars false support

**Problem**
Setting exportJars to false causes issues due to hashing of the directories.

**Solution**
Make exportedProducts uncached for now.
This commit is contained in:
Eugene Yokota 2025-08-26 01:03:49 -04:00
parent a8fc24dda6
commit 380af10e8f
4 changed files with 15 additions and 1 deletions

View File

@ -2614,7 +2614,9 @@ object Classpaths {
if isMeta && !force then (mjars ++ sbtCp).distinct
else mjars
},
exportedProducts := ClasspathImpl.trackedExportedProducts(TrackLevel.TrackAlways).value,
exportedProducts := Def.uncached(
ClasspathImpl.trackedExportedProducts(TrackLevel.TrackAlways).value
),
exportedProductsIfMissing := ClasspathImpl
.trackedExportedProducts(TrackLevel.TrackIfMissing)
.value,

View File

@ -0,0 +1,4 @@
package example
@main def main(args: String*): Unit =
println("hi")

View File

@ -0,0 +1,5 @@
Global / localCacheDirectory := baseDirectory.value / "diskcache"
// https://github.com/sbt/sbt/issues/8225
exportJars := false
libraryDependencies += "org.scalameta" %% "munit" % "1.0.0" % Test

View File

@ -0,0 +1,3 @@
> compile
> show Compile/fullClasspath