diff --git a/community-build/community-projects/stdLib213 b/community-build/community-projects/stdLib213 index 6243e902928c..fcc67cd56c67 160000 --- a/community-build/community-projects/stdLib213 +++ b/community-build/community-projects/stdLib213 @@ -1 +1 @@ -Subproject commit 6243e902928c344fb0e82e21120bb257f08a2af2 +Subproject commit fcc67cd56c67851bf31019ec25ccb09d08b9561b diff --git a/project/Build.scala b/project/Build.scala index b4e9989a2e9c..c65c5bc06fab 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -124,8 +124,8 @@ object Build { * scala-library. */ def stdlibVersion(implicit mode: Mode): String = mode match { - case NonBootstrapped => "2.13.12" - case Bootstrapped => "2.13.12" + case NonBootstrapped => "2.13.14" + case Bootstrapped => "2.13.14" } val dottyOrganization = "org.scala-lang" @@ -1002,7 +1002,21 @@ object Build { IO.createDirectory(trgDir) IO.unzip(scalaLibrarySourcesJar, trgDir) - ((trgDir ** "*.scala") +++ (trgDir ** "*.java")).get.toSet + val (ignoredSources, sources) = + ((trgDir ** "*.scala") +++ (trgDir ** "*.java")).get.toSet + .partition{file => + // sources from https://github.com/scala/scala/tree/2.13.x/src/library-aux + val path = file.getPath.replace('\\', '/') + path.endsWith("scala-library-src/scala/Any.scala") || + path.endsWith("scala-library-src/scala/AnyVal.scala") || + path.endsWith("scala-library-src/scala/AnyRef.scala") || + path.endsWith("scala-library-src/scala/Nothing.scala") || + path.endsWith("scala-library-src/scala/Null.scala") || + path.endsWith("scala-library-src/scala/Singleton.scala") + } + // These sources should be never compiled, filtering them out was not working correctly sometimes + ignoredSources.foreach(_.delete()) + sources } (Set(scalaLibrarySourcesJar)).toSeq }.taskValue, (Compile / sourceGenerators) += Def.task { @@ -1141,7 +1155,7 @@ object Build { .exclude("org.eclipse.lsp4j","org.eclipse.lsp4j.jsonrpc"), "org.eclipse.lsp4j" % "org.eclipse.lsp4j" % "0.20.1", ), - libraryDependencies += ("org.scalameta" % "mtags-shared_2.13.12" % mtagsVersion % SourceDeps), + libraryDependencies += ("org.scalameta" % "mtags-shared_2.13.14" % mtagsVersion % SourceDeps), ivyConfigurations += SourceDeps.hide, transitiveClassifiers := Seq("sources"), Compile / scalacOptions ++= Seq("-Yexplicit-nulls", "-Ysafe-init"), @@ -1694,6 +1708,8 @@ object Build { "-Dplugin.version=" + version.value, "-Dplugin.scalaVersion=" + dottyVersion, "-Dplugin.scala2Version=" + stdlibVersion(Bootstrapped), + // The last version of Scala 2 that's cross-published for Scala.js 1.12 (version used by LTS) + "-Dplugin.scala2ForJSVersion=2.13.13", "-Dplugin.scalaJSVersion=" + scalaJSVersion, "-Dsbt.boot.directory=" + ((ThisBuild / baseDirectory).value / ".sbt-scripted").getAbsolutePath // Workaround sbt/sbt#3469 ), diff --git a/project/MiMaFilters.scala b/project/MiMaFilters.scala index 03b8e93639bc..112a5601615c 100644 --- a/project/MiMaFilters.scala +++ b/project/MiMaFilters.scala @@ -14,10 +14,6 @@ object MiMaFilters { ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language#experimental.relaxedExtensionImports"), ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$experimental$relaxedExtensionImports$"), // end of New experimental features in 3.3.X - - // New in 2.13.12 -- can be removed once scala/scala#10549 lands in 2.13.13 - // and we take the upgrade here - ProblemFilters.exclude[DirectMissingMethodProblem]("scala.collection.immutable.MapNodeRemoveAllSetNodeIterator.next"), ) val TastyCore: Seq[ProblemFilter] = Seq( ) diff --git a/sbt-test/scala2-compat/erasure-scalajs/build.sbt b/sbt-test/scala2-compat/erasure-scalajs/build.sbt index 342c32fc4cdc..5414046d0919 100644 --- a/sbt-test/scala2-compat/erasure-scalajs/build.sbt +++ b/sbt-test/scala2-compat/erasure-scalajs/build.sbt @@ -1,7 +1,7 @@ lazy val scala2Lib = project.in(file("scala2Lib")) .enablePlugins(ScalaJSPlugin) .settings( - scalaVersion := sys.props("plugin.scala2Version") + scalaVersion := sys.props("plugin.scala2ForJSVersion") ) lazy val dottyApp = project.in(file("dottyApp"))