Skip to content

Commit 6f74f91

Browse files
[build] Use up-to-date sources of Scala 2.13 stdlib when patching Scala 3 bytecode (#24855)
- Update the version of mtags_shared and Scala 2 stdlib to use 2.13.18 artifact instead of 2.13.16 - Removed no longer used `Build.stdlibBootstrappedVersion`
1 parent 08cada8 commit 6f74f91

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

project/Build.scala

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,6 @@ object Build {
151151
}
152152
}
153153

154-
/** Version of the scala-library for which we will generate TASTy.
155-
*
156-
* We should never use a nightly version here to release.
157-
*
158-
* We can use nightly versions to tests the future compatibility in development.
159-
* Nightly versions: https://scala-ci.typesafe.com/ui/native/scala-integration/org/scala-lang
160-
*/
161-
val stdlibBootstrappedVersion = "2.13.16"
162-
163154
val homepageUrl = "https://scala-lang.org/"
164155
val dottyOrganization = "org.scala-lang"
165156
val dottyGithubUrl = "https://github.com/scala/scala3"
@@ -932,7 +923,7 @@ object Build {
932923
scriptedBatchExecution := true,
933924
scriptedLaunchOpts ++= Seq(
934925
s"-Dplugin.scalaVersion=${dottyVersion}",
935-
s"-Dplugin.scala2Version=2.13.16",
926+
s"-Dplugin.scala2Version=${ScalaLibraryPlugin.scala2Version}",
936927
s"-Dplugin.scalaJSVersion=${scalaJSVersion}",
937928
),
938929
scriptedBufferLog := true,
@@ -2038,7 +2029,7 @@ object Build {
20382029
"org.scalameta" % "mtags-interfaces" % mtagsVersion,
20392030
"com.google.guava" % "guava" % "33.2.1-jre",
20402031
),
2041-
libraryDependencies += ("org.scalameta" % "mtags-shared_2.13.16" % mtagsVersion % SourceDeps),
2032+
libraryDependencies += ("org.scalameta" % s"mtags-shared_${ScalaLibraryPlugin.scala2Version}" % mtagsVersion % SourceDeps),
20422033
ivyConfigurations += SourceDeps.hide,
20432034
transitiveClassifiers := Seq("sources"),
20442035
publishLocal := publishLocal.dependsOn( // It is best to publish all together. It is not rare to make changes in both compiler / presentation compiler and it can get misaligned

project/MiMaFilters.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ object MiMaFilters {
2020
// Only exceptional cases should be added here.
2121

2222
// Breaking changes since last reference version
23-
Build.mimaPreviousDottyVersion -> Seq.empty, // We should never break backwards compatibility
23+
Build.mimaPreviousDottyVersion -> Seq(
24+
// scala/scala3#24855 - copied from Scala 2.13.16 by ScalaLibraryPlugin, to be removed when Scala 3.8.0 is released
25+
ProblemFilters.exclude[MissingClassProblem]("scala.collection.immutable.LazyList$State*"),
26+
)
2427
)
2528
}
2629

project/ScalaLibraryPlugin.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ object ScalaLibraryPlugin extends AutoPlugin {
1212

1313
override def trigger = noTrigger
1414

15-
private val scala2Version = "2.13.16"
15+
/** Version of the compatible Scala 2.13 scala-library
16+
* Should be updated when we synchronize with the sources of Scala 2.
17+
*
18+
* This version would be used to fetch sources of Scala 2.13 standard library to be used for patching the Scala 3 standard library.
19+
*/
20+
val scala2Version = "2.13.18"
1621

1722
object autoImport {
1823
val keepSJSIR = settingKey[Boolean]("Should we patch .sjsir too?")

0 commit comments

Comments
 (0)