8000 Merge pull request #5102 from sjrd/drop-scala-2.13.2-and-below · scala-js/scala-js@b59047d · GitHub
[go: up one dir, main page]

Skip to content

Commit b59047d

Browse files
authored
Merge pull request #5102 from sjrd/drop-scala-2.13.2-and-below
Drop support for Scala 2.13.{0-2}.
2 parents a984f43 + 68b1c71 commit b59047d

File tree

14 files changed

+12
-943
lines changed

14 files changed

+12
-943
lines changed

CODINGSTYLE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ value :: list
227227
```
228228

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

233233
### Method definition

Jenkinsfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,6 @@ def otherScalaVersions = [
559559
"2.12.16",
560560
"2.12.17",
561561
"2.12.18",
562-
"2.13.0",
563-
"2.13.1",
564-
"2.13.2",
565562
"2.13.3",
566563
"2.13.4",
567564
"2.13.5",

compiler/src/main/scala/org/scalajs/nscplugin/GenJSCode.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3875,7 +3875,7 @@ abstract class GenJSCode[G <: Global with Singleton](val global: G)
38753875
* true `int`s can reach the back-end, as asserted by the String-switch
38763876
* transformation in `cleanup`. Therefore, we do not adapt, preserving
38773877
* the `string`s and `null`s that come out of the pattern matching in
3878-
* Scala 2.13.2+.
3878+
* Scala 2.13.x.
38793879
*/
38803880
val genSelector = genExpr(selector)
38813881

compiler/src/test/scala/org/scalajs/nscplugin/test/DiverseErrorsTest.scala

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,8 @@ class DiverseErrorsTest extends DirectTest with TestHelpers {
2626

2727
private def version = scala.util.Properties.versionNumberString
2828

29-
private val allowsSingletonClassOf = (
30-
!version.startsWith("2.12.") &&
31-
version != "2.13.0" &&
32-
version != "2.13.1" &&
33-
version != "2.13.2" &&
34-
version != "2.13.3"
35-
)
29+
private val allowsSingletonClassOf =
30+
!version.startsWith("2.12.") && version != "2.13.3"
3631

3732
@Test
3833
def noIsInstanceOnJS(): Unit = {

compiler/src/test/scala/org/scalajs/nscplugin/test/JSInteropTest.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4423,9 +4423,7 @@ class JSInteropTest extends DirectTest with TestHelpers {
44234423
version == "2.12.7" ||
44244424
version == "2.12.8" ||
44254425
version == "2.12.9" ||
4426-
version == "2.12.10" ||
4427-
version == "2.13.0" ||
4428-
version == "2.13.1"
4426+
version == "2.12.10"
44294427
}
44304428
if (hasNoSpace) ""
44314429
else " "

compiler/src/test/scala/org/scalajs/nscplugin/test/util/VersionDependentUtils.scala

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,12 @@ package org.scalajs.nscplugin.test.util
1515
object VersionDependentUtils {
1616
val scalaVersion = scala.util.Properties.versionNumberString
1717

18-
/** Does the current Scala version support the `@nowarn` annotation? */
19-
val scalaSupportsNoWarn = {
20-
!scalaVersion.startsWith(&qu 9E88 ot;2.12.") &&
21-
scalaVersion != "2.13.0" &&
22-
scalaVersion != "2.13.1"
23-
}
18+
private val isScala212 = scalaVersion.startsWith("2.12.")
2419

25-
private val usesColonInMethodSig = {
26-
/* Yes, this is the same test as in scalaSupportsNoWarn, but that's
27-
* completely coincidental, so we have a copy.
28-
*/
29-
!scalaVersion.startsWith("2.12.") &&
30-
scalaVersion != "2.13.0" &&
31-
scalaVersion != "2.13.1"
32-
}
20+
/** Does the current Scala version support the `@nowarn` annotation? */
21+
val scalaSupportsNoWarn = !isScala212
3322

3423
def methodSig(params: String, resultType: String): String =
35-
if (usesColonInMethodSig) params + ": " + resultType
24+
if (!isScala212) params + ": " + resultType
3625
else params + resultType
3726
}

project/Build.scala

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,7 @@ object Build {
484484

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

740735
scalacOptions in (Compile, doc) := {
741736
val prev = (scalacOptions in (Compile, doc)).value
742-
val scalaV = scalaVersion.value
743-
def scaladocFullySupportsJDKgreaterThan8 = {
744-
!scalaV.startsWith("2.12.") &&
745-
scalaV != "2.13.0" && scalaV != "2.13.1" && scalaV != "2.13.2"
746-
}
747-
if (javaVersion.value > 8 && !scaladocFullySupportsJDKgreaterThan8)
737+
if (javaVersion.value > 8 && scalaVersion.value.startsWith("2.12."))
748738
prev.filter(_ != "-Xfatal-warnings")
749739
else
750740
prev
@@ -966,9 +956,6 @@ object Build {
966956
"2.12.19",
967957
),
968958
cross213ScalaVersions := Seq(
969-
"2.13.0",
970-
"2.13.1",
971-
"2.13.2",
972959
"2.13.3",
973960
"2.13.4",
974961
"2.13.5",

scala-test-suite/src/test/resources/2.13.0/BlacklistedTests.txt

Lines changed: 0 additions & 180 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0