diff --git a/buildfile/src/main/scala/sbt/internal/Eval.scala b/buildfile/src/main/scala/sbt/internal/Eval.scala index 4d15adc76..0a65c79c1 100644 --- a/buildfile/src/main/scala/sbt/internal/Eval.scala +++ b/buildfile/src/main/scala/sbt/internal/Eval.scala @@ -6,6 +6,7 @@ import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.CompilationUnit import dotty.tools.dotc.core.Contexts.{ atPhase, Context } import dotty.tools.dotc.core.{ Flags, NameKinds, Names, Phases, Symbols, Types } +import dotty.tools.dotc.core.Periods.Period import dotty.tools.dotc.Driver import dotty.tools.dotc.Run import dotty.tools.dotc.util.SourceFile @@ -70,6 +71,7 @@ class Eval( case Some((_, ctx)) => ctx case _ => sys.error(s"initialization failed for $options") val compileCtx2 = compileCtx1.fresh + .setPeriod(Period(2, 1)) // RunId 2 is the actually the first one in the compiler .setSetting( compileCtx1.settings.outputDir, outputDir @@ -194,7 +196,12 @@ class Eval( override def extraHash: String = extraHash0 val inter = evalCommon[Seq[String]](definitions.map(_._1), imports, tpeName = Some(""), ev) - EvalDefinitions(inter.loader, inter.generated, inter.enclosingModule, inter.extra.reverse) + EvalDefinitions( + inter.loader, + inter.generated, + inter.enclosingModule, + inter.extra.reverse.distinct + ) end evalDefinitions diff --git a/contributing-docs/05_scripted_tests.md b/contributing-docs/05_scripted_tests.md index a7b65efb1..0a3306e71 100644 --- a/contributing-docs/05_scripted_tests.md +++ b/contributing-docs/05_scripted_tests.md @@ -28,7 +28,7 @@ Create an initial build in `something`. Like a real build using sbt. I'm sure yo ```scala name := "foo" -scalaVersion := "3.7.4" +scalaVersion := "3.8.1" ``` I also have `Hello.scala`: @@ -107,7 +107,7 @@ import scala.sys.process.Process lazy val check = taskKey[Unit]("check") name := "foo" -scalaVersion := "3.7.4" +scalaVersion := "3.8.1" check := { val pkg = (Compile / packageBin).value val conv = fileConverter.value diff --git a/contributing-docs/06_manual_tests.md b/contributing-docs/06_manual_tests.md index aed374f95..0df7223d4 100644 --- a/contributing-docs/06_manual_tests.md +++ b/contributing-docs/06_manual_tests.md @@ -22,7 +22,7 @@ $ sbt --server ### Clearing out boot and local cache -sbt consists of lots of JAR files. When running sbt locally, these JAR artifacts are cached in the `boot` directory under `$HOME/.sbt/boot/scala-3.7.4/org.scala-sbt/sbt/2.0.0-RC8-bin-SNAPSHOT` directory. +sbt consists of lots of JAR files. When running sbt locally, these JAR artifacts are cached in the `boot` directory under `$HOME/.sbt/boot/scala-3.8.1/org.scala-sbt/sbt/2.0.0-RC8-bin-SNAPSHOT` directory (The Scala version and sbt version part changes). In order to see a change you've made to sbt's source code, this cache MUST be cleared. To clear this out, from the sbt shell in your application run: diff --git a/launcher-package/citest/build.sbt b/launcher-package/citest/build.sbt index f623c52dc..571f71996 100644 --- a/launcher-package/citest/build.sbt +++ b/launcher-package/citest/build.sbt @@ -3,7 +3,7 @@ lazy val check2 = taskKey[Unit]("") lazy val root = (project in file(".")) .settings( - scalaVersion := "3.7.3", + scalaVersion := "3.8.1", name := "Hello", libraryDependencies += "com.eed3si9n.verify" %% "verify" % "1.0.0" % Test, testFrameworks += new TestFramework("verify.runner.Framework"), diff --git a/lm-coursier/src/test/scala/lmcoursier/LockFileSpec.scala b/lm-coursier/src/test/scala/lmcoursier/LockFileSpec.scala index b3effa28a..eb35c2f37 100644 --- a/lm-coursier/src/test/scala/lmcoursier/LockFileSpec.scala +++ b/lm-coursier/src/test/scala/lmcoursier/LockFileSpec.scala @@ -38,7 +38,7 @@ class LockFileSpec extends AnyFunSuite { ), metadata = LockFileMetadata( sbtVersion = "2.0.0", - scalaVersion = Some("3.7.4") + scalaVersion = Some("3.8.1") ) ) @@ -59,7 +59,7 @@ class LockFileSpec extends AnyFunSuite { assert(readData.configurations.head.dependencies.head.organization == "org.scala-lang") assert(readData.configurations.head.dependencies.head.version == "2.13.16") assert(readData.metadata.sbtVersion == "2.0.0") - assert(readData.metadata.scalaVersion == Some("3.7.4")) + assert(readData.metadata.scalaVersion == Some("3.8.1")) } } diff --git a/main/src/main/scala/sbt/PluginCross.scala b/main/src/main/scala/sbt/PluginCross.scala index c017e685c..bd0b0e1e7 100644 --- a/main/src/main/scala/sbt/PluginCross.scala +++ b/main/src/main/scala/sbt/PluginCross.scala @@ -102,7 +102,7 @@ private[sbt] object PluginCross { case VersionNumber(Seq(0, 12, _*), _, _) => "2.9.2" case VersionNumber(Seq(0, 13, _*), _, _) => "2.10.7" case VersionNumber(Seq(1, 0, _*), _, _) => "2.12.21" - case VersionNumber(Seq(2, _*), _, _) => "3.7.4" + case VersionNumber(Seq(2, _*), _, _) => "3.8.1" case _ => sys.error(s"Unsupported sbt binary version: $sv") } } diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 5c133d84b..f2a46e52d 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -4,7 +4,7 @@ import Keys.* object Dependencies { // WARNING: Please Scala update versions in PluginCross.scala too val scala213 = "2.13.16" - val scala3 = "3.8.0" + val scala3 = "3.8.1" val scala212 = "2.12.21" val checkPluginCross = settingKey[Unit]("Make sure scalaVersion match up") val baseScalaVersion = scala3 @@ -12,8 +12,8 @@ object Dependencies { sys.env.get("BUILD_VERSION") orElse sys.props.get("sbt.build.version") // sbt modules - val ioVersion = nightlyVersion.getOrElse("2.0.0-M1") - val zincVersion = nightlyVersion.getOrElse("2.0.0-M12") + val ioVersion = nightlyVersion.getOrElse("1.10.5") + val zincVersion = nightlyVersion.getOrElse("2.0.0-M13") private val sbtIO = "org.scala-sbt" %% "io" % ioVersion diff --git a/sbt-app/src/sbt-test/cache/cached-compile/build.sbt b/sbt-app/src/sbt-test/cache/cached-compile/build.sbt index 4097d53bc..187268689 100644 --- a/sbt-app/src/sbt-test/cache/cached-compile/build.sbt +++ b/sbt-app/src/sbt-test/cache/cached-compile/build.sbt @@ -5,7 +5,7 @@ lazy val checkMiss = inputKey[Unit]("") Global / localCacheDirectory := baseDirectory.value / "diskcache" -scalaVersion := "3.7.3" +scalaVersion := "3.8.1" checkMiss := { val expected: Int = (Space ~> NatBasic).parsed val s = streams.value diff --git a/sbt-app/src/sbt-test/cache/cached-test/build.sbt b/sbt-app/src/sbt-test/cache/cached-test/build.sbt index 981eeef7a..292afd055 100644 --- a/sbt-app/src/sbt-test/cache/cached-test/build.sbt +++ b/sbt-app/src/sbt-test/cache/cached-test/build.sbt @@ -5,7 +5,7 @@ lazy val verify = "com.eed3si9n.verify" %% "verify" % "1.0.0" Global / localCacheDirectory := baseDirectory.value / "diskcache" -scalaVersion := "3.7.3" +scalaVersion := "3.8.1" libraryDependencies += verify % Test testFrameworks += new TestFramework("verify.runner.Framework") diff --git a/sbt-app/src/sbt-test/nio/clean-symlinks/build.sbt b/sbt-app/src/sbt-test/nio/clean-symlinks/build.sbt index 019aa7e78..bea44bc5c 100644 --- a/sbt-app/src/sbt-test/nio/clean-symlinks/build.sbt +++ b/sbt-app/src/sbt-test/nio/clean-symlinks/build.sbt @@ -2,7 +2,7 @@ import java.nio.file.Files name := "clean-symlinks-test" -scalaVersion := "3.7.3" +scalaVersion := "3.8.1" TaskKey[Unit]("createSymlinkedDirectory") := { IO.createDirectory(target.value) diff --git a/sbt-app/src/sbt-test/nio/clean-symlinks/test b/sbt-app/src/sbt-test/nio/clean-symlinks/test index 1f5f2141c..2b2632131 100644 --- a/sbt-app/src/sbt-test/nio/clean-symlinks/test +++ b/sbt-app/src/sbt-test/nio/clean-symlinks/test @@ -1,9 +1,9 @@ > createSymlinkedDirectory -$ exists target/out/jvm/scala-3.7.3/clean-symlinks-test/foo/bar +$ exists target/out/jvm/scala-3.8.1/clean-symlinks-test/foo/bar $ exists foo/bar > clean -$ absent target/out/jvm/scala-3.7.3/clean-symlinks-test/foo +$ absent target/out/jvm/scala-3.8.1/clean-symlinks-test/foo $ exists foo/bar diff --git a/sbt-app/src/sbt-test/plugins/auto-plugins-minimal/build.sbt b/sbt-app/src/sbt-test/plugins/auto-plugins-minimal/build.sbt index 36fecfec8..427b3211d 100644 --- a/sbt-app/src/sbt-test/plugins/auto-plugins-minimal/build.sbt +++ b/sbt-app/src/sbt-test/plugins/auto-plugins-minimal/build.sbt @@ -1,4 +1,4 @@ -scalaVersion := "3.7.4" +scalaVersion := "3.8.1" organization := "com.example" diff --git a/sbt-app/src/sbt-test/plugins/pgp/build.sbt b/sbt-app/src/sbt-test/plugins/pgp/build.sbt index cd34a40db..9e6b3a95c 100644 --- a/sbt-app/src/sbt-test/plugins/pgp/build.sbt +++ b/sbt-app/src/sbt-test/plugins/pgp/build.sbt @@ -1 +1 @@ -scalaVersion := "3.7.3" +scalaVersion := "3.8.1" diff --git a/sbt-app/src/sbt-test/plugins/pgp/project/plugins.sbt b/sbt-app/src/sbt-test/plugins/pgp/project/plugins.sbt index ef28616fc..65b64759c 100644 --- a/sbt-app/src/sbt-test/plugins/pgp/project/plugins.sbt +++ b/sbt-app/src/sbt-test/plugins/pgp/project/plugins.sbt @@ -1,2 +1,2 @@ // addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") -libraryDependencies += Defaults.sbtPluginExtra("com.github.sbt" % "sbt-pgp" % "2.3.1", "2", "3.7.3") +libraryDependencies += Defaults.sbtPluginExtra("com.github.sbt" % "sbt-pgp" % "2.3.1", "2", "3.8.1") diff --git a/sbt-app/src/sbt-test/plugins/plugin-cross/build.sbt b/sbt-app/src/sbt-test/plugins/plugin-cross/build.sbt index e85042f75..040e76e0b 100644 --- a/sbt-app/src/sbt-test/plugins/plugin-cross/build.sbt +++ b/sbt-app/src/sbt-test/plugins/plugin-cross/build.sbt @@ -19,4 +19,4 @@ lazy val plugin = (projectMatrix in file("plugin")) case _ => "2.0.0-RC3" }, ) - .jvmPlatform(scalaVersions = Seq("3.7.3", "2.12.21")) + .jvmPlatform(scalaVersions = Seq("3.8.1", "2.12.21")) diff --git a/sbt-app/src/sbt-test/plugins/sbt-native-packager/build.sbt b/sbt-app/src/sbt-test/plugins/sbt-native-packager/build.sbt index a0c3a463d..a2b6508a9 100644 --- a/sbt-app/src/sbt-test/plugins/sbt-native-packager/build.sbt +++ b/sbt-app/src/sbt-test/plugins/sbt-native-packager/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "3.7.4" +ThisBuild / scalaVersion := "3.8.1" name := "hello" enablePlugins(JavaAppPackaging) @@ -6,7 +6,7 @@ enablePlugins(JavaAppPackaging) lazy val check = taskKey[Unit]("") check := { - val cmd = "target/out/jvm/scala-3.7.4/hello/universal/stage/bin/hello" + val cmd = "target/out/jvm/scala-3.8.1/hello/universal/stage/bin/hello" val cmd0 = if (sys.props("os.name").toLowerCase(java.util.Locale.ROOT).contains("windows")) cmd + ".bat" diff --git a/sbt-app/src/sbt-test/plugins/sbt-native-packager/project/plugins.sbt b/sbt-app/src/sbt-test/plugins/sbt-native-packager/project/plugins.sbt index 18b2ee30c..8340a04be 100644 --- a/sbt-app/src/sbt-test/plugins/sbt-native-packager/project/plugins.sbt +++ b/sbt-app/src/sbt-test/plugins/sbt-native-packager/project/plugins.sbt @@ -1,4 +1,4 @@ ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always // addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.20") -libraryDependencies += Defaults.sbtPluginExtra("com.github.sbt" % "sbt-native-packager" % "1.11.4", "2", "3.7.3") +libraryDependencies += Defaults.sbtPluginExtra("com.github.sbt" % "sbt-native-packager" % "1.11.4", "2", "3.8.1") diff --git a/sbt-app/src/sbt-test/project-load/werror/build.sbt b/sbt-app/src/sbt-test/project-load/werror/build.sbt index 84a4df0dd..6ccb968d3 100644 --- a/sbt-app/src/sbt-test/project-load/werror/build.sbt +++ b/sbt-app/src/sbt-test/project-load/werror/build.sbt @@ -1,4 +1,4 @@ -scalaVersion := "3.7.4" +scalaVersion := "3.8.1" @deprecated def foo = true diff --git a/sbt-app/src/sbt-test/project-load/werror/changes/build.sbt b/sbt-app/src/sbt-test/project-load/werror/changes/build.sbt index db42926ed..ab34113fe 100644 --- a/sbt-app/src/sbt-test/project-load/werror/changes/build.sbt +++ b/sbt-app/src/sbt-test/project-load/werror/changes/build.sbt @@ -1,4 +1,4 @@ -scalaVersion := "3.7.4" +scalaVersion := "3.8.1" @deprecated def foo = true diff --git a/sbt-app/src/sbt-test/project-matrix/full/build.sbt b/sbt-app/src/sbt-test/project-matrix/full/build.sbt index 804759a5b..414ee402f 100644 --- a/sbt-app/src/sbt-test/project-matrix/full/build.sbt +++ b/sbt-app/src/sbt-test/project-matrix/full/build.sbt @@ -1,5 +1,5 @@ lazy val scala3_LTS = "3.3.5" -lazy val scala3_current = "3.7.4" +lazy val scala3_current = "3.8.1" lazy val check = taskKey[Unit]("") organization := "com.example" diff --git a/sbt-app/src/sbt-test/project-matrix/full/test b/sbt-app/src/sbt-test/project-matrix/full/test index 687e928db..ac8c99e9d 100644 --- a/sbt-app/src/sbt-test/project-matrix/full/test +++ b/sbt-app/src/sbt-test/project-matrix/full/test @@ -1,4 +1,4 @@ > packageBin $ exists target/**/app_3.3.5-0.1.0-SNAPSHOT.jar -$ exists target/**/app_3.7.4-0.1.0-SNAPSHOT.jar +$ exists target/**/app_3.8.1-0.1.0-SNAPSHOT.jar > core3_7_4/check diff --git a/sbt-app/src/sbt-test/project/nested-macro/build.sbt b/sbt-app/src/sbt-test/project/nested-macro/build.sbt index a74fe9efc..d618b0606 100644 --- a/sbt-app/src/sbt-test/project/nested-macro/build.sbt +++ b/sbt-app/src/sbt-test/project/nested-macro/build.sbt @@ -1,6 +1,6 @@ lazy val a1 = settingKey[Boolean]("") -scalaVersion := "3.7.3" +scalaVersion := "3.8.1" a1 := true Compile / sourceGenerators += { diff --git a/sbt-app/src/sbt-test/project/no-delegate/build.sbt b/sbt-app/src/sbt-test/project/no-delegate/build.sbt index 666b594e7..9e6b3a95c 100644 --- a/sbt-app/src/sbt-test/project/no-delegate/build.sbt +++ b/sbt-app/src/sbt-test/project/no-delegate/build.sbt @@ -1 +1 @@ -scalaVersion := "3.7.4" +scalaVersion := "3.8.1" diff --git a/sbt-app/src/sbt-test/project/remove/build.sbt b/sbt-app/src/sbt-test/project/remove/build.sbt index 06ade12b2..b04b02e5b 100644 --- a/sbt-app/src/sbt-test/project/remove/build.sbt +++ b/sbt-app/src/sbt-test/project/remove/build.sbt @@ -11,7 +11,7 @@ lazy val intsSetting2 = Def.setting { Seq(1, 2, 3) } -scalaVersion := "3.7.3" +scalaVersion := "3.8.1" intsTask := Seq(1, 2, 3, 4, 5, 6, 7) intsTask -= 3 @@ -30,10 +30,10 @@ intsSetting -= intSetting2.value intsSetting --= intsSetting2.value intsFromScalaV := Seq(1, 2, 3, 4, 5, 6, 7) -intsFromScalaV -= { if scalaVersion.value == "3.7.3" then 3 else 5 } -intsFromScalaV --= { if scalaVersion.value == "3.7.3" then Seq(1, 2) else Seq(4) } -intsFromScalaV -= { if scalaVersion.value == "3.7.3" then Option(6) else None } -intsFromScalaV --= { if scalaVersion.value == "3.7.3" then Option(7) else None } +intsFromScalaV -= { if scalaVersion.value == "3.8.1" then 3 else 5 } +intsFromScalaV --= { if scalaVersion.value == "3.8.1" then Seq(1, 2) else Seq(4) } +intsFromScalaV -= { if scalaVersion.value == "3.8.1" then Option(6) else None } +intsFromScalaV --= { if scalaVersion.value == "3.8.1" then Option(7) else None } intsSetSetting := Set(1, 2, 3, 4, 5, 6, 7) intsSetSetting -= 3 diff --git a/sbt-app/src/sbt-test/tests/fork-main-resources/build.sbt b/sbt-app/src/sbt-test/tests/fork-main-resources/build.sbt index 08d15322b..75b852d55 100644 --- a/sbt-app/src/sbt-test/tests/fork-main-resources/build.sbt +++ b/sbt-app/src/sbt-test/tests/fork-main-resources/build.sbt @@ -1,6 +1,6 @@ val scalatest = "org.scalatest" %% "scalatest" % "3.2.19" -scalaVersion := "3.7.3" +scalaVersion := "3.8.1" Test / fork := true libraryDependencies += scalatest % Test diff --git a/sbt-app/src/sbt-test/tests/fork2/build.sbt b/sbt-app/src/sbt-test/tests/fork2/build.sbt index d9c596e82..7239866a8 100644 --- a/sbt-app/src/sbt-test/tests/fork2/build.sbt +++ b/sbt-app/src/sbt-test/tests/fork2/build.sbt @@ -1,5 +1,5 @@ val scalatest = "org.scalatest" %% "scalatest" % "3.2.19" -scalaVersion := "3.7.3" +scalaVersion := "3.8.1" fork := true libraryDependencies += scalatest % Test diff --git a/sbt-app/src/sbt-test/tests/incremental-object-deps/build.sbt b/sbt-app/src/sbt-test/tests/incremental-object-deps/build.sbt index 8338afdf3..40cd3ad76 100644 --- a/sbt-app/src/sbt-test/tests/incremental-object-deps/build.sbt +++ b/sbt-app/src/sbt-test/tests/incremental-object-deps/build.sbt @@ -1,3 +1,3 @@ -scalaVersion := "3.7.3" +scalaVersion := "3.8.1" libraryDependencies += "com.eed3si9n.verify" %% "verify" % "1.0.0" % Test testFrameworks += new TestFramework("verify.runner.Framework") diff --git a/sbt-app/src/sbt-test/tests/t543/build.sbt b/sbt-app/src/sbt-test/tests/t543/build.sbt index 526570c26..02bdf1a0f 100644 --- a/sbt-app/src/sbt-test/tests/t543/build.sbt +++ b/sbt-app/src/sbt-test/tests/t543/build.sbt @@ -6,7 +6,7 @@ val marker = new File("marker") val check = TaskKey[Unit]("check", "Check correct error has been returned.") val scalatest = "org.scalatest" %% "scalatest" % "3.2.19" -ThisBuild / scalaVersion := "3.7.3" +ThisBuild / scalaVersion := "3.8.1" lazy val root = (project in file(".")). settings( diff --git a/server-test/src/server-test/client/build.sbt b/server-test/src/server-test/client/build.sbt index 60d98fc88..5e7448817 100644 --- a/server-test/src/server-test/client/build.sbt +++ b/server-test/src/server-test/client/build.sbt @@ -1,4 +1,4 @@ -scalaVersion := "3.7.3" +scalaVersion := "3.8.1" TaskKey[Unit]("willSucceed") := println("success")