mirror of https://github.com/sbt/sbt.git
[2.x] fix: Invalidate on JDK version (#9216)
**Problem** sbt 2.x caching doesn't invalidate on JDK version. **Solution** Invalidate on JDK version.
This commit is contained in:
parent
7681cb3980
commit
d27c6a46df
|
|
@ -780,7 +780,8 @@ lazy val mainProj = (project in file("main"))
|
||||||
exclude[DirectMissingMethodProblem]("sbt.Resolvers.uniqueSubdirectoryFor"),
|
exclude[DirectMissingMethodProblem]("sbt.Resolvers.uniqueSubdirectoryFor"),
|
||||||
exclude[DirectMissingMethodProblem]("sbt.Resolvers.run"),
|
exclude[DirectMissingMethodProblem]("sbt.Resolvers.run"),
|
||||||
exclude[MissingClassProblem]("sbt.Resolvers$DistributedVCS"),
|
exclude[MissingClassProblem]("sbt.Resolvers$DistributedVCS"),
|
||||||
exclude[DirectMissingMethodProblem]("sbt.internal.ClassStamper.stampVf")
|
exclude[DirectMissingMethodProblem]("sbt.internal.ClassStamper.stampVf"),
|
||||||
|
exclude[DirectMissingMethodProblem]("sbt.internal.CompileInputs2.*"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.dependsOn(lmCore, lmCoursierShadedPublishing)
|
.dependsOn(lmCore, lmCoursierShadedPublishing)
|
||||||
|
|
|
||||||
|
|
@ -2387,13 +2387,15 @@ object Defaults extends BuildCommon with DefExtra {
|
||||||
val cp0 = classpathTask.value
|
val cp0 = classpathTask.value
|
||||||
val inputs = compileInputs.value
|
val inputs = compileInputs.value
|
||||||
val c = fileConverter.value
|
val c = fileConverter.value
|
||||||
|
val incrementalOptions = extraIncOptions.value.toVector
|
||||||
CompileInputs2(
|
CompileInputs2(
|
||||||
data(cp0).toVector,
|
data(cp0).toVector,
|
||||||
sourcesVF.value,
|
sourcesVF.value,
|
||||||
scalacOptions.value.toVector,
|
scalacOptions.value.toVector,
|
||||||
javacOptions.value.toVector,
|
javacOptions.value.toVector,
|
||||||
c.toVirtualFile(inputs.options.classesDirectory),
|
c.toVirtualFile(inputs.options.classesDirectory),
|
||||||
c.toVirtualFile(inputs.setup.cacheFile.toPath)
|
c.toVirtualFile(inputs.setup.cacheFile.toPath),
|
||||||
|
incrementalOptions,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
bspCompileTask :=
|
bspCompileTask :=
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@ case class CompileInputs2(
|
||||||
scalacOptions: Vector[String],
|
scalacOptions: Vector[String],
|
||||||
javacOptions: Vector[String],
|
javacOptions: Vector[String],
|
||||||
outputPath: VirtualFileRef,
|
outputPath: VirtualFileRef,
|
||||||
cachePath: VirtualFileRef
|
cachePath: VirtualFileRef,
|
||||||
|
incrementalOptions: Vector[(String, String)],
|
||||||
)
|
)
|
||||||
|
|
||||||
object CompileInputs2:
|
object CompileInputs2:
|
||||||
|
|
@ -20,7 +21,7 @@ object CompileInputs2:
|
||||||
given IsoLList.Aux[
|
given IsoLList.Aux[
|
||||||
CompileInputs2,
|
CompileInputs2,
|
||||||
Vector[HashedVirtualFileRef] :*: Vector[HashedVirtualFileRef] :*: Vector[String] :*:
|
Vector[HashedVirtualFileRef] :*: Vector[HashedVirtualFileRef] :*: Vector[String] :*:
|
||||||
Vector[String] :*: VirtualFileRef :*: VirtualFileRef :*: LNil
|
Vector[String] :*: VirtualFileRef :*: VirtualFileRef :*: Vector[(String, String)] :*: LNil
|
||||||
] =
|
] =
|
||||||
LList.iso(
|
LList.iso(
|
||||||
{ (v: CompileInputs2) =>
|
{ (v: CompileInputs2) =>
|
||||||
|
|
@ -30,18 +31,21 @@ object CompileInputs2:
|
||||||
("javacOptions", v.javacOptions) :*:
|
("javacOptions", v.javacOptions) :*:
|
||||||
("outputPath", v.outputPath) :*:
|
("outputPath", v.outputPath) :*:
|
||||||
("cachePath", v.cachePath) :*:
|
("cachePath", v.cachePath) :*:
|
||||||
|
("incrementalOptions", v.incrementalOptions) :*:
|
||||||
LNil
|
LNil
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
(in: Vector[HashedVirtualFileRef] :*: Vector[HashedVirtualFileRef] :*: Vector[String] :*:
|
(in: Vector[HashedVirtualFileRef] :*: Vector[HashedVirtualFileRef] :*: Vector[String] :*:
|
||||||
Vector[String] :*: VirtualFileRef :*: VirtualFileRef :*: LNil) =>
|
Vector[String] :*: VirtualFileRef :*: VirtualFileRef :*: Vector[(String, String)] :*:
|
||||||
|
LNil) =>
|
||||||
CompileInputs2(
|
CompileInputs2(
|
||||||
in.head,
|
in.head,
|
||||||
in.tail.head,
|
in.tail.head,
|
||||||
in.tail.tail.head,
|
in.tail.tail.head,
|
||||||
in.tail.tail.tail.head,
|
in.tail.tail.tail.head,
|
||||||
in.tail.tail.tail.tail.head,
|
in.tail.tail.tail.tail.head,
|
||||||
in.tail.tail.tail.tail.tail.head
|
in.tail.tail.tail.tail.tail.head,
|
||||||
|
in.tail.tail.tail.tail.tail.tail.head,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue