Skip to content

Commit 0e60d36

Browse files
Upgrade Scala 2 to 2.13.14 (was 2.13.12) (#20902)
2 parents b481932 + 2a142cd commit 0e60d36

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

Diff for: community-build/community-projects/stdLib213

Submodule stdLib213 updated 1814 files

Diff for: project/Build.scala

+19-15
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ object Build {
144144
* scala-library.
145145
*/
146146
def stdlibVersion(implicit mode: Mode): String = mode match {
147-
case NonBootstrapped => "2.13.12"
148-
case Bootstrapped => "2.13.12"
147+
case NonBootstrapped => "2.13.14"
148+
case Bootstrapped => "2.13.14"
149149
}
150150

151151
/** Version of the scala-library for which we will generate TASTy.
@@ -155,7 +155,7 @@ object Build {
155155
* We can use nightly versions to tests the future compatibility in development.
156156
* Nightly versions: https://scala-ci.typesafe.com/ui/native/scala-integration/org/scala-lang
157157
*/
158-
val stdlibBootstrappedVersion = "2.13.12"
158+
val stdlibBootstrappedVersion = "2.13.14"
159159

160160
val dottyOrganization = "org.scala-lang"
161161
val dottyGithubUrl = "https://github.com/scala/scala3"
@@ -1126,19 +1126,23 @@ object Build {
11261126
IO.createDirectory(trgDir)
11271127
IO.unzip(scalaLibrarySourcesJar, trgDir)
11281128

1129-
((trgDir ** "*.scala") +++ (trgDir ** "*.java")).get.toSet
1129+
val (ignoredSources, sources) =
1130+
((trgDir ** "*.scala") +++ (trgDir ** "*.java")).get.toSet
1131+
.partition{file =>
1132+
// sources from https://github.com/scala/scala/tree/2.13.x/src/library-aux
1133+
val path = file.getPath.replace('\\', '/')
1134+
path.endsWith("scala-library-src/scala/Any.scala") ||
1135+
path.endsWith("scala-library-src/scala/AnyVal.scala") ||
1136+
path.endsWith("scala-library-src/scala/AnyRef.scala") ||
1137+
path.endsWith("scala-library-src/scala/Nothing.scala") ||
1138+
path.endsWith("scala-library-src/scala/Null.scala") ||
1139+
path.endsWith("scala-library-src/scala/Singleton.scala")
1140+
}
1141+
// These sources should be never compiled, filtering them out was not working correctly sometimes
1142+
ignoredSources.foreach(_.delete())
1143+
sources
11301144
} (Set(scalaLibrarySourcesJar)).toSeq
11311145
}.taskValue,
1132-
(Compile / sources) ~= (_.filterNot { file =>
1133-
// sources from https://github.com/scala/scala/tree/2.13.x/src/library-aux
1134-
val path = file.getPath.replace('\\', '/')
1135-
path.endsWith("scala-library-src/scala/Any.scala") ||
1136-
path.endsWith("scala-library-src/scala/AnyVal.scala") ||
1137-
path.endsWith("scala-library-src/scala/AnyRef.scala") ||
1138-
path.endsWith("scala-library-src/scala/Nothing.scala") ||
1139-
path.endsWith("scala-library-src/scala/Null.scala") ||
1140-
path.endsWith("scala-library-src/scala/Singleton.scala")
1141-
}),
11421146
(Compile / sources) := {
11431147
val files = (Compile / sources).value
11441148
val overwrittenSourcesDir = (Compile / scalaSource).value
@@ -1361,7 +1365,7 @@ object Build {
13611365
.exclude("org.eclipse.lsp4j","org.eclipse.lsp4j.jsonrpc"),
13621366
"org.eclipse.lsp4j" % "org.eclipse.lsp4j" % "0.20.1",
13631367
),
1364-
libraryDependencies += ("org.scalameta" % "mtags-shared_2.13.12" % mtagsVersion % SourceDeps),
1368+
libraryDependencies += ("org.scalameta" % "mtags-shared_2.13.14" % mtagsVersion % SourceDeps),
13651369
ivyConfigurations += SourceDeps.hide,
13661370
transitiveClassifiers := Seq("sources"),
13671371
scalacOptions ++= Seq("-source", "3.3"), // To avoid fatal migration warnings

Diff for: project/Scala2LibraryBootstrappedMiMaFilters.scala

+4-3
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ object Scala2LibraryBootstrappedMiMaFilters {
7878
"scala.collection.IterableOnceOps#Maximized.this", // New in 2.13.11: private inner class
7979
"scala.util.Properties.<clinit>",
8080
"scala.util.Sorting.scala$util$Sorting$$mergeSort$default$5",
81-
// New in 2.13.12 -- can be removed once scala/scala#10549 lands in 2.13.13
82-
// and we take the upgrade here
83-
"scala.collection.immutable.MapNodeRemoveAllSetNodeIterator.next",
8481
).map(ProblemFilters.exclude[DirectMissingMethodProblem])
8582
}
8683
)
@@ -175,6 +172,10 @@ object Scala2LibraryBootstrappedMiMaFilters {
175172
"scala.collection.mutable.LinkedHashSet.defaultLoadFactor", // private[collection] final def
176173
"scala.collection.mutable.LinkedHashSet.defaultinitialSize", // private[collection] final def
177174
"scala.collection.mutable.OpenHashMap.nextPositivePowerOfTwo", // private[mutable] def
175+
// New in 2.13.13
176+
"scala.collection.mutable.ArrayBuffer.resizeUp", // private[mutable] def
177+
// New in 2.13.14
178+
"scala.util.Properties.consoleIsTerminal", // private[scala] lazy val
178179
).map(ProblemFilters.exclude[DirectMissingMethodProblem]) ++
179180
Seq( // MissingFieldProblem: static field ... in object ... does not have a correspondent in other version
180181
"scala.Array.UnapplySeqWrapper",

0 commit comments

Comments
 (0)