Repository: scalameta/scalameta (scala)

Issue:
Please publish for Scala 2.13.15
which is now on Maven Central, as per https://contributors.scala-lang.org/t/scala-2-13-15-release-planning/6649/11

Pull request:
Fixes https://github.com/scalameta/scalameta/issues/3973

Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index cc76e9fb61..98dd374c15 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,7 +12,7 @@ jobs:
       fail-fast: false
       matrix:
         command:
-          - "++2.13.14; download-scala-library; testsJVM/slow:test"
+          - "++2.13.15; download-scala-library; testsJVM/slow:test"
           - "communitytest/test"
           - "mima"
     steps:
@@ -37,7 +37,7 @@ jobs:
           - 'Native'
         scala:
           - '2.12.20'
-          - '2.13.14'
+          - '2.13.15'
         java:
           - '8'
           - '17'
@@ -62,9 +62,9 @@ jobs:
           - '2.12.16'
           - '2.12.17'
           - '2.12.18'
-          - '2.13.11'
           - '2.13.12'
           - '2.13.13'
+          - '2.13.14'
     steps:
       - uses: actions/checkout@v4
         with:
diff --git a/build.sbt b/build.sbt
index 020905a5a6..5358386602 100644
--- a/build.sbt
+++ b/build.sbt
@@ -282,6 +282,7 @@ lazy val semanticdbIntegration = project.in(file("semanticdb/integration")).sett
   // the sources in this project intentionally produce warnings to test the
   // diagnostics pipeline in semanticdb-scalac.
   scalacOptions -= "-Xfatal-warnings",
+  scalacOptions -= "-Wconf:cat=deprecation:is",
   scalacOptions += "-deprecation",
   scalacOptions ++= {
     if (scalaVersion.value >= "2.13.14") Seq(
diff --git a/project/Versions.scala b/project/Versions.scala
index a040a2c496..be0a92b06f 100644
--- a/project/Versions.scala
+++ b/project/Versions.scala
@@ -4,7 +4,7 @@ package build
 object Versions {
   val Scala211Versions = getVersions(2, 11, 12 to 12)
   val Scala212Versions = getVersions(2, 12, 17 to 20)
-  val Scala213Versions = getVersions(2, 13, 11 to 14)
+  val Scala213Versions = getVersions(2, 13, 12 to 15)
   val LatestScala211 = Scala211Versions.head
   val LatestScala212 = Scala212Versions.head
   val LatestScala213 = Scala213Versions.head
diff --git a/semanticdb/scalac/library/src/main/scala-2.13.10/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.10/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index ae53481591..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.10/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.Settings
-import scala.tools.nsc.reporters.FilteringReporter
-import scala.tools.nsc.reporters.StoreReporter
-
-class SemanticdbReporter(underlying: FilteringReporter)
-    extends StoreReporter(SemanticdbReporter.defaultSettings(underlying.settings)) {
-  override def doReport(pos: Position, msg: String, severity: Severity): Unit = {
-    super.doReport(pos, msg, severity)
-    underlying.doReport(pos, msg, severity)
-  }
-
-  // overriding increment is enough so make sure that error/warning
-  // counts are the same as in underlying reporter
-
-  override def increment(severity: Severity): Unit = {
-    super.increment(severity)
-    underlying.increment(severity)
-  }
-}
-object SemanticdbReporter {
-  def defaultSettings(s: Settings): Settings = {
-    s.processArguments(List("-Xmaxwarns", "-1", "-Xmaxerrs", "-1"), true)
-    s
-  }
-}
diff --git a/semanticdb/scalac/library/src/main/scala-2.13.11/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.11/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index ae53481591..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.11/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,28 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.Settings
-import scala.tools.nsc.reporters.FilteringReporter
-import scala.tools.nsc.reporters.StoreReporter
-
-class SemanticdbReporter(underlying: FilteringReporter)
-    extends StoreReporter(SemanticdbReporter.defaultSettings(underlying.settings)) {
-  override def doReport(pos: Position, msg: String, severity: Severity): Unit = {
-    super.doReport(pos, msg, severity)
-    underlying.doReport(pos, msg, severity)
-  }
-
-  // overriding increment is enough so make sure that error/warning
-  // counts are the same as in underlying reporter
-
-  override def increment(severity: Severity): Unit = {
-    super.increment(severity)
-    underlying.increment(severity)
-  }
-}
-object SemanticdbReporter {
-  def defaultSettings(s: Settings): Settings = {
-    s.processArguments(List("-Xmaxwarns", "-1", "-Xmaxerrs", "-1"), true)
-    s
-  }
-}
diff --git a/semanticdb/scalac/library/src/main/scala-2.13.12/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.12/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 0669b7f183..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.12/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.CodeAction
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.Settings
-import scala.tools.nsc.reporters.FilteringReporter
-import scala.tools.nsc.reporters.StoreReporter
-
-class SemanticdbReporter(underlying: FilteringReporter)
-    extends StoreReporter(SemanticdbReporter.defaultSettings(underlying.settings)) {
-  override def doReport(
-      pos: Position,
-      msg: String,
-      severity: Severity,
-      actions: List[CodeAction]
-  ): Unit = {
-    super.doReport(pos, msg, severity, actions)
-    underlying.doReport(pos, msg, severity, actions)
-  }
-
-  // overriding increment is enough so make sure that error/warning
-  // counts are the same as in underlying reporter
-
-  override def increment(severity: Severity): Unit = {
-    super.increment(severity)
-    underlying.increment(severity)
-  }
-}
-object SemanticdbReporter {
-  def defaultSettings(s: Settings): Settings = {
-    s.processArguments(List("-Xmaxwarns", "-1", "-Xmaxerrs", "-1"), true)
-    s
-  }
-}
diff --git a/semanticdb/scalac/library/src/main/scala-2.13.13/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.13/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 0669b7f183..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.13/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.CodeAction
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.Settings
-import scala.tools.nsc.reporters.FilteringReporter
-import scala.tools.nsc.reporters.StoreReporter
-
-class SemanticdbReporter(underlying: FilteringReporter)
-    extends StoreReporter(SemanticdbReporter.defaultSettings(underlying.settings)) {
-  override def doReport(
-      pos: Position,
-      msg: String,
-      severity: Severity,
-      actions: List[CodeAction]
-  ): Unit = {
-    super.doReport(pos, msg, severity, actions)
-    underlying.doReport(pos, msg, severity, actions)
-  }
-
-  // overriding increment is enough so make sure that error/warning
-  // counts are the same as in underlying reporter
-
-  override def increment(severity: Severity): Unit = {
-    super.increment(severity)
-    underlying.increment(severity)
-  }
-}
-object SemanticdbReporter {
-  def defaultSettings(s: Settings): Settings = {
-    s.processArguments(List("-Xmaxwarns", "-1", "-Xmaxerrs", "-1"), true)
-    s
-  }
-}
diff --git a/semanticdb/scalac/library/src/main/scala-2.13.14/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
similarity index 99%
rename from semanticdb/scalac/library/src/main/scala-2.13.14/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
rename to semanticdb/scalac/library/src/main/scala-2.13/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
index 0669b7f183..fddbe933e8 100644
--- a/semanticdb/scalac/library/src/main/scala-2.13.14/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ b/semanticdb/scalac/library/src/main/scala-2.13/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
@@ -8,6 +8,7 @@ import scala.tools.nsc.reporters.StoreReporter
 
 class SemanticdbReporter(underlying: FilteringReporter)
     extends StoreReporter(SemanticdbReporter.defaultSettings(underlying.settings)) {
+
   override def doReport(
       pos: Position,
       msg: String,
@@ -17,10 +18,8 @@ class SemanticdbReporter(underlying: FilteringReporter)
     super.doReport(pos, msg, severity, actions)
     underlying.doReport(pos, msg, severity, actions)
   }
-
   // overriding increment is enough so make sure that error/warning
   // counts are the same as in underlying reporter
-
   override def increment(severity: Severity): Unit = {
     super.increment(severity)
     underlying.increment(severity)


Test patch:
diff --git a/tests/jvm/src/test/resources/example/Synthetic_2.13.scala b/tests/jvm/src/test/resources/example/Synthetic_2.13.scala
index 6d31795f40..b672ccdc22 100644
--- a/tests/jvm/src/test/resources/example/Synthetic_2.13.scala
+++ b/tests/jvm/src/test/resources/example/Synthetic_2.13.scala
@@ -42,6 +42,6 @@ class Synthetic/*<=example.Synthetic#*/ {
     a/*<=local11*/ <- scala.concurrent.Future/*=>scala.concurrent.Future.*/.successful/*=>scala.concurrent.Future.successful().*/(1)
     b/*<=local12*/ <- scala.concurrent.Future/*=>scala.concurrent.Future.*/.successful/*=>scala.concurrent.Future.successful().*/(2)
     if a/*=>local11*/ </*=>scala.Int#`<`(+3).*/ b/*=>local12*/
-  } yield a/*=>local11*/
+  } yield a/*=>local13*/
 
 }
diff --git a/tests/jvm/src/test/resources/metac.expect_2.13 b/tests/jvm/src/test/resources/metac.expect_2.13
index 009cc341e2..2425103be6 100644
--- a/tests/jvm/src/test/resources/metac.expect_2.13
+++ b/tests/jvm/src/test/resources/metac.expect_2.13
@@ -1729,11 +1729,6 @@ Synthetics:
       a,
       b
     ) == (1, 2))}).flatMap[Tuple6[Int, Int, Int, Int, Tuple4[Int, Int, Int, Int], Tuple4[Int, Int, Int, Int]]]({(b) => orig(List((a, b))).withFilter({(check$ifrefutable$1) => orig()}).withFilter({(local7) => orig((
-      a,
-      b,
-      c,
-      d
-    ) == (1, 2, 3, 4))}).map[Tuple2[Tuple2[Int, Int], Tuple4[Int, Int, Int, Int]]]({(local8) => orig((
       c,
       d
     ) <- List((a, b))
@@ -1742,8 +1737,7 @@ Synthetics:
       b,
       c,
       d
-    ) == (1, 2, 3, 4)
-    e = (
+    ) == (1, 2, 3, 4))}).map[Tuple2[Tuple2[Int, Int], Tuple4[Int, Int, Int, Int]]]({(local8) => orig(e = (
       a,
       b,
       c,
@@ -3952,7 +3946,7 @@ Language => Scala
 Diagnostics => 1 entries
 
 Diagnostics:
-[5:2..5:21) [warning] a pure expression does nothing in statement position; multiline expressions may require enclosing parentheses
+[5:2..5:21) [warning] a pure expression does nothing in statement position
 
 semanticdb/integration/src/main/scala/example/Synthetic.scala
 -------------------------------------------------------------
@@ -4213,7 +4207,7 @@ Occurrences:
 [43:7..43:8): a => local11
 [43:9..43:10): < => scala/Int#`<`(+3).
 [43:11..43:12): b => local12
-[44:10..44:11): a => local11
+[44:10..44:11): a => local13
 
 Synthetics:
 [3:2..3:6): List => *.apply[Int]
diff --git a/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/ExpectSuite.scala b/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/ExpectSuite.scala
index d6126ffd84..5b9277c451 100644
--- a/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/ExpectSuite.scala
+++ b/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/ExpectSuite.scala
@@ -52,20 +52,7 @@ class ExpectSuite extends FunSuite {
   }
   test("metac.expect") {
     import MetacExpect._
-    val expected = loadExpected
-    val expectedCompat =
-      if (ScalaVersion.atLeast212_14) expected
-      else
-        // Predef.type etc. was fixed in 2.12.14
-        expected.replace("[43:21..43:22): x => types/Test.C#x.\n", "")
-          .replace("[44:21..44:22): p => types/Test.C#p.\n", "")
-          .replace("[25:23..25:29): Predef => scala/Predef.\n", "")
-          .replace("[23:13..23:19): Predef => scala/Predef.\n", "")
-          .replace("[44:23..44:24): x => types/P#x.\n", "")
-          .replace("Occurrences => 57 entries", "Occurrences => 56 entries")
-          .replace("Occurrences => 147 entries", "Occurrences => 146 entries")
-          .replace("Occurrences => 262 entries", "Occurrences => 259 entries")
-    this.assertNoDiff(loadObtained, expectedCompat)
+    this.assertNoDiff(loadObtained, loadExpected)
   }
 
   test("metac-metacp.diff") {
diff --git a/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/OccurrenceSuite.scala b/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/OccurrenceSuite.scala
index ff20ebe61d..7285c64042 100644
--- a/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/OccurrenceSuite.scala
+++ b/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/OccurrenceSuite.scala
@@ -22,12 +22,8 @@ class OccurrenceSuite extends FunSuite {
 
   private def testBody(body: OccurrenceSuite.TestBody): Unit = {
     val expectedCompat =
-      if (ScalaVersion.atLeast212_14) body.expected
-      else
-        // Predef.type etc. was fixed in 2.12.14
-        body.expected.replace("Predef/*=>scala.Predef.*/.type", "Predef.type")
-          .replace("x/*=>types.Test.C#x.*/.type", "x.type")
-          .replace("p/*=>types.Test.C#p.*/.x/*=>types.P#x.*/.type", "p.x.type")
+      if (ScalaVersion.atLeast213_15) body.expected
+      else body.expected.replace("  } yield a/*=>local13*/", "  } yield a/*=>local11*/")
     assertNoDiff(body.obtained, expectedCompat)
   }
 
diff --git a/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/ScalaVersion.scala b/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/ScalaVersion.scala
index 76618389ac..8426061e13 100644
--- a/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/ScalaVersion.scala
+++ b/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/ScalaVersion.scala
@@ -33,7 +33,7 @@ object ScalaVersion {
     }
   }
 
-  def atLeast212_14 = isSupported(minimal212 = 14, minimal213 = 0)
+  def atLeast213_15 = isSupported(minimal212 = Int.MaxValue, minimal213 = 15)
 
   def getExpected(compat: Seq[(Version, String)], expected: String) = compat.collectFirst {
     case (Full(`version`), expected) => expected