Skip to content

Commit 219c31b

Browse files
committed
Drop support for Scala 2.11 and 2.12
1 parent b1bb57a commit 219c31b

File tree

8 files changed

+13
-41
lines changed

8 files changed

+13
-41
lines changed

build.sbt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ lazy val V =
1818
val moped = "0.2.0"
1919
val gradle = "7.0"
2020
val scala213 = "2.13.13"
21-
val scala212 = "2.12.19"
22-
val scala211 = "2.11.12"
2321
val scala3 = "3.3.3"
2422
val metals = "1.2.2"
2523
val scalameta = "4.9.3"
@@ -140,8 +138,6 @@ lazy val gradlePlugin = project
140138
"semanticdbVersion" -> V.scalameta,
141139
"semanticdbKotlincVersion" -> V.semanticdbKotlin,
142140
"mtagsVersion" -> V.metals,
143-
"scala211" -> V.scala211,
144-
"scala212" -> V.scala212,
145141
"scala213" -> V.scala213,
146142
"scala3" -> V.scala3,
147143
"bspVersion" -> V.bsp,
@@ -268,8 +264,6 @@ lazy val cli = project
268264
"semanticdbVersion" -> V.scalameta,
269265
"semanticdbKotlincVersion" -> V.semanticdbKotlin,
270266
"mtagsVersion" -> V.metals,
271-
"scala211" -> V.scala211,
272-
"scala212" -> V.scala212,
273267
"scala213" -> V.scala213,
274268
"scala3" -> V.scala3,
275269
"bspVersion" -> V.bsp,

docs/getting-started.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,8 @@ by [Metals](https://scalameta.org/metals), the Scala language server.
230230

231231
| Scala version | Goto definition | Find references | Hover |
232232
| ------------- | --------------- | --------------- | ----- |
233-
| Scala 2.10.x ||||
234-
| Scala 2.11.x ||||
235-
| Scala 2.12.x ||||
233+
| Scala 2.11.x ||||
234+
| Scala 2.12.x ||||
236235
| Scala 2.13.x ||||
237236
| Scala 3.x ||||
238237

scip-java/src/main/scala/com/sourcegraph/scip_java/buildtools/ScalaVersion.scala

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,19 @@ object ScalaVersion {
2020
* 2.13.
2121
* - We should only infer Scala versions that are supported by the
2222
* `org.scalameta:mtags` module, which we use to compile SemanticDB files.
23-
* Currently, mtags supports the latest patch releases of Scala 2.11,
24-
* 2.12, 2.13 and Scala 3.
23+
* Currently, mtags supports the latest patch releases of Scala 2.13 and
24+
* Scala 3.
2525
*/
2626
def inferFromJar(jar: Path): Option[String] = {
2727
val Scala3 = ".*_3\\b.*".r
28-
val Scala211 = ".*_2.11\\b.*".r
29-
val Scala212 = ".*_2.12\\b.*".r
3028
val Scala213 = ".*_2.13\\b.*".r
31-
// The official Scala 2 distribution doesn't use the standard _2.N suffix
32-
// So we add a special case for scala-{compiler,reflect,library} and scalap.
3329
val ScalaOfficial =
3430
".*scala(p|-compiler|-reflect|-library)?-2.([^\\.]+).*.jar".r
3531
Option(jar.getFileName.toString).collect {
3632
case Scala3() =>
3733
BuildInfo.scala3
38-
case Scala211() =>
39-
BuildInfo.scala211
40-
case Scala212() =>
41-
BuildInfo.scala212
4234
case Scala213() =>
4335
BuildInfo.scala213
44-
case ScalaOfficial(_, "11") =>
45-
BuildInfo.scala211
46-
case ScalaOfficial(_, "12") =>
47-
BuildInfo.scala212
4836
case ScalaOfficial(_, "13") =>
4937
BuildInfo.scala213
5038
}

tests/buildTools/src/test/scala/tests/GradleBuildToolSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ abstract class GradleBuildToolSuite(gradle: Tool.Gradle)
341341
| mavenCentral()
342342
|}
343343
|dependencies {
344-
| implementation 'org.scala-lang:scala-library:2.12.12'
344+
| implementation 'org.scala-lang:scala-library:2.13.13'
345345
|}
346346
|/src/main/java/foo/JExample.java
347347
|package foo;
@@ -358,7 +358,7 @@ abstract class GradleBuildToolSuite(gradle: Tool.Gradle)
358358
|""".stripMargin,
359359
expectedSemanticdbFiles = 4,
360360
gradleVersions = List(Gradle8, Gradle7, Gradle6),
361-
tools = List(Scala2_12_12)
361+
tools = List(Scala213)
362362
)
363363
checkGradleBuild(
364364
"kotlin2",

tests/buildTools/src/test/scala/tests/MillBuildToolSuite.scala

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,20 @@ class MillBuildToolSuite extends BaseBuildToolSuite {
3737
).mkString("\n")
3838
else if (scalaVersion.startsWith("2.13"))
3939
"maven:org.scala-lang:scala-library:2.13.8"
40-
else if (scalaVersion.startsWith("2.12"))
41-
"maven:org.scala-lang:scala-library:2.12.19"
4240
else
43-
"idn fail, we don't cover this scala version"
41+
throw new IllegalArgumentException(s"Unsupported Scala version: $scalaVersion")
4442

4543
def scalaBinaryVersion(scalaVersion: String) =
4644
if (scalaVersion.startsWith("3"))
4745
"3"
4846
else if (scalaVersion.startsWith("2.13"))
4947
"2.13"
50-
else if (scalaVersion.startsWith("2.12"))
51-
"2.12"
5248
else
53-
"idn fail, we don't cover this scala version"
49+
throw new IllegalArgumentException(s"Unsupported Scala version: $scalaVersion")
5450

5551
for {
5652
mill <- List(Mill0_10, Mill0_11)
57-
scala <- List(Scala212, Scala2_13_8, Scala3)
53+
scala <- List(Scala2_13_8, Scala3)
5854
} yield {
5955

6056
checkBuild(

tests/buildTools/src/test/scala/tests/ScipBuildToolSuite.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ class ScipBuildToolSuite extends BaseBuildToolSuite {
179179
)
180180

181181
List(
182-
ScalaCombination("2.11", V.scala211, V.scala211),
183-
ScalaCombination("2.12", V.scala212, V.scala212),
184182
ScalaCombination("2.13", V.scala213, V.scala213),
185183
// The Scala 2.13 version of the build and the Scala 2.13 version of
186184
// Scala 3's standard library are not necessarily aligned

tests/buildTools/src/test/scala/tests/Tool.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@ object Tool {
5252
extends Tool("scala", version, support)
5353
// See https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
5454
case object Scala213 extends Scala("2.13.13", noRestrictions)
55-
case object Scala212 extends Scala("2.12.19", noRestrictions)
56-
case object Scala2_12_12 extends Scala("2.12.12", atMostJava(11))
5755
case object Scala2_13_8 extends Scala("2.13.8", atMostJava(17))
58-
case object Scala211 extends Scala("2.11.9", atMostJava(11))
5956
case object Scala3 extends Scala("3.3.3", noRestrictions)
6057

6158
sealed abstract class Mill(version: String, support: JVMSupport)

tests/unit/src/test/scala/tests/ScalaVersionSuite.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ class ScalaVersionSuite extends FunSuite {
2222

2323
checkNone("junit-4.13.2")
2424
checkNone("scala-library-2.10.1.jar")
25-
check("scala-library-2.11.1.jar", V.scala211)
26-
check("scala-library-2.12.1.jar", V.scala212)
25+
checkNone("scala-library-2.11.1.jar")
26+
checkNone("scala-library-2.12.1.jar")
2727
check("scala-compiler-2.13.1.jar", V.scala213)
2828
check("scala-reflect-2.13.1.jar", V.scala213)
2929
check("scala-library-2.13.1.jar", V.scala213)
3030
check("scalap-2.13.1.jar", V.scala213)
3131
checkNone("scala-library-2.14.1.jar")
3232

33-
check("geny_2.11-0.10.5.jar", V.scala211)
34-
check("geny_2.12-0.10.5.jar", V.scala212)
33+
checkNone("geny_2.11-0.10.5.jar")
34+
checkNone("geny_2.12-0.10.5.jar")
3535
check("geny_2.13-0.10.5.jar", V.scala213)
3636
check("geny_3-0.10.5.jar", V.scala3)
3737

0 commit comments

Comments
 (0)