Skip to content

Drop support for Scala 2.13.{0-2}. #5102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODINGSTYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ value :: list
```

When calling a method declared with an empty pair of parentheses, always use `()`.
Not doing so causes (fatal) warnings when calling Scala-declared methods in Scala 2.13.3+.
Not doing so causes (fatal) warnings when calling Scala-declared methods in Scala 2.13.x.
For consistency, we also apply this rule to all Java-defined methods, including `toString()`.

### Method definition
Expand Down
3 changes: 0 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,6 @@ def otherScalaVersions = [
"2.12.16",
"2.12.17",
"2.12.18",
"2.13.0",
"2.13.1",
"2.13.2",
"2.13.3",
"2.13.4",
"2.13.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3875,7 +3875,7 @@ abstract class GenJSCode[G <: Global with Singleton](val global: G)
* true `int`s can reach the back-end, as asserted by the String-switch
* transformation in `cleanup`. Therefore, we do not adapt, preserving
* the `string`s and `null`s that come out of the pattern matching in
* Scala 2.13.2+.
* Scala 2.13.x.
*/
val genSelector = genExpr(selector)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@ class DiverseErrorsTest extends DirectTest with TestHelpers {

private def version = scala.util.Properties.versionNumberString

private val allowsSingletonClassOf = (
!version.startsWith("2.12.") &&
version != "2.13.0" &&
version != "2.13.1" &&
version != "2.13.2" &&
version != "2.13.3"
)
private val allowsSingletonClassOf =
!version.startsWith("2.12.") && version != "2.13.3"

@Test
def noIsInstanceOnJS(): Unit = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4423,9 +4423,7 @@ class JSInteropTest extends DirectTest with TestHelpers {
version == "2.12.7" ||
version == "2.12.8" ||
version == "2.12.9" ||
version == "2.12.10" ||
version == "2.13.0" ||
version == "2.13.1"
version == "2.12.10"
}
if (hasNoSpace) ""
else " "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,12 @@ package org.scalajs.nscplugin.test.util
object VersionDependentUtils {
val scalaVersion = scala.util.Properties.versionNumberString

/** Does the current Scala version support the `@nowarn` annotation? */
val scalaSupportsNoWarn = {
!scalaVersion.startsWith("2.12.") &&
scalaVersion != "2.13.0" &&
scalaVersion != "2.13.1"
}
private val isScala212 = scalaVersion.startsWith("2.12.")

private val usesColonInMethodSig = {
/* Yes, this is the same test as in scalaSupportsNoWarn, but that's
* completely coincidental, so we have a copy.
*/
!scalaVersion.startsWith("2.12.") &&
scalaVersion != "2.13.0" &&
scalaVersion != "2.13.1"
}
/** Does the current Scala version support the `@nowarn` annotation? */
val scalaSupportsNoWarn = !isScala212

def methodSig(params: String, resultType: String): String =
if (usesColonInMethodSig) params + ": " + resultType
if (!isScala212) params + ": " + resultType
else params + resultType
}
17 changes: 2 additions & 15 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,7 @@ object Build {

def addWconfSettingIf2_13(conf: String): Def.Setting[_] = {
scalacOptions ++= {
/* We exclude 2.13.0 and 2.13.1 because they did not support -Wconf yet.
* Fortunately, our use cases for -Wconf are only triggered with later
* versions.
*/
val v = scalaVersion.value
if (v.startsWith("2.13.") && v != "2.13.0" && v != "2.13.1")
if (scalaVersion.value.startsWith("2.13."))
List("-Wconf:" + conf)
else
Nil
Expand Down Expand Up @@ -739,12 +734,7 @@ object Build {

scalacOptions in (Compile, doc) := {
val prev = (scalacOptions in (Compile, doc)).value
val scalaV = scalaVersion.value
def scaladocFullySupportsJDKgreaterThan8 = {
!scalaV.startsWith("2.12.") &&
scalaV != "2.13.0" && scalaV != "2.13.1" && scalaV != "2.13.2"
}
if (javaVersion.value > 8 && !scaladocFullySupportsJDKgreaterThan8)
if (javaVersion.value > 8 && scalaVersion.value.startsWith("2.12."))
prev.filter(_ != "-Xfatal-warnings")
else
prev
Expand Down Expand Up @@ -966,9 +956,6 @@ object Build {
"2.12.19",
),
cross213ScalaVersions := Seq(
"2.13.0",
"2.13.1",
"2.13.2",
"2.13.3",
"2.13.4",
"2.13.5",
Expand Down
180 changes: 0 additions & 180 deletions scala-test-suite/src/test/resources/2.13.0/BlacklistedTests.txt

This file was deleted.

Loading
Loading