From e45876361c19a8080408eb0671b00229faf47eff Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Tue, 24 Dec 2024 00:29:41 +0100 Subject: [PATCH] fail hard on EOL Scala 3 minor --- build.sbt | 1 - project/Dependencies.scala | 1 - project/ScalafixBuild.scala | 2 - .../internal/interfaces/ScalafixImpl.scala | 4 +- .../java/scalafix/interfaces/Scalafix.java | 18 ++++---- .../tests/interfaces/ScalafixSuite.scala | 42 +++++++------------ .../tests/cli/InterfacesPropertiesSuite.scala | 1 - 7 files changed, 26 insertions(+), 43 deletions(-) diff --git a/build.sbt b/build.sbt index de361cf9d..28c40ab4d 100644 --- a/build.sbt +++ b/build.sbt @@ -33,7 +33,6 @@ lazy val interfaces = project props.put("scala212", scala212) props.put("scala213", scala213) props.put("scala33", scala33) - props.put("scala35", scala35) props.put("scala36", scala36) props.put("scala3LTS", scala3LTS) props.put("scala3Next", scala3Next) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 506f69b29..2f99ffb9d 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -8,7 +8,6 @@ object Dependencies { val scala212 = sys.props.getOrElse("scala212.nightly", "2.12.20") val scala213 = sys.props.getOrElse("scala213.nightly", "2.13.15") val scala33 = "3.3.4" - val scala35 = "3.5.2" val scala36 = "3.6.2" val scala3LTS = scala33 val scala3Next = sys.props.getOrElse("scala3.nightly", scala36) diff --git a/project/ScalafixBuild.scala b/project/ScalafixBuild.scala index a060b55df..f5c03cc0b 100644 --- a/project/ScalafixBuild.scala +++ b/project/ScalafixBuild.scala @@ -37,7 +37,6 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { scala212, scala213, scala33, - scala35, scala36, scala3Next ).distinct @@ -146,7 +145,6 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { "scala212" -> scala212, "scala213" -> scala213, "scala33" -> scala33, - "scala35" -> scala35, "scala36" -> scala36, "scala3LTS" -> scala3LTS, "scala3Next" -> scala3Next, diff --git a/scalafix-cli/src/main/scala/scalafix/internal/interfaces/ScalafixImpl.scala b/scalafix-cli/src/main/scala/scalafix/internal/interfaces/ScalafixImpl.scala index 2b922d4d5..b87b86f09 100644 --- a/scalafix-cli/src/main/scala/scalafix/internal/interfaces/ScalafixImpl.scala +++ b/scalafix-cli/src/main/scala/scalafix/internal/interfaces/ScalafixImpl.scala @@ -37,7 +37,9 @@ final class ScalafixImpl extends Scalafix { override def scala33(): String = Versions.scala33 override def scala35(): String = - Versions.scala35 + throw new java.lang.UnsupportedOperationException( + "Scala 3.5 is no longer supported; the final version supporting it is Scalafix 0.13.x" + ) override def scala36(): String = Versions.scala36 override def scala3LTS(): String = diff --git a/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java b/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java index a731a5d4c..2ca5d3e0b 100644 --- a/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java +++ b/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java @@ -75,9 +75,7 @@ public interface Scalafix { */ String scala33(); - /** - * The Scala 3.5 version in {@link #supportedScalaVersions()} - */ + @Deprecated String scala35(); /** @@ -146,16 +144,16 @@ static Scalafix fetchAndClassloadInstance(String requestedScalaVersion, List