Skip to content

Commit 22ee747

Browse files
WojciechMazurSethTisuesjrd
authored
Backport "Scala 2.13.16 (was .15)" to Scala 3.3 LTS (#186)
* Scala 2.13.16 (was .15) * Silence deprecations about AnyRefMap in scalajs-ir. * Upgrade to mtags 1.4.2, which supports Scala 2.13.16. * Silence deprecations about AnyRefMap in a test --------- Co-authored-by: Seth Tisue <[email protected]> Co-authored-by: Sébastien Doeraene <[email protected]>
1 parent daca114 commit 22ee747

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed
Submodule stdLib213 updated 1443 files

project/Build.scala

+11-4
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ object Build {
124124
* scala-library.
125125
*/
126126
def stdlibVersion(implicit mode: Mode): String = mode match {
127-
case NonBootstrapped => "2.13.15"
128-
case Bootstrapped => "2.13.15"
127+
case NonBootstrapped => "2.13.16"
128+
case Bootstrapped => "2.13.16"
129129
}
130130

131131
val dottyOrganization = "org.scala-lang"
@@ -589,6 +589,13 @@ object Build {
589589

590590
// Settings shared between scala3-compiler and scala3-compiler-bootstrapped
591591
lazy val commonDottyCompilerSettings = Seq(
592+
/* Ignore a deprecation warning about AnyRefMap in scalajs-ir. The latter
593+
* cross-compiles for 2.12, and therefore AnyRefMap remains useful there
594+
* for performance reasons.
595+
* The build of Scala.js core does the same thing.
596+
*/
597+
scalacOptions += "-Wconf:cat=deprecation&origin=scala\\.collection\\.mutable\\.AnyRefMap.*:s",
598+
592599
// Generate compiler.properties, used by sbt
593600
(Compile / resourceGenerators) += Def.task {
594601
import java.util._
@@ -1182,7 +1189,7 @@ object Build {
11821189
BuildInfoPlugin.buildInfoDefaultSettings
11831190

11841191
lazy val presentationCompilerSettings = {
1185-
val mtagsVersion = "1.4.1"
1192+
val mtagsVersion = "1.4.2"
11861193
Seq(
11871194
libraryDependencies ++= Seq(
11881195
"org.lz4" % "lz4-java" % "1.8.0",
@@ -1192,7 +1199,7 @@ object Build {
11921199
.exclude("org.eclipse.lsp4j","org.eclipse.lsp4j.jsonrpc"),
11931200
"org.eclipse.lsp4j" % "org.eclipse.lsp4j" % "0.20.1",
11941201
),
1195-
libraryDependencies += ("org.scalameta" % "mtags-shared_2.13.15" % mtagsVersion % SourceDeps),
1202+
libraryDependencies += ("org.scalameta" % "mtags-shared_2.13.16" % mtagsVersion % SourceDeps),
11961203
ivyConfigurations += SourceDeps.hide,
11971204
transitiveClassifiers := Seq("sources"),
11981205
Compile / scalacOptions ++= Seq("-Yexplicit-nulls", "-Ysafe-init"),

tests/patmat/i7186.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ object printMips {
9292

9393
def apply(nodes: List[Assembler]): Unit = {
9494
var symbCount = 0L
95-
val symbols = new scala.collection.mutable.AnyRefMap[Scoped,Long]()
95+
val symbols = new scala.collection.mutable.HashMap[Scoped,Long]()
9696

9797
print(mipsNode(nodes, " "))
9898

0 commit comments

Comments
 (0)