From e0d9493a9334c55930a3e4866c22377e119d60f2 Mon Sep 17 00:00:00 2001 From: friendseeker <66892505+Friendseeker@users.noreply.github.com> Date: Sat, 12 Oct 2024 00:36:17 -0700 Subject: [PATCH 1/3] Bump CI to JDK 21 --- .github/workflows/ci.yml | 10 +++---- build.sbt | 2 ++ .../sbt/internal/util/ErrorHandling.scala | 13 +++++++-- .../sbt-test/actions/compile-clean/build.sbt | 2 +- .../src/sbt-test/actions/compile-clean/test | 22 +++++++-------- .../build.sbt | 8 +++--- .../cross-strict-aggregation-scala-3/test | 28 +++++++++---------- .../java-serialization/build.sbt | 2 +- .../classloader-cache/resources/build.sbt | 2 +- .../classloader-cache/scalatest/build.sbt | 2 +- .../service-loader/build.sbt | 2 +- .../semantic-errors/build.sbt | 2 +- .../compiler-project/src-dep-plugin/build.sbt | 2 +- .../provided-multi/changes/p.sbt | 2 +- .../stdlib-unfreeze/a3/A.scala | 18 ++++++++---- .../stdlib-unfreeze/build.sbt | 14 +++++----- .../stdlib-unfreeze/test | 10 +++---- .../sbt-test/plugins/doc-scala3-js/build.sbt | 2 +- .../plugins/doc-scala3-js/project/plugins.sbt | 2 +- .../plugins/dotty-sandwich-sjs/build.sbt | 6 ++-- .../dotty-sandwich-sjs/project/plugins.sbt | 2 +- .../sbt-test/plugins/dotty-sandwich/build.sbt | 4 +-- sbt-app/src/sbt-test/plugins/dotty/build.sbt | 2 +- .../sbt-test/plugins/scala-js-macro/build.sbt | 2 +- .../scala-js-macro/project/plugins.sbt | 2 +- .../sbt-test/project-matrix/custom/build.sbt | 2 +- .../sbt-test/project-matrix/java/build.sbt | 2 +- .../jvm-with-project-axes/build.sbt | 2 +- .../project-matrix/jvm-with-project-axes/test | 2 +- .../project-matrix/jvm-with-scoping/build.sbt | 4 +-- .../project-matrix/jvm-with-scoping/test | 4 +-- .../src/sbt-test/project-matrix/jvm/build.sbt | 2 +- sbt-app/src/sbt-test/project-matrix/jvm/test | 2 +- .../project1/scala3-cross-target/build.sbt | 2 +- .../project1/scala3-cross-target/test | 4 +-- .../project1/scala3-sandwich-sjs/build.sbt | 6 ++-- .../scala3-sandwich-sjs/project/plugins.sbt | 2 +- .../project1/scala3-sandwich/build.sbt | 4 +-- sbt-app/src/sbt-test/project1/scripted13/test | 2 +- .../sbt-test/reporter/source-mapper/build.sbt | 2 +- .../implicit-params/build.sbt | 2 +- .../inherited_type_params/build.sbt | 2 +- .../struct-usage/build.sbt | 2 +- .../source-dependencies/struct/build.sbt | 2 +- .../inc/ZincComponentCompilerSpec.scala | 18 ++++-------- 45 files changed, 121 insertions(+), 110 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 936e3ad2c..c6840c03f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,23 +13,23 @@ jobs: matrix: include: - os: ubuntu-20.04 - java: 17 + java: 21 distribution: temurin jobtype: 1 - os: ubuntu-latest - java: 11 + java: 21 distribution: temurin jobtype: 2 - os: ubuntu-latest - java: 11 + java: 21 distribution: temurin jobtype: 3 - os: ubuntu-latest - java: 11 + java: 21 distribution: temurin jobtype: 4 - os: ubuntu-latest - java: 17 + java: 21 distribution: temurin jobtype: 5 - os: ubuntu-latest diff --git a/build.sbt b/build.sbt index e1c2ab681..b8667490b 100644 --- a/build.sbt +++ b/build.sbt @@ -1480,6 +1480,7 @@ lazy val lmCoursier = project Mima.lmCoursierFilters, lmCoursierDependencies, Compile / sourceGenerators += Utils.dataclassGen(lmCoursierDefinitions).taskValue, + Compile / scalacOptions --= Seq("-Xfatal-warnings"), ) .dependsOn( // We depend on lmIvy rather than just lmCore to handle the ModuleDescriptor @@ -1496,6 +1497,7 @@ lazy val lmCoursierShaded = project Mima.lmCoursierFilters, Mima.lmCoursierShadedFilters, Compile / sources := (lmCoursier / Compile / sources).value, + Compile / scalacOptions --= Seq("-Xfatal-warnings"), lmCoursierDependencies, autoScalaLibrary := false, libraryDependencies ++= Seq( diff --git a/internal/util-control/src/main/scala/sbt/internal/util/ErrorHandling.scala b/internal/util-control/src/main/scala/sbt/internal/util/ErrorHandling.scala index 7c147bddd..1c79e5365 100644 --- a/internal/util-control/src/main/scala/sbt/internal/util/ErrorHandling.scala +++ b/internal/util-control/src/main/scala/sbt/internal/util/ErrorHandling.scala @@ -23,9 +23,16 @@ object ErrorHandling { try { Right(f) } catch { - case ex @ (_: Exception | _: StackOverflowError) => Left(ex) - case err @ (_: ThreadDeath | _: VirtualMachineError) => throw err - case x: Throwable => Left(x) + case ex @ (_: Exception | _: StackOverflowError) => + Left(ex) + case err: VirtualMachineError => + throw err + case err if err.getClass.getName == "java.lang.ThreadDeath" => + // ThreadDeath is deprecated + // https://bugs.openjdk.org/browse/JDK-8289610 + throw err + case x: Throwable => + Left(x) } def convert[T](f: => T): Either[Exception, T] = diff --git a/sbt-app/src/sbt-test/actions/compile-clean/build.sbt b/sbt-app/src/sbt-test/actions/compile-clean/build.sbt index eb4421492..8051e6283 100644 --- a/sbt-app/src/sbt-test/actions/compile-clean/build.sbt +++ b/sbt-app/src/sbt-test/actions/compile-clean/build.sbt @@ -2,6 +2,6 @@ import sbt.nio.file.Glob Global / cacheStores := Seq.empty name := "compile-clean" -scalaVersion := "2.12.17" +scalaVersion := "2.12.20" Compile / cleanKeepGlobs += Glob(target.value) / RecursiveGlob / "X.class" diff --git a/sbt-app/src/sbt-test/actions/compile-clean/test b/sbt-app/src/sbt-test/actions/compile-clean/test index 83a5a81db..3802f91ee 100644 --- a/sbt-app/src/sbt-test/actions/compile-clean/test +++ b/sbt-app/src/sbt-test/actions/compile-clean/test @@ -1,17 +1,17 @@ -$ touch target/out/jvm/scala-2.12.17/compile-clean/backend/cant-touch-this +$ touch target/out/jvm/scala-2.12.20/compile-clean/backend/cant-touch-this > Test/compile -$ exists target/out/jvm/scala-2.12.17/compile-clean/backend/A.class -$ exists target/out/jvm/scala-2.12.17/compile-clean/backend/X.class -$ exists target/out/jvm/scala-2.12.17/compile-clean/test-backend/B.class +$ exists target/out/jvm/scala-2.12.20/compile-clean/backend/A.class +$ exists target/out/jvm/scala-2.12.20/compile-clean/backend/X.class +$ exists target/out/jvm/scala-2.12.20/compile-clean/test-backend/B.class > Test/clean -$ exists target/out/jvm/scala-2.12.17/compile-clean/backend/cant-touch-this -$ exists target/out/jvm/scala-2.12.17/compile-clean/backend/A.class -$ exists target/out/jvm/scala-2.12.17/compile-clean/backend/X.class -$ absent target/out/jvm/scala-2.12.17/compile-clean/test-backend/B.class +$ exists target/out/jvm/scala-2.12.20/compile-clean/backend/cant-touch-this +$ exists target/out/jvm/scala-2.12.20/compile-clean/backend/A.class +$ exists target/out/jvm/scala-2.12.20/compile-clean/backend/X.class +$ absent target/out/jvm/scala-2.12.20/compile-clean/test-backend/B.class > Compile/clean -$ exists target/out/jvm/scala-2.12.17/compile-clean/backend/cant-touch-this -$ absent target/out/jvm/scala-2.12.17/compile-clean/backend/A.class -$ exists target/out/jvm/scala-2.12.17/compile-clean/backend/X.class +$ exists target/out/jvm/scala-2.12.20/compile-clean/backend/cant-touch-this +$ absent target/out/jvm/scala-2.12.20/compile-clean/backend/A.class +$ exists target/out/jvm/scala-2.12.20/compile-clean/backend/X.class diff --git a/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/build.sbt b/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/build.sbt index 38a5a26fe..6e5d27874 100644 --- a/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/build.sbt +++ b/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/build.sbt @@ -1,14 +1,14 @@ -scalaVersion := "2.12.19" +scalaVersion := "2.12.20" lazy val core = project .settings( - crossScalaVersions := Seq("2.12.19", "3.0.2", "3.1.2") + crossScalaVersions := Seq("2.12.20", "3.3.1", "3.5.1") ) lazy val subproj = project .dependsOn(core) .settings( - crossScalaVersions := Seq("2.12.19", "3.1.2"), + crossScalaVersions := Seq("2.12.20", "3.5.1"), // a random library compiled against Scala 3.1 - libraryDependencies += "org.http4s" %% "http4s-core" % "0.23.12" + libraryDependencies += "org.http4s" %% "http4s-core" % "0.23.28" ) diff --git a/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/test b/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/test index a2497b474..cb787f032 100644 --- a/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/test +++ b/sbt-app/src/sbt-test/actions/cross-strict-aggregation-scala-3/test @@ -1,19 +1,19 @@ -> ++3.0.2 packageBin +> ++3.3.1 packageBin -$ exists target/out/jvm/scala-3.0.2/core/core_3-0.1.0-SNAPSHOT.jar --$ exists target/out/jvm/scala-3.1.2/core/core_3-0.1.0-SNAPSHOT.jar --$ exists target/out/jvm/scala-3.0.2/subproj/subproj_3-0.1.0-SNAPSHOT.jar --$ exists target/out/jvm/scala-3.1.2/subproj/subproj_3-0.1.0-SNAPSHOT.jar +$ exists target/out/jvm/scala-3.3.1/core/core_3-0.1.0-SNAPSHOT.jar +-$ exists target/out/jvm/scala-3.5.1/core/core_3-0.1.0-SNAPSHOT.jar +-$ exists target/out/jvm/scala-3.3.1/subproj/subproj_3-0.1.0-SNAPSHOT.jar +-$ exists target/out/jvm/scala-3.5.1/subproj/subproj_3-0.1.0-SNAPSHOT.jar > clean --$ exists target/out/jvm/scala-3.0.2/core/core_3-0.1.0-SNAPSHOT.jar --$ exists target/out/jvm/scala-3.1.2/core/core_3-0.1.0-SNAPSHOT.jar --$ exists target/out/jvm/scala-3.0.2/subproj/subproj_3-0.1.0-SNAPSHOT.jar --$ exists target/out/jvm/scala-3.1.2/subproj/subproj_3-0.1.0-SNAPSHOT.jar +-$ exists target/out/jvm/scala-3.3.1/core/core_3-0.1.0-SNAPSHOT.jar +-$ exists target/out/jvm/scala-3.5.1/core/core_3-0.1.0-SNAPSHOT.jar +-$ exists target/out/jvm/scala-3.3.1/subproj/subproj_3-0.1.0-SNAPSHOT.jar +-$ exists target/out/jvm/scala-3.5.1/subproj/subproj_3-0.1.0-SNAPSHOT.jar -> ++3.1.2 packageBin +> ++3.5.1 packageBin --$ exists target/out/jvm/scala-3.0.2/core/core_3-0.1.0-SNAPSHOT.jar -$ exists target/out/jvm/scala-3.1.2/core/core_3-0.1.0-SNAPSHOT.jar --$ exists target/out/jvm/scala-3.0.2/subproj/subproj_3-0.1.0-SNAPSHOT.jar -$ exists target/out/jvm/scala-3.1.2/subproj/subproj_3-0.1.0-SNAPSHOT.jar +-$ exists target/out/jvm/scala-3.3.1/core/core_3-0.1.0-SNAPSHOT.jar +$ exists target/out/jvm/scala-3.5.1/core/core_3-0.1.0-SNAPSHOT.jar +-$ exists target/out/jvm/scala-3.3.1/subproj/subproj_3-0.1.0-SNAPSHOT.jar +$ exists target/out/jvm/scala-3.5.1/subproj/subproj_3-0.1.0-SNAPSHOT.jar diff --git a/sbt-app/src/sbt-test/classloader-cache/java-serialization/build.sbt b/sbt-app/src/sbt-test/classloader-cache/java-serialization/build.sbt index 40d7702ed..c0f0845f5 100644 --- a/sbt-app/src/sbt-test/classloader-cache/java-serialization/build.sbt +++ b/sbt-app/src/sbt-test/classloader-cache/java-serialization/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.20" val dependency = project.settings(exportJars := true) val descendant = project diff --git a/sbt-app/src/sbt-test/classloader-cache/resources/build.sbt b/sbt-app/src/sbt-test/classloader-cache/resources/build.sbt index 6a6d28a65..a5573122e 100644 --- a/sbt-app/src/sbt-test/classloader-cache/resources/build.sbt +++ b/sbt-app/src/sbt-test/classloader-cache/resources/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.20" ThisBuild / turbo := true resolvers += "Local Maven" at (baseDirectory.value / "libraries" / "foo" / "ivy").toURI.toURL.toString diff --git a/sbt-app/src/sbt-test/classloader-cache/scalatest/build.sbt b/sbt-app/src/sbt-test/classloader-cache/scalatest/build.sbt index d918d68fc..9def85551 100644 --- a/sbt-app/src/sbt-test/classloader-cache/scalatest/build.sbt +++ b/sbt-app/src/sbt-test/classloader-cache/scalatest/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.20" val test = (project in file(".")).settings( libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.7" % Test diff --git a/sbt-app/src/sbt-test/classloader-cache/service-loader/build.sbt b/sbt-app/src/sbt-test/classloader-cache/service-loader/build.sbt index 40d7702ed..c0f0845f5 100644 --- a/sbt-app/src/sbt-test/classloader-cache/service-loader/build.sbt +++ b/sbt-app/src/sbt-test/classloader-cache/service-loader/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.20" val dependency = project.settings(exportJars := true) val descendant = project diff --git a/sbt-app/src/sbt-test/compiler-project/semantic-errors/build.sbt b/sbt-app/src/sbt-test/compiler-project/semantic-errors/build.sbt index 913667f36..9633a5cf7 100644 --- a/sbt-app/src/sbt-test/compiler-project/semantic-errors/build.sbt +++ b/sbt-app/src/sbt-test/compiler-project/semantic-errors/build.sbt @@ -1,7 +1,7 @@ TaskKey[Unit]("checkJavaFailures") := { val reporter = savedReporter.value val ignore = (Compile / compile).failure.value - val ps = reporter.problems + val ps = reporter.problems.filter(_.severity() != xsbti.Severity.Info) assert(!ps.isEmpty, "Failed to report any problems!") // First error should be on a specific line/file val first = ps(0) diff --git a/sbt-app/src/sbt-test/compiler-project/src-dep-plugin/build.sbt b/sbt-app/src/sbt-test/compiler-project/src-dep-plugin/build.sbt index fe8b5f5c7..b542a92a9 100644 --- a/sbt-app/src/sbt-test/compiler-project/src-dep-plugin/build.sbt +++ b/sbt-app/src/sbt-test/compiler-project/src-dep-plugin/build.sbt @@ -1,6 +1,6 @@ lazy val use = project .dependsOn(RootProject(file("def")) % Configurations.CompilerPlugin) .settings( - scalaVersion := "2.12.17", + scalaVersion := "2.12.20", autoCompilerPlugins := true ) diff --git a/sbt-app/src/sbt-test/dependency-management/provided-multi/changes/p.sbt b/sbt-app/src/sbt-test/dependency-management/provided-multi/changes/p.sbt index d05f21338..a739411bd 100644 --- a/sbt-app/src/sbt-test/dependency-management/provided-multi/changes/p.sbt +++ b/sbt-app/src/sbt-test/dependency-management/provided-multi/changes/p.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.20" def configIvyScala = scalaModuleInfo ~= (_ map (_ withCheckExplicit false)) diff --git a/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/a3/A.scala b/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/a3/A.scala index e6f35a100..600c11379 100644 --- a/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/a3/A.scala +++ b/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/a3/A.scala @@ -1,16 +1,24 @@ import scala.quoted.* // imports Quotes, Expr -package scala.collection { - object Exp: - // added in 2.13.10, not available in 2.13.8 - def m(i: Int) = IterableOnce.checkArraySizeWithinVMLimit(i) +package scala.collection.immutable { + object Exp { + // Access RedBlackTree.validate and Tree class added in Scala 2.13.13 + // Scala 3.3.4 uses Scala 2.13.14 library + // Scala 3.3.2 uses Scala 2.13.12 library + // Hence RedBlackTree.validate is available in 3.3.4 but not in 3.3.2 + // c.c. https://mvnrepository.com/artifact/org.scala-lang/scala3-library_3/3.3.2 + // c.c. https://mvnrepository.com/artifact/org.scala-lang/scala3-library_3/3.3.4 + def validateTree[A](tree: RedBlackTree.Tree[A, _])(implicit ordering: Ordering[A]): tree.type = { + RedBlackTree.validate(tree) + } + } } object Mac: inline def inspect(inline x: Any): Any = ${ inspectCode('x) } def inspectCode(x: Expr[Any])(using Quotes): Expr[Any] = - scala.collection.Exp.m(42) + scala.collection.immutable.Exp.validateTree(null)(null) println(x.show) x diff --git a/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/build.sbt b/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/build.sbt index 901101cea..ab04ff427 100644 --- a/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/build.sbt +++ b/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/build.sbt @@ -1,26 +1,26 @@ import sbt.librarymanagement.InclExclRule lazy val a = project.settings( - scalaVersion := "2.13.6", + scalaVersion := "2.13.11", libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value, - TaskKey[Unit]("checkLibs") := checkLibs("2.13.6", (Compile/dependencyClasspath).value, ".*scala-(library|reflect).*"), + TaskKey[Unit]("checkLibs") := checkLibs("2.13.11", (Compile/dependencyClasspath).value, ".*scala-(library|reflect).*"), ) lazy val b = project.dependsOn(a).settings( - scalaVersion := "2.13.8", - TaskKey[Unit]("checkLibs") := checkLibs("2.13.8", (Compile/dependencyClasspath).value, ".*scala-(library|reflect).*"), + scalaVersion := "2.13.12", + TaskKey[Unit]("checkLibs") := checkLibs("2.13.12", (Compile/dependencyClasspath).value, ".*scala-(library|reflect).*"), ) lazy val a3 = project.settings( - scalaVersion := "3.2.2", // 2.13.10 library + scalaVersion := "3.3.4", // 2.13.14 library ) lazy val b3 = project.dependsOn(a3).settings( - scalaVersion := "3.2.0", // 2.13.8 library + scalaVersion := "3.3.2", // 2.13.12 library TaskKey[Unit]("checkScala") := { val i = scalaInstance.value i.libraryJars.filter(_.toString.contains("scala-library")).toList match { - case List(l) => assert(l.toString.contains("2.13.10"), i.toString) + case List(l) => assert(l.toString.contains("2.13.14"), i.toString) } assert(i.compilerJars.filter(_.toString.contains("scala-library")).isEmpty, i.toString) assert(i.otherJars.filter(_.toString.contains("scala-library")).isEmpty, i.toString) diff --git a/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/test b/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/test index 8984f6503..dc55696e7 100644 --- a/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/test +++ b/sbt-app/src/sbt-test/dependency-management/stdlib-unfreeze/test @@ -2,17 +2,17 @@ > b/checkLibs > b/runBlock -$ exists s2.13.8.txt -$ delete s2.13.8.txt +$ exists s2.13.12.txt +$ delete s2.13.12.txt # don't crash when expanding the macro > b3/runBlock -$ exists s2.13.10.txt -$ delete s2.13.10.txt +$ exists s2.13.14.txt +$ delete s2.13.14.txt > b3/checkScala -# without the default `csrSameVersions`, scala-reflect in b stays at 2.13.6 +# without the default `csrSameVersions`, scala-reflect in b stays at 2.13.11 > set b/csrSameVersions := Nil > b/update -> b/checkLibs diff --git a/sbt-app/src/sbt-test/plugins/doc-scala3-js/build.sbt b/sbt-app/src/sbt-test/plugins/doc-scala3-js/build.sbt index af0c70797..177518aa8 100644 --- a/sbt-app/src/sbt-test/plugins/doc-scala3-js/build.sbt +++ b/sbt-app/src/sbt-test/plugins/doc-scala3-js/build.sbt @@ -1,4 +1,4 @@ -val scala3Version = "3.0.1-RC1-bin-20210525-8f3fdf5-NIGHTLY" +val scala3Version = "3.3.4" enablePlugins(ScalaJSPlugin) diff --git a/sbt-app/src/sbt-test/plugins/doc-scala3-js/project/plugins.sbt b/sbt-app/src/sbt-test/plugins/doc-scala3-js/project/plugins.sbt index c16aefc53..a42ace5f7 100644 --- a/sbt-app/src/sbt-test/plugins/doc-scala3-js/project/plugins.sbt +++ b/sbt-app/src/sbt-test/plugins/doc-scala3-js/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") \ No newline at end of file +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0") \ No newline at end of file diff --git a/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/build.sbt b/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/build.sbt index 5fd5c06b8..aa25b680e 100644 --- a/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/build.sbt +++ b/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/build.sbt @@ -1,15 +1,15 @@ -ThisBuild / scalaVersion := "2.13.12" +ThisBuild / scalaVersion := "2.13.15" ThisBuild / scalacOptions += "-Ytasty-reader" lazy val scala3code = project .enablePlugins(ScalaJSPlugin) - .settings(scalaVersion := "3.1.3") + .settings(scalaVersion := "3.3.4") lazy val app = project .enablePlugins(ScalaJSPlugin) .dependsOn(scala3code) .settings( libraryDependencies ~= (_.filterNot(_.name.contains("scalajs-compiler"))), - addCompilerPlugin("org.scala-js" % "scalajs-compiler_2.13.8" % scalaJSVersion), + addCompilerPlugin("org.scala-js" % "scalajs-compiler_2.13.15" % scalaJSVersion), scalaJSUseMainModuleInitializer := true, ) diff --git a/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/project/plugins.sbt b/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/project/plugins.sbt index 4c620dc0a..b3f269753 100644 --- a/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/project/plugins.sbt +++ b/sbt-app/src/sbt-test/plugins/dotty-sandwich-sjs/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0") diff --git a/sbt-app/src/sbt-test/plugins/dotty-sandwich/build.sbt b/sbt-app/src/sbt-test/plugins/dotty-sandwich/build.sbt index a8e206007..f3ee7e93e 100644 --- a/sbt-app/src/sbt-test/plugins/dotty-sandwich/build.sbt +++ b/sbt-app/src/sbt-test/plugins/dotty-sandwich/build.sbt @@ -1,7 +1,7 @@ -ThisBuild / scalaVersion := "3.1.3" +ThisBuild / scalaVersion := "3.3.4" ThisBuild / scalacOptions += "-Ytasty-reader" -lazy val scala213 = "2.13.12" +lazy val scala213 = "2.13.15" lazy val root = (project in file(".")) .aggregate(fooApp, fooCore, barApp, barCore) diff --git a/sbt-app/src/sbt-test/plugins/dotty/build.sbt b/sbt-app/src/sbt-test/plugins/dotty/build.sbt index e46913668..48a4f88fe 100644 --- a/sbt-app/src/sbt-test/plugins/dotty/build.sbt +++ b/sbt-app/src/sbt-test/plugins/dotty/build.sbt @@ -1 +1 @@ -ThisBuild / scalaVersion := "3.1.3" +ThisBuild / scalaVersion := "3.3.4" diff --git a/sbt-app/src/sbt-test/plugins/scala-js-macro/build.sbt b/sbt-app/src/sbt-test/plugins/scala-js-macro/build.sbt index ff4eb16f3..1039576e3 100644 --- a/sbt-app/src/sbt-test/plugins/scala-js-macro/build.sbt +++ b/sbt-app/src/sbt-test/plugins/scala-js-macro/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "2.13.1" +ThisBuild / scalaVersion := "2.13.15" lazy val root = (project in file(".")) .aggregate(macroProvider, macroClient) diff --git a/sbt-app/src/sbt-test/plugins/scala-js-macro/project/plugins.sbt b/sbt-app/src/sbt-test/plugins/scala-js-macro/project/plugins.sbt index 8365c11cc..b3f269753 100644 --- a/sbt-app/src/sbt-test/plugins/scala-js-macro/project/plugins.sbt +++ b/sbt-app/src/sbt-test/plugins/scala-js-macro/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0") diff --git a/sbt-app/src/sbt-test/project-matrix/custom/build.sbt b/sbt-app/src/sbt-test/project-matrix/custom/build.sbt index 477bd44ef..50f6c5c64 100644 --- a/sbt-app/src/sbt-test/project-matrix/custom/build.sbt +++ b/sbt-app/src/sbt-test/project-matrix/custom/build.sbt @@ -10,7 +10,7 @@ ivyPaths := { lazy val config12 = ConfigAxis("Config1_2", "config1.2") lazy val config13 = ConfigAxis("Config1_3", "config1.3") -lazy val scala212 = "2.12.10" +lazy val scala212 = "2.12.20" lazy val scala211 = "2.11.12" lazy val core = (projectMatrix in file("core")) diff --git a/sbt-app/src/sbt-test/project-matrix/java/build.sbt b/sbt-app/src/sbt-test/project-matrix/java/build.sbt index be8995d8d..b0a77ef6b 100644 --- a/sbt-app/src/sbt-test/project-matrix/java/build.sbt +++ b/sbt-app/src/sbt-test/project-matrix/java/build.sbt @@ -10,7 +10,7 @@ ivyPaths := { lazy val config12 = ConfigAxis("Config1_2", "-config1.2") lazy val config13 = ConfigAxis("Config1_3", "-config1.3") -lazy val scala212 = "2.12.10" +lazy val scala212 = "2.12.20" lazy val app = (projectMatrix in file("app")) .settings( diff --git a/sbt-app/src/sbt-test/project-matrix/jvm-with-project-axes/build.sbt b/sbt-app/src/sbt-test/project-matrix/jvm-with-project-axes/build.sbt index fc47ace9f..6035c9beb 100644 --- a/sbt-app/src/sbt-test/project-matrix/jvm-with-project-axes/build.sbt +++ b/sbt-app/src/sbt-test/project-matrix/jvm-with-project-axes/build.sbt @@ -8,7 +8,7 @@ ThisBuild / ivyPaths := { } publish / skip := true -lazy val scala212 = "2.12.10" +lazy val scala212 = "2.12.20" lazy val check = taskKey[Unit]("") diff --git a/sbt-app/src/sbt-test/project-matrix/jvm-with-project-axes/test b/sbt-app/src/sbt-test/project-matrix/jvm-with-project-axes/test index 6c9a71daa..1247d3f34 100644 --- a/sbt-app/src/sbt-test/project-matrix/jvm-with-project-axes/test +++ b/sbt-app/src/sbt-test/project-matrix/jvm-with-project-axes/test @@ -1,5 +1,5 @@ > compile -$ exists target/out/jvm/scala-2.12.10/domain/backend/a/DataType.class +$ exists target/out/jvm/scala-2.12.20/domain/backend/a/DataType.class > check diff --git a/sbt-app/src/sbt-test/project-matrix/jvm-with-scoping/build.sbt b/sbt-app/src/sbt-test/project-matrix/jvm-with-scoping/build.sbt index 998141af4..2e9bc919d 100644 --- a/sbt-app/src/sbt-test/project-matrix/jvm-with-scoping/build.sbt +++ b/sbt-app/src/sbt-test/project-matrix/jvm-with-scoping/build.sbt @@ -1,5 +1,5 @@ -lazy val scala213 = "2.13.3" -lazy val scala212 = "2.12.12" +lazy val scala213 = "2.13.15" +lazy val scala212 = "2.12.20" lazy val check = taskKey[Unit]("") lazy val root = (project in file(".")) diff --git a/sbt-app/src/sbt-test/project-matrix/jvm-with-scoping/test b/sbt-app/src/sbt-test/project-matrix/jvm-with-scoping/test index 4e56ffd41..9bf4bef9c 100644 --- a/sbt-app/src/sbt-test/project-matrix/jvm-with-scoping/test +++ b/sbt-app/src/sbt-test/project-matrix/jvm-with-scoping/test @@ -1,6 +1,6 @@ > compile -$ exists target/out/jvm/scala-2.13.3/core/backend/a/Core.class -$ exists target/out/jvm/scala-2.12.12/core/backend/a/Core.class +$ exists target/out/jvm/scala-2.13.15/core/backend/a/Core.class +$ exists target/out/jvm/scala-2.12.20/core/backend/a/Core.class > core2_13/check diff --git a/sbt-app/src/sbt-test/project-matrix/jvm/build.sbt b/sbt-app/src/sbt-test/project-matrix/jvm/build.sbt index 4ca6ea63e..4e1746b0c 100644 --- a/sbt-app/src/sbt-test/project-matrix/jvm/build.sbt +++ b/sbt-app/src/sbt-test/project-matrix/jvm/build.sbt @@ -1,4 +1,4 @@ -lazy val scala213 = "2.13.3" +lazy val scala213 = "2.13.15" lazy val scala3 = "3.4.2" lazy val check = taskKey[Unit]("") diff --git a/sbt-app/src/sbt-test/project-matrix/jvm/test b/sbt-app/src/sbt-test/project-matrix/jvm/test index 40966a833..be733a780 100644 --- a/sbt-app/src/sbt-test/project-matrix/jvm/test +++ b/sbt-app/src/sbt-test/project-matrix/jvm/test @@ -1,6 +1,6 @@ > compile -$ exists target/out/jvm/scala-2.13.3/core/backend/a/Core.class +$ exists target/out/jvm/scala-2.13.15/core/backend/a/Core.class $ exists target/out/jvm/scala-3.4.2/core/backend/a/Core.class > core/check diff --git a/sbt-app/src/sbt-test/project1/scala3-cross-target/build.sbt b/sbt-app/src/sbt-test/project1/scala3-cross-target/build.sbt index d87ccac1b..4550b3c07 100644 --- a/sbt-app/src/sbt-test/project1/scala3-cross-target/build.sbt +++ b/sbt-app/src/sbt-test/project1/scala3-cross-target/build.sbt @@ -1,3 +1,3 @@ -scalaVersion := "3.0.0-RC2-bin-20210328-cca5f8f-NIGHTLY" +scalaVersion := "3.3.4" name := "foo" version := "1.0.0" diff --git a/sbt-app/src/sbt-test/project1/scala3-cross-target/test b/sbt-app/src/sbt-test/project1/scala3-cross-target/test index ff09e0f19..5509f79c2 100644 --- a/sbt-app/src/sbt-test/project1/scala3-cross-target/test +++ b/sbt-app/src/sbt-test/project1/scala3-cross-target/test @@ -1,7 +1,7 @@ > compile -$ exists target/scala-3.0.0-RC2-bin-20210328-cca5f8f-NIGHTLY/classes/Foo$.class +$ exists target/scala-3.3.4/classes/Foo$.class > package -$ exists target/scala-3.0.0-RC2-bin-20210328-cca5f8f-NIGHTLY/foo_3.0.0-RC2-1.0.0.jar +$ exists target/scala-3.3.4/foo_3-1.0.0.jar diff --git a/sbt-app/src/sbt-test/project1/scala3-sandwich-sjs/build.sbt b/sbt-app/src/sbt-test/project1/scala3-sandwich-sjs/build.sbt index 661ac82a1..88ccf3d59 100644 --- a/sbt-app/src/sbt-test/project1/scala3-sandwich-sjs/build.sbt +++ b/sbt-app/src/sbt-test/project1/scala3-sandwich-sjs/build.sbt @@ -1,15 +1,15 @@ -ThisBuild / scalaVersion := "2.13.6" +ThisBuild / scalaVersion := "2.13.15" ThisBuild / scalacOptions += "-Ytasty-reader" lazy val scala3code = project .enablePlugins(ScalaJSPlugin) - .settings(scalaVersion := "3.0.0") + .settings(scalaVersion := "3.3.4") lazy val app = project .enablePlugins(ScalaJSPlugin) .dependsOn(scala3code) .settings( - scalaVersion := "2.13.6", + scalaVersion := "2.13.15", scalacOptions += "-Ytasty-reader", scalaJSUseMainModuleInitializer := true ) diff --git a/sbt-app/src/sbt-test/project1/scala3-sandwich-sjs/project/plugins.sbt b/sbt-app/src/sbt-test/project1/scala3-sandwich-sjs/project/plugins.sbt index 56abd248d..b3f269753 100644 --- a/sbt-app/src/sbt-test/project1/scala3-sandwich-sjs/project/plugins.sbt +++ b/sbt-app/src/sbt-test/project1/scala3-sandwich-sjs/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.6.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0") diff --git a/sbt-app/src/sbt-test/project1/scala3-sandwich/build.sbt b/sbt-app/src/sbt-test/project1/scala3-sandwich/build.sbt index 75988d69d..79f714e28 100644 --- a/sbt-app/src/sbt-test/project1/scala3-sandwich/build.sbt +++ b/sbt-app/src/sbt-test/project1/scala3-sandwich/build.sbt @@ -1,6 +1,6 @@ -ThisBuild / scalaVersion := "3.0.0" +ThisBuild / scalaVersion := "3.3.4" -lazy val scala213 = "2.13.6" +lazy val scala213 = "2.13.15" lazy val root = (project in file(".")) .aggregate(fooApp, fooCore, barApp, barCore) diff --git a/sbt-app/src/sbt-test/project1/scripted13/test b/sbt-app/src/sbt-test/project1/scripted13/test index 1617a03a4..6935c0e54 100644 --- a/sbt-app/src/sbt-test/project1/scripted13/test +++ b/sbt-app/src/sbt-test/project1/scripted13/test @@ -1,6 +1,6 @@ # This tests that this sbt scripted plugin can launch the previous one -> ^^0.13.18 +> ^^1.10.1 $ copy-file changes/A.scala src/sbt-test/a/b/A.scala > scripted diff --git a/sbt-app/src/sbt-test/reporter/source-mapper/build.sbt b/sbt-app/src/sbt-test/reporter/source-mapper/build.sbt index 96ac5d222..59334cbcb 100644 --- a/sbt-app/src/sbt-test/reporter/source-mapper/build.sbt +++ b/sbt-app/src/sbt-test/reporter/source-mapper/build.sbt @@ -7,7 +7,7 @@ lazy val assertAbsolutePathConversion = taskKey[Unit]("checks source mappers con lazy val assertVirtualFile = taskKey[Unit]("checks source mappers handle virtual files") lazy val resetMessages = taskKey[Unit]("empties the messages list") -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.20" lazy val root = (project in file(".")) .settings( diff --git a/sbt-app/src/sbt-test/source-dependencies/implicit-params/build.sbt b/sbt-app/src/sbt-test/source-dependencies/implicit-params/build.sbt index 07fe33830..8b00b0ad7 100644 --- a/sbt-app/src/sbt-test/source-dependencies/implicit-params/build.sbt +++ b/sbt-app/src/sbt-test/source-dependencies/implicit-params/build.sbt @@ -1,2 +1,2 @@ -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.20" diff --git a/sbt-app/src/sbt-test/source-dependencies/inherited_type_params/build.sbt b/sbt-app/src/sbt-test/source-dependencies/inherited_type_params/build.sbt index 232ebc4aa..496af9cce 100644 --- a/sbt-app/src/sbt-test/source-dependencies/inherited_type_params/build.sbt +++ b/sbt-app/src/sbt-test/source-dependencies/inherited_type_params/build.sbt @@ -1,6 +1,6 @@ import sbt.internal.inc.Analysis name := "test" -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.20" TaskKey[Unit]("checkSame") := ((Configurations.Compile / compile) map { case analysis: Analysis => diff --git a/sbt-app/src/sbt-test/source-dependencies/struct-usage/build.sbt b/sbt-app/src/sbt-test/source-dependencies/struct-usage/build.sbt index 07fe33830..8b00b0ad7 100644 --- a/sbt-app/src/sbt-test/source-dependencies/struct-usage/build.sbt +++ b/sbt-app/src/sbt-test/source-dependencies/struct-usage/build.sbt @@ -1,2 +1,2 @@ -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.20" diff --git a/sbt-app/src/sbt-test/source-dependencies/struct/build.sbt b/sbt-app/src/sbt-test/source-dependencies/struct/build.sbt index 07fe33830..8b00b0ad7 100644 --- a/sbt-app/src/sbt-test/source-dependencies/struct/build.sbt +++ b/sbt-app/src/sbt-test/source-dependencies/struct/build.sbt @@ -1,2 +1,2 @@ -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.20" diff --git a/zinc-lm-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala b/zinc-lm-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala index bad241e51..799458167 100644 --- a/zinc-lm-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala +++ b/zinc-lm-integration/src/test/scala/sbt/internal/inc/ZincComponentCompilerSpec.scala @@ -16,11 +16,8 @@ class ZincComponentCompilerSpec extends IvyBridgeProviderSpecification { val scala2106 = "2.10.6" val scala2118 = "2.11.8" val scala21111 = "2.11.11" - val scala2121 = "2.12.1" - val scala2122 = "2.12.2" - val scala2123 = "2.12.3" - val scala2130 = "2.13.0" - val scala2131 = "2.13.1" + val scala21220 = "2.12.20" + val scala21311 = "2.13.11" def isJava8: Boolean = sys.props("java.specification.version") == "1.8" @@ -40,14 +37,11 @@ class ZincComponentCompilerSpec extends IvyBridgeProviderSpecification { } else () } - it should "compile the bridge for Scala 2.12.2" in { implicit td => - IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2121) should exist) - IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2122) should exist) - IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2123) should exist) + it should "compile the bridge for Scala 2.12.20" in { implicit td => + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala21220) should exist) } - it should "compile the bridge for Scala 2.13" in { implicit td => - IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2130) should exist) - IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala2131) should exist) + it should "compile the bridge for Scala 2.13.11" in { implicit td => + IO.withTemporaryDirectory(t => getCompilerBridge(t, logger, scala21311) should exist) } } From a12951a9e5564f7c3cbb02b3a454f0e446cfc681 Mon Sep 17 00:00:00 2001 From: friendseeker <66892505+Friendseeker@users.noreply.github.com> Date: Sat, 19 Oct 2024 21:29:01 -0700 Subject: [PATCH 2/3] Bump JDK version in Developer guide --- DEVELOPING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEVELOPING.md b/DEVELOPING.md index 7c4e315dc..028248e57 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -20,7 +20,7 @@ The `stable` branch represents the current stable sbt release. Only bug fixes ar ### Note on supported JDK version for the SBT build -The SBT build itself currently doesn't support any JDK beyond version 17. You will run into deprecation warnings (which would become build errors due to build configuration) if you use any later JDK version to build SBT. +The SBT build itself currently doesn't support any JDK beyond version 21. You may run into deprecation warnings (which would become build errors due to build configuration) if you use any later JDK version to build SBT. If you're using Metals as IDE, also check the `Java Version` setting. The default at the time of writing this is `17`, but this may change in the future, or you may have set it to a later version yourself. (Be aware that Metals may download a JDK in the background if you haven't switch to a local JDK matching the version before changing this setting. Also, this setting is currently only available as a `User` setting, so you can't set it for a single workspace. Don't forget to switch back if you need to for other projects). From ee59af3d3389ea953fc5795304b4324982238698 Mon Sep 17 00:00:00 2001 From: friendseeker <66892505+Friendseeker@users.noreply.github.com> Date: Sat, 19 Oct 2024 21:51:06 -0700 Subject: [PATCH 3/3] SBT -> sbt --- DEVELOPING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DEVELOPING.md b/DEVELOPING.md index 028248e57..56304ce19 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -18,9 +18,9 @@ The `develop` branch represents sbt 2.x, the next major sbt series. Next minor branch is where new features should be added as long as it is binary compatible with sbt 1.x. The `stable` branch represents the current stable sbt release. Only bug fixes are back-ported to the stable branch. -### Note on supported JDK version for the SBT build +### Note on supported JDK version for the sbt build -The SBT build itself currently doesn't support any JDK beyond version 21. You may run into deprecation warnings (which would become build errors due to build configuration) if you use any later JDK version to build SBT. +The sbt build itself currently doesn't support any JDK beyond version 21. You may run into deprecation warnings (which would become build errors due to build configuration) if you use any later JDK version to build sbt. If you're using Metals as IDE, also check the `Java Version` setting. The default at the time of writing this is `17`, but this may change in the future, or you may have set it to a later version yourself. (Be aware that Metals may download a JDK in the background if you haven't switch to a local JDK matching the version before changing this setting. Also, this setting is currently only available as a `User` setting, so you can't set it for a single workspace. Don't forget to switch back if you need to for other projects).