Merge pull request #9286 from eed3si9n/bport/bump-zinc

[2.0.x] Zinc 2.0.0-M19 + Opt bspBuildTargetOutputPathsItem out of caching
This commit is contained in:
eugene yokota 2026-06-01 05:55:28 -04:00 committed by GitHub
commit f934219029
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 36 additions and 4 deletions

View File

@ -331,7 +331,6 @@ object RunnerScriptTest extends verify.BasicTestSuite with ShellScriptUtil:
)
testOutput("sbt --experimental_execution_log=true")("--experimental_execution_log=true", "-v"):
(out: List[String]) =>
assert(out.contains[String]("-Dsbt.experimental_execution_log=true"))
(out: List[String]) => assert(out.contains[String]("-Dsbt.experimental_execution_log=true"))
end RunnerScriptTest

View File

@ -483,6 +483,7 @@ object Keys {
val bspBuildTargetDependencySources = inputKey[Unit]("").withRank(DTask)
val bspBuildTargetDependencySourcesItem = taskKey[DependencySourcesItem]("").withRank(DTask)
val bspBuildTargetOutputPaths = inputKey[Unit]("").withRank(DTask)
@transient
val bspBuildTargetOutputPathsItem = taskKey[OutputPathsItem]("").withRank(DTask)
val bspBuildTargetCompile = inputKey[Unit]("").withRank(DTask)
val bspBuildTargetCompileItem = taskKey[Int]("").withRank(DTask)

View File

@ -13,7 +13,7 @@ object Dependencies {
// sbt modules
val ioVersion = nightlyVersion.getOrElse("1.12.0")
val zincVersion = nightlyVersion.getOrElse("2.0.0-M18")
val zincVersion = nightlyVersion.getOrElse("2.0.0-M19")
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion

View File

@ -41,7 +41,6 @@ lazy val root = (project in file("."))
"junit:junit",
"net.java.dev.jna:jna",
"net.java.dev.jna:jna-platform",
"net.openhft:zero-allocation-hashing",
"org.checkerframework:checker-qual",
"org.fusesource.jansi:jansi",
"org.hamcrest:hamcrest-core",

View File

@ -0,0 +1,30 @@
import sbt.internal.bsp.OutputPathsItem
ThisBuild / scalaVersion := "3.8.2"
name := "bsp-output-paths-cache"
Compile / target := baseDirectory.value / "target-a"
@transient
lazy val checkProjectA = taskKey[Unit]("")
@transient
lazy val checkProjectB = taskKey[Unit]("")
def checkOutputPath(item: OutputPathsItem, expectedSegment: String): Unit = {
val actual = item.outputPaths.map(_.uri.toString).mkString("\n")
if (!actual.contains(expectedSegment)) {
sys.error(
s"stale bspBuildTargetOutputPathsItem: expected segment $expectedSegment in output paths, got: $actual"
)
}
}
checkProjectA := Def.uncached {
checkOutputPath((Compile / bspBuildTargetOutputPathsItem).value, "target-a")
}
checkProjectB := Def.uncached {
checkOutputPath((Compile / bspBuildTargetOutputPathsItem).value, "target-b")
}

View File

@ -0,0 +1,3 @@
> checkProjectA
> set Compile / target := baseDirectory.value / "target-b"
> checkProjectB