Repository: scalameta/scalameta (scala)

Issue:
Please publish for Scala 2.13.10
Scala 2.13.10 is now on Maven Central; we plan to announce it on Thu Oct 13.

Pull request description:
Waiting for ScalaJS and Native releases

Fixes https://github.com/scalameta/scalameta/issues/2902

Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index cfcb1149fd..327d8b0ec0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -31,9 +31,10 @@ jobs:
           - "++2.13.7 testsJVM/test"
           - "++2.13.8 testsJVM/test"
           - "++2.13.9 testsJVM/test"
-          - "++2.13.9 testsJS/test"
-          - "++2.13.9 testsNative/test"
-          - "++2.13.9 download-scala-library testsJVM/slow:test"
+          - "++2.13.10 testsJVM/test"
+          - "++2.13.10 testsJS/test"
+          - "++2.13.10 testsNative/test"
+          - "++2.13.10 download-scala-library testsJVM/slow:test"
           - "communitytest/test"
           - "mima"
     steps:
diff --git a/project/Versions.scala b/project/Versions.scala
index ccead1554f..aba0961b51 100644
--- a/project/Versions.scala
+++ b/project/Versions.scala
@@ -4,7 +4,7 @@ package build
 object Versions {
   val LatestScala211 = "2.11.12"
   val LatestScala212 = "2.12.17"
-  val LatestScala213 = "2.13.9"
+  val LatestScala213 = "2.13.10"
   val LegacyScalaVersions =
     List(
       "2.12.9",
@@ -15,7 +15,6 @@ object Versions {
       "2.12.14",
       "2.12.15",
       "2.12.16",
-      "2.13.0",
       "2.13.1",
       "2.13.2",
       "2.13.3",
@@ -23,6 +22,7 @@ object Versions {
       "2.13.5",
       "2.13.6",
       "2.13.7",
-      "2.13.8"
+      "2.13.8",
+      "2.13.9"
     )
 }
diff --git a/semanticdb/scalac/library/src/main/scala-2.13.1/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.1/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 45471bfc42..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.1/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.reporters.{FilteringReporter, StoreReporter}
-import scala.tools.nsc.Settings
-
-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.10/scala/meta/internal/semanticdb/scalac/VersionCompilerOps.scala b/semanticdb/scalac/library/src/main/scala-2.13.10/scala/meta/internal/semanticdb/scalac/VersionCompilerOps.scala
new file mode 100644
index 0000000000..280c292e17
--- /dev/null
+++ b/semanticdb/scalac/library/src/main/scala-2.13.10/scala/meta/internal/semanticdb/scalac/VersionCompilerOps.scala
@@ -0,0 +1,9 @@
+package scala.meta.internal.semanticdb.scalac
+
+import scala.tools.nsc.interactive.Global
+
+trait VersionCompilerOps {
+
+  def forceWarnings(global: Global) = {}
+
+}
diff --git a/semanticdb/scalac/library/src/main/scala-2.13.2/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.2/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 45471bfc42..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.2/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.reporters.{FilteringReporter, StoreReporter}
-import scala.tools.nsc.Settings
-
-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.3/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.3/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 45471bfc42..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.3/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.reporters.{FilteringReporter, StoreReporter}
-import scala.tools.nsc.Settings
-
-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.4/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.4/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 45471bfc42..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.4/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.reporters.{FilteringReporter, StoreReporter}
-import scala.tools.nsc.Settings
-
-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.5/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.5/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 45471bfc42..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.5/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.reporters.{FilteringReporter, StoreReporter}
-import scala.tools.nsc.Settings
-
-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.6/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.6/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 45471bfc42..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.6/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.reporters.{FilteringReporter, StoreReporter}
-import scala.tools.nsc.Settings
-
-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.7/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.7/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 45471bfc42..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.7/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.reporters.{FilteringReporter, StoreReporter}
-import scala.tools.nsc.Settings
-
-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.8/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.8/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 45471bfc42..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.8/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.reporters.{FilteringReporter, StoreReporter}
-import scala.tools.nsc.Settings
-
-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.9/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala b/semanticdb/scalac/library/src/main/scala-2.13.9/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
deleted file mode 100644
index 45471bfc42..0000000000
--- a/semanticdb/scalac/library/src/main/scala-2.13.9/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
+++ /dev/null
@@ -1,27 +0,0 @@
-package scala.meta.internal.semanticdb.scalac
-
-import scala.reflect.internal.util.Position
-import scala.tools.nsc.reporters.{FilteringReporter, StoreReporter}
-import scala.tools.nsc.Settings
-
-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.0/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 100%
rename from semanticdb/scalac/library/src/main/scala-2.13.0/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala
rename to semanticdb/scalac/library/src/main/scala-2.13/scala/meta/internal/semanticdb/scalac/SemanticdbReporter.scala


Test patch:
diff --git a/bin/test-release.sh b/bin/test-release.sh
index 08b713c2e4..3a1a60d75c 100755
--- a/bin/test-release.sh
+++ b/bin/test-release.sh
@@ -13,6 +13,7 @@ coursier resolve \
   org.scalameta:metac_2.12.17:$version \
   org.scalameta:metac_2.11.12:$version \
   org.scalameta:semanticdb-scalac-core_2.13.8:$version \
+  org.scalameta:semanticdb-scalac-core_2.13.10:$version \
   org.scalameta:semanticdb-scalac-core_2.13.9:$version \
   org.scalameta:semanticdb-scalac-core_2.13.7:$version \
   org.scalameta:semanticdb-scalac-core_2.13.6:$version \
@@ -31,6 +32,7 @@ coursier resolve \
   org.scalameta:semanticdb-scalac-core_2.12.16:$version \
   org.scalameta:semanticdb-scalac-core_2.12.17:$version \
   org.scalameta:semanticdb-scalac-core_2.11.12:$version \
+  org.scalameta:semanticdb-scalac_2.13.10:$version \
   org.scalameta:semanticdb-scalac_2.13.9:$version \
   org.scalameta:semanticdb-scalac_2.13.8:$version \
   org.scalameta:semanticdb-scalac_2.13.7:$version \
diff --git a/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/InteractiveSuite.scala b/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/InteractiveSuite.scala
index ddfd2cff52..54ccac4175 100644
--- a/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/InteractiveSuite.scala
+++ b/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/InteractiveSuite.scala
@@ -16,7 +16,7 @@ class InteractiveSuite extends FunSuite {
   def check(
       original: String,
       expected: String,
-      compat: List[(String, String)] = List.empty
+      compat: List[(ScalaVersion.Version, String)] = List.empty
   ): Unit = {
     test(logger.revealWhitespace(original)) {
       val options = List("-P:semanticdb:synthetics:on", "-P:semanticdb:text:on")
@@ -106,11 +106,10 @@ class InteractiveSuite extends FunSuite {
     // typer hijacking is not working as expected with interactive.Global.
     expectedPrevious,
     compat = List(
-      "2.13.3" -> expectedPrevious213,
-      "2.13.2" -> expectedPrevious213,
-      "2.13.1" -> expectedPrevious213,
-      "2.13.0" -> expectedPrevious213,
-      "2.13" -> expectedLatest
+      ScalaVersion.Full("2.13.3") -> expectedPrevious213,
+      ScalaVersion.Full("2.13.2") -> expectedPrevious213,
+      ScalaVersion.Full("2.13.1") -> expectedPrevious213,
+      ScalaVersion.Scala213 -> expectedLatest
     )
   )
 
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 c5ebc0990c..4f6499d3cf 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
@@ -6,6 +6,12 @@ import scala.util.Properties
 object ScalaVersion {
   val version = Properties.versionNumberString
 
+  sealed trait Version
+  case object Scala211 extends Version
+  case object Scala212 extends Version
+  case object Scala213 extends Version
+  case class Full(ver: String) extends Version
+
   // both the compiler and stdlib are different between Scala versions.
   // For the sake of simplicity, we only run the expect test against the
   // output of 2.12. It's possible to add another expect file for 2.11
@@ -46,10 +52,13 @@ object ScalaVersion {
 
   def atLeast212_14 = isSupported(minimal212 = 14, minimal213 = 0)
 
-  def getExpected(compat: Seq[(String, String)], expected: String) = {
+  def getExpected(compat: Seq[(Version, String)], expected: String) = {
     compat
       .collectFirst {
-        case (ver, expected) if version.startsWith(ver) => expected
+        case (Full(ver), expected) if version == ver => expected
+        case (Scala213, expected) if version.startsWith("2.13") => expected
+        case (Scala212, expected) if version.startsWith("2.12") => expected
+        case (Scala211, expected) if version.startsWith("2.11") => expected
       }
       .getOrElse(expected)
   }
diff --git a/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/Source3Suite.scala b/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/Source3Suite.scala
index bf6f16665b..6f08e7beb3 100644
--- a/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/Source3Suite.scala
+++ b/tests/jvm/src/test/scala/scala/meta/tests/semanticdb/Source3Suite.scala
@@ -20,7 +20,7 @@ class Source3Suite extends FunSuite {
   def check(
       original: String,
       expected: String,
-      compat: List[(String, String)] = List.empty
+      compat: List[(ScalaVersion.Version, String)] = List.empty
   ): Unit = {
     test(logger.revealWhitespace(original)) {
       val options = List("-P:semanticdb:synthetics:on", "-P:semanticdb:text:on")
@@ -86,10 +86,16 @@ class Source3Suite extends FunSuite {
     """.stripMargin,
     expected,
     compat = List(
-      "2.12.14" -> expected.replace("scala/package.List.", "scala/collection/immutable/List."),
-      "2.12.15" -> expected.replace("scala/package.List.", "scala/collection/immutable/List."),
-      "2.12.16" -> expected.replace("scala/package.List.", "scala/collection/immutable/List."),
-      "2.12.17" -> expected.replace("scala/package.List.", "scala/collection/immutable/List.")
+      ScalaVersion.Full("2.12.14") -> expected
+        .replace("scala/package.List.", "scala/collection/immutable/List."),
+      ScalaVersion.Full("2.12.15") -> expected
+        .replace("scala/package.List.", "scala/collection/immutable/List."),
+      ScalaVersion.Full("2.12.16") -> expected
+        .replace("scala/package.List.", "scala/collection/immutable/List."),
+      ScalaVersion.Full("2.12.17") -> expected.replace(
+        "scala/package.List.",
+        "scala/collection/immutable/List."
+      )
     )
   )