mirror of https://github.com/sbt/sbt.git
[2.x] fix: Fix pipelining flags applied to unsupported Scala versions (#8499)
Scala 2.x has supported pipelining since 2020. The fix now allows: - All Scala 2.x versions (pipelining supported) - Scala 3.5.0+ (pipelining added in 3.5) Generated-by: AI-assisted
This commit is contained in:
parent
aeabb90d2d
commit
3a9e1ec725
|
|
@ -1016,15 +1016,17 @@ object Defaults extends BuildCommon {
|
|||
},
|
||||
scalacOptions := {
|
||||
val old = scalacOptions.value
|
||||
if (exportPipelining.value)
|
||||
Def.uncached(
|
||||
Vector(
|
||||
"-Ypickle-java",
|
||||
"-Ypickle-write",
|
||||
earlyOutput.value.toString
|
||||
) ++ old
|
||||
if (exportPipelining.value) {
|
||||
val sv = scalaVersion.value
|
||||
val shouldApplyFlags = !ScalaArtifacts.isScala3(sv) || VersionNumber(sv).matchesSemVer(
|
||||
SemanticSelector(">=3.5.0")
|
||||
)
|
||||
else Def.uncached(old)
|
||||
if (shouldApplyFlags)
|
||||
Def.uncached(
|
||||
Vector("-Ypickle-java", "-Ypickle-write", earlyOutput.value.toString) ++ old
|
||||
)
|
||||
else Def.uncached(old)
|
||||
} else Def.uncached(old)
|
||||
},
|
||||
scalacOptions := {
|
||||
val old = scalacOptions.value
|
||||
|
|
|
|||
Loading…
Reference in New Issue