Skip to content

Commit ff45a2f

Browse files
Reapply "Upgrade Scala 3 to 3.3.8 with -Yfuture-lazy-vals (#920)" (#936) (#1037)
This reverts commit 91c0d75.
1 parent ed5162f commit ff45a2f

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

build.mill

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import mill.api.BuildCtx
2222

2323
import java.util.Base64
2424

25-
val scalaVersions: Seq[String] = Seq("3.3.7", "2.13.18")
25+
val scalaVersions: Seq[String] = Seq("3.3.8", "2.13.18")
2626
val jvmScalaVersions: Seq[String] = scalaVersions ++ Seq("2.12.21")
2727
val stackSize = "100m"
2828
val stackSizekBytes = 100 * 1024
@@ -85,7 +85,10 @@ trait SjsonnetCrossModule extends CrossScalaModule with ScalafmtModule {
8585
) ++ (if (scalaVersion().startsWith("2.13"))
8686
Seq("-Wopt", "-Wconf:origin=scala.collection.compat.*:s")
8787
else Seq("-Xfatal-warnings", "-Ywarn-unused:-nowarn"))
88-
else Seq[String]("-Wconf:origin=scala.collection.compat.*:s", "-Xlint:all")
88+
else Seq[String](
89+
"-Wconf:origin=scala.collection.compat.*:s",
90+
"-Xlint:all"
91+
)
8992
)
9093
def scalaDocOptions =
9194
super.scalaDocOptions().filterNot(o => o == "-Werror" || o == "-Xfatal-warnings")
@@ -375,7 +378,8 @@ object sjsonnet extends VersionFileModule {
375378
def forkArgs =
376379
Seq("-Xss" + stackSize, "--enable-native-access=ALL-UNNAMED")
377380

378-
def scalacOptions = super.scalacOptions() ++ Seq("-release", "17")
381+
def scalacOptions = super.scalacOptions() ++ Seq("-release", "17") ++
382+
(if (JvmWorkerUtil.isScala3(scalaVersion())) Seq("-Yfuture-lazy-vals") else Seq.empty)
379383
def javacOptions = super.javacOptions() ++ Seq("--release", "17")
380384

381385
def mvnDeps = super.mvnDeps() ++ Seq(
@@ -400,7 +404,8 @@ object sjsonnet extends VersionFileModule {
400404
def artifactName = "sjsonnet-server"
401405
def scalaVersion = SjsonnnetJvmModule.this.crossValue
402406
def moduleDeps = Seq(SjsonnnetJvmModule.this, client)
403-
def scalacOptions = super.scalacOptions() ++ Seq("-release", "17", "-deprecation", "-Werror")
407+
def scalacOptions = super.scalacOptions() ++ Seq("-release", "17", "-deprecation", "-Werror") ++
408+
(if (JvmWorkerUtil.isScala3(scalaVersion())) Seq("-Yfuture-lazy-vals") else Seq.empty)
404409
def javacOptions = super.javacOptions() ++ Seq("--release", "17")
405410

406411
override def prependShellScript = mill.util.Jvm.universalScript(

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
val sjsonnetVersion = IO.readLines(new File("sjsonnet/version")).head.trim
22
cancelable in Global := true
33

4-
val options = Seq("-Wconf:origin=scala.collection.compat.*:s", "-Xlint:all", "-release", "17")
4+
val options = Seq("-Wconf:origin=scala.collection.compat.*:s", "-Xlint:all", "-release", "17", "-Yfuture-lazy-vals")
55

66
lazy val commonSettings = Seq(
7-
scalaVersion := "3.3.7",
7+
scalaVersion := "3.3.8",
88
scalacOptions ++= options,
99
javacOptions ++= Seq("--release", "17")
1010
)
@@ -21,7 +21,7 @@ lazy val main = (project in file("sjsonnet"))
2121
libraryDependencies ++= Seq(
2222
"com.lihaoyi" %% "fastparse" % "3.1.1",
2323
"com.lihaoyi" %% "pprint" % "0.9.6",
24-
"com.lihaoyi" %% "ujson" % "4.4.2",
24+
"com.lihaoyi" %% "ujson" % "4.4.3",
2525
"com.lihaoyi" %% "scalatags" % "0.13.1",
2626
"com.lihaoyi" %% "os-lib" % "0.11.8",
2727
"com.lihaoyi" %% "mainargs" % "0.7.8",

0 commit comments

Comments
 (0)