Skip to content

Commit 8a2ff1b

Browse files
authored
bugfix: Don't apply Next flags on 3.3 LTS (#629)
1 parent 876fdd9 commit 8a2ff1b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

coordinator/configs/projects-config.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ gchudnov_swearwolf.sbt.commands = ["disableFatalWarnings"]
713713
geirolz_fly4s{
714714
tests = compile-only // flaky
715715
sbt.commands = [
716-
"mapScalacOptions -Xkind-projector,-deprecation -Ykind-projector"
716+
"mapScalacOptions -Xkind-projector,-deprecation -Ykind-projector 3.3"
717717
]
718718
}
719719
geirolz_advxml{
@@ -726,7 +726,7 @@ geirolz_advxml{
726726
}
727727
geirolz_secret {
728728
sbt.commands = [
729-
"mapScalacOptions -Xkind-projector"
729+
"mapScalacOptions -Xkind-projector 3.3"
730730
]
731731
}
732732
geirolz_toolkit {

project-builder/sbt/CommunityBuildPlugin.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ object CommunityBuildPlugin extends AutoPlugin {
205205
(args, extracted) => (scope: Scope, currentScalacOptions: Seq[String]) =>
206206
val scalaVersion = extracted.get(scope / Keys.scalaVersion)
207207
val safeArgs = args.map(Scala3CommunityBuild.Utils.splitScalacOptionArgs)
208+
val ignoredVersions = safeArgs.lift(2).getOrElse(Nil)
209+
val shouldIgnore = ignoredVersions.exists(scalaVersion.startsWith)
208210
val append = safeArgs.lift(0).getOrElse(Nil)
209211
lazy val (appendScala3Exclusive, appendScala3Inclusive) =
210212
append.partition { opt =>
@@ -213,7 +215,8 @@ object CommunityBuildPlugin extends AutoPlugin {
213215
// Make sure to not modify Scala 2 project scalacOptions
214216
// these can compiled as transitive dependency of custom startup task
215217
val filteredAppend =
216-
if (scalaVersion.startsWith("3.")) append
218+
if (shouldIgnore) Nil
219+
else if (scalaVersion.startsWith("3.")) append
217220
else {
218221
appendScala3Exclusive.foreach { setting =>
219222
logOnce(
@@ -225,7 +228,8 @@ object CommunityBuildPlugin extends AutoPlugin {
225228

226229
val remove = safeArgs.lift(1).getOrElse(Nil)
227230
val filteredRemove =
228-
if (scalaVersion.startsWith("3.")) remove
231+
if (shouldIgnore) Nil
232+
else if (scalaVersion.startsWith("3.")) remove
229233
else remove ++ appendScala3Exclusive
230234

231235
Scala3CommunityBuild.Utils.mapScalacOptions(

0 commit comments

Comments
 (0)