From 1a5e0c97aea15299286ae9a4e992214e80d596f0 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Wed, 15 Oct 2025 19:07:25 +0200 Subject: [PATCH 1/7] Upgrade Scala 2 standard library to 2.13.17 --- community-build/community-projects/stdLib213 | 2 +- project/Build.scala | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/community-build/community-projects/stdLib213 b/community-build/community-projects/stdLib213 index 3f6bdaeafde1..05169c7524a8 160000 --- a/community-build/community-projects/stdLib213 +++ b/community-build/community-projects/stdLib213 @@ -1 +1 @@ -Subproject commit 3f6bdaeafde17d790023cc3f299b81eaaf876ca3 +Subproject commit 05169c7524a8b3fab70bd8e794248edd6106149c diff --git a/project/Build.scala b/project/Build.scala index 6daa13933306..f49d23ae6077 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -161,8 +161,8 @@ object Build { * scala-library. */ def stdlibVersion(implicit mode: Mode): String = mode match { - case NonBootstrapped => "2.13.16" - case Bootstrapped => "2.13.16" + case NonBootstrapped => "2.13.17" + case Bootstrapped => "2.13.17" } /** Version of the scala-library for which we will generate TASTy. @@ -172,7 +172,7 @@ object Build { * We can use nightly versions to tests the future compatibility in development. * Nightly versions: https://scala-ci.typesafe.com/ui/native/scala-integration/org/scala-lang */ - val stdlibBootstrappedVersion = "2.13.16" + val stdlibBootstrappedVersion = "2.13.17" val dottyOrganization = "org.scala-lang" val dottyGithubUrl = "https://github.com/scala/scala3" @@ -2597,7 +2597,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.16" % mtagsVersion % SourceDeps), + libraryDependencies += ("org.scalameta" % "mtags-shared_2.13.17" % mtagsVersion % SourceDeps), ivyConfigurations += SourceDeps.hide, transitiveClassifiers := Seq("sources"), scalacOptions ++= Seq("-source", "3.3"), // To avoid fatal migration warnings From a50982da3c9241178e11ce65e2b23775e1eb96ef Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Wed, 15 Oct 2025 23:11:08 +0200 Subject: [PATCH 2/7] Adjust MiMa filters --- project/Scala2LibraryBootstrappedMiMaFilters.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project/Scala2LibraryBootstrappedMiMaFilters.scala b/project/Scala2LibraryBootstrappedMiMaFilters.scala index dd0a885731b2..dfce5ef3f591 100644 --- a/project/Scala2LibraryBootstrappedMiMaFilters.scala +++ b/project/Scala2LibraryBootstrappedMiMaFilters.scala @@ -138,6 +138,9 @@ object Scala2LibraryBootstrappedMiMaFilters { "scala.collection.mutable.ArrayBuffer.resizeUp", // private[mutable] def // New in 2.13.14 "scala.util.Properties.consoleIsTerminal", // private[scala] lazy val + // New in 2.13.17 + "scala.concurrent.Future.timeoutError", + "scala.concurrent.Future.waitUndefinedError", ).map(ProblemFilters.exclude[DirectMissingMethodProblem]) ++ Seq( // MissingFieldProblem: static field ... in object ... does not have a correspondent in other version "scala.Array.UnapplySeqWrapper", From bf27570ea05136beb8a81ab63f462352a24e1b0e Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Sat, 18 Oct 2025 13:57:10 +0200 Subject: [PATCH 3/7] Exclude LazyList.empty from Objects.allowList (was crashing init-global) --- compiler/src/dotty/tools/dotc/transform/init/Objects.scala | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/transform/init/Objects.scala b/compiler/src/dotty/tools/dotc/transform/init/Objects.scala index 92262d528487..7a637306ab0c 100644 --- a/compiler/src/dotty/tools/dotc/transform/init/Objects.scala +++ b/compiler/src/dotty/tools/dotc/transform/init/Objects.scala @@ -74,10 +74,7 @@ class Objects(using Context @constructorOnly): val MapNode_EmptyMapNode: Symbol = immutableMapNode.requiredValue("EmptyMapNode") val immutableHashMap: Symbol = requiredModule("scala.collection.immutable.HashMap") val HashMap_EmptyMap: Symbol = immutableHashMap.requiredValue("EmptyMap") - val immutableLazyList: Symbol = requiredModule("scala.collection.immutable.LazyList") - val LazyList_empty: Symbol = immutableLazyList.requiredValue("_empty") - - val allowList: Set[Symbol] = Set(SetNode_EmptySetNode, HashSet_EmptySet, Vector_EmptyIterator, MapNode_EmptyMapNode, HashMap_EmptyMap, LazyList_empty) + val allowList: Set[Symbol] = Set(SetNode_EmptySetNode, HashSet_EmptySet, Vector_EmptyIterator, MapNode_EmptyMapNode, HashMap_EmptyMap) // ----------------------------- abstract domain ----------------------------- From ac1b2613687e1b65f8a04ac61486cb537d2d1968 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Sat, 18 Oct 2025 13:57:36 +0200 Subject: [PATCH 4/7] Adjust CompletionKeywordSuite based on introduced scala.annotation.meta.{superArgs, superFwdArg} --- .../pc/tests/completion/CompletionKeywordSuite.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionKeywordSuite.scala b/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionKeywordSuite.scala index 5db0cf96d9ef..7eab6a291a26 100644 --- a/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionKeywordSuite.scala +++ b/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionKeywordSuite.scala @@ -21,6 +21,8 @@ class CompletionKeywordSuite extends BaseCompletionSuite: |""".stripMargin, """|superVisorStrategy: Int (commit: '') |super (commit: '') + |superArg(p: String, v: Any): superArg - scala.annotation.meta (commit: '') + |superFwdArg(p: String, n: String): superFwdArg - scala.annotation.meta (commit: '') |""".stripMargin, includeCommitCharacter = true ) @@ -78,6 +80,8 @@ class CompletionKeywordSuite extends BaseCompletionSuite: |""".stripMargin, """|superVisorStrategy: Int |super + |superArg(p: String, v: Any): superArg - scala.annotation.meta + |superFwdArg(p: String, n: String): superFwdArg - scala.annotation.meta |""".stripMargin ) @@ -98,6 +102,8 @@ class CompletionKeywordSuite extends BaseCompletionSuite: |""".stripMargin, """|superVisorStrategy: Int |super + |superArg(p: String, v: Any): superArg - scala.annotation.meta + |superFwdArg(p: String, n: String): superFwdArg - scala.annotation.meta |""".stripMargin ) @@ -118,6 +124,8 @@ class CompletionKeywordSuite extends BaseCompletionSuite: |""".stripMargin, """|superVisorStrategy: Int |super + |superArg(p: String, v: Any): superArg - scala.annotation.meta + |superFwdArg(p: String, n: String): superFwdArg - scala.annotation.meta |""".stripMargin ) @@ -135,6 +143,8 @@ class CompletionKeywordSuite extends BaseCompletionSuite: |} |""".stripMargin, """|super + |superArg(p: String, v: Any): superArg - scala.annotation.meta + |superFwdArg(p: String, n: String): superFwdArg - scala.annotation.meta |""".stripMargin ) @@ -392,6 +402,8 @@ class CompletionKeywordSuite extends BaseCompletionSuite: """.stripMargin, """|supervisorStrategy: Int |super + |superArg(p: String, v: Any): superArg - scala.annotation.meta + |superFwdArg(p: String, n: String): superFwdArg - scala.annotation.meta |""".stripMargin ) From 66a05a416209d0c06e1762df236287bcaa07034b Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Sat, 18 Oct 2025 14:13:54 +0200 Subject: [PATCH 5/7] Fix sbt-test scripted tests - override scalaJSVersion used in scripted tests to 1.20.1, 1.19.0 would not be published for Scala 2.13.17 --- project/Build.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project/Build.scala b/project/Build.scala index f49d23ae6077..1402dc981a6e 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -3174,7 +3174,9 @@ object Build { "-Dplugin.version=" + version.value, "-Dplugin.scalaVersion=" + dottyVersion, "-Dplugin.scala2Version=" + stdlibVersion(Bootstrapped), - "-Dplugin.scalaJSVersion=" + scalaJSVersion, + // Required for 3.7 because Scala.js scalalib is not published for 2.13.17+1.19.0 + // Normally it should be set to `scalaJSVersion` + "-Dplugin.scalaJSVersion=1.20.1", "-Dsbt.boot.directory=" + ((ThisBuild / baseDirectory).value / ".sbt-scripted").getAbsolutePath // Workaround sbt/sbt#3469 ), // Pass along ivy home and repositories settings to sbt instances run from the tests From 009a8b75fb5d2a5afedfe08f9699b072158f1572 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Sat, 18 Oct 2025 14:18:27 +0200 Subject: [PATCH 6/7] Update community-build scala-collection-compat to 2.14.0 --- community-build/community-projects/scala-collection-compat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-build/community-projects/scala-collection-compat b/community-build/community-projects/scala-collection-compat index c9d3a8b160a3..0171d0722da5 160000 --- a/community-build/community-projects/scala-collection-compat +++ b/community-build/community-projects/scala-collection-compat @@ -1 +1 @@ -Subproject commit c9d3a8b160a35c9915816dd84a1063e18db4a84a +Subproject commit 0171d0722da5a958341b09ac9bdcc75220872639 From 2f304e4f2a0de1dd3dedabbe98ab94a8af5e1bb7 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Sat, 18 Oct 2025 16:18:59 +0200 Subject: [PATCH 7/7] Adjust TASTy MiMa filters --- project/TastyMiMaFilters.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/project/TastyMiMaFilters.scala b/project/TastyMiMaFilters.scala index 85a9b98b7d87..97d77bf559c8 100644 --- a/project/TastyMiMaFilters.scala +++ b/project/TastyMiMaFilters.scala @@ -89,5 +89,8 @@ object TastyMiMaFilters { ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.BuildFromLowPriority1.buildFromSortedSetOps"), // The symbol scala.collection.BuildFromLowPriority1.buildFromSortedSetOps has an incompatible type in current version: before: [CC <: ([X] =>> (scala.collection.SortedSet[X] & scala.collection.SortedSetOps[X, CC, ?])), A0, A](evidence$3: scala.package.Ordering[A])scala.collection.BuildFrom[(CC[A0] & scala.collection.SortedSet[A0]), A, (CC[A] & scala.collection.SortedSet[A])]; after: [CC >: ([X] =>> scala.Nothing) <: ([X] =>> scala.&[scala.collection.SortedSet[X], scala.collection.SortedSetOps[X, CC, ?]]), A0, A](evidence$3: scala.package.Ordering[A])scala.collection.BuildFrom[scala.&[CC[A0], scala.collection.SortedSet[A0]], A, scala.&[CC[A], scala.collection.SortedSet[A]]] ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.BuildFrom.buildFromMapOps"), // The symbol scala.collection.BuildFrom.buildFromMapOps has an incompatible type in current version: before: [CC <: ([X, Y] =>> (scala.collection.Map[X, Y] & scala.collection.MapOps[X, Y, CC, ?])), K0, V0, K, V]scala.collection.BuildFrom[(CC[K0, V0] & scala.collection.Map[K0, V0]), scala.Tuple2[K, V], (CC[K, V] & scala.collection.Map[K, V])]; after: [CC >: ([X, Y] =>> scala.Nothing) <: ([X, Y] =>> scala.&[scala.collection.Map[X, Y], scala.collection.MapOps[X, Y, CC, ?]]), K0, V0, K, V]scala.collection.BuildFrom[scala.&[CC[K0, V0], scala.collection.Map[K0, V0]], scala.Tuple2[K, V], scala.&[CC[K, V], scala.collection.Map[K, V]]] ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.BuildFrom.buildFromSortedMapOps"), // The symbol scala.collection.BuildFrom.buildFromSortedMapOps has an incompatible type in current version: before: [CC <: ([X, Y] =>> (scala.collection.SortedMap[X, Y] & scala.collection.SortedMapOps[X, Y, CC, ?])), K0, V0, K, V](evidence$1: scala.package.Ordering[K])scala.collection.BuildFrom[(CC[K0, V0] & scala.collection.SortedMap[K0, V0]), scala.Tuple2[K, V], (CC[K, V] & scala.collection.SortedMap[K, V])]; after: [CC >: ([X, Y] =>> scala.Nothing) <: ([X, Y] =>> scala.&[scala.collection.SortedMap[X, Y], scala.collection.SortedMapOps[X, Y, CC, ?]]), K0, V0, K, V](evidence$1: scala.package.Ordering[K])scala.collection.BuildFrom[scala.&[CC[K0, V0], scala.collection.SortedMap[K0, V0]], scala.Tuple2[K, V], scala.&[CC[K, V], scala.collection.SortedMap[K, V]]] + + // Scala 2.13.17 + ProblemMatcher.make(ProblemKind.NewAbstractMember, "scala.collection.mutable.ArrayDequeOps.superscala$collection$mutable$ArrayDequeOps$$sliding"), ) }