From d4afcd1ced21490966973317abf02dadbe5830cc Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Mon, 4 Nov 2024 22:28:52 +0100 Subject: [PATCH] build with and test against Scala 3.6 Keep building for Scala 3.5 until the next minor version for backward compatibility. --- project/Dependencies.scala | 8 ++++++-- project/ScalafixBuild.scala | 4 +++- .../src/main/java/scalafix/interfaces/Scalafix.java | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 650111d8c..1991fade5 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -7,8 +7,12 @@ import sbt._ object Dependencies { val scala212 = sys.props.getOrElse("scala212.nightly", "2.12.20") val scala213 = sys.props.getOrElse("scala213.nightly", "2.13.15") - val scala3Next = sys.props.getOrElse("scala3.nightly", "3.5.1") - val scala3LTS = "3.3.4" + val scala36 = sys.props.getOrElse("scala3.nightly", "3.6.0") + val scala35 = "3.5.1" + val scala33 = "3.3.4" + + val scala3Next = scala36 + val scala3LTS = scala33 val bijectionCoreV = "0.9.7" val collectionCompatV = "2.12.0" diff --git a/project/ScalafixBuild.scala b/project/ScalafixBuild.scala index d72d67897..ecbc513d5 100644 --- a/project/ScalafixBuild.scala +++ b/project/ScalafixBuild.scala @@ -33,7 +33,8 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { // https://github.com/scalameta/scalameta/issues/2485 lazy val coreScalaVersions = Seq(scala212, scala213) - lazy val cliScalaVersions = Seq(scala212, scala213, scala3LTS, scala3Next) + lazy val cliScalaVersions = + Seq(scala212, scala213, scala33, scala35, scala36) lazy val cliScalaVersionsWithTargets: Seq[(String, TargetAxis)] = cliScalaVersions.map(sv => (sv, TargetAxis(sv))) ++ Seq(scala213, scala212).flatMap { sv => @@ -279,6 +280,7 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { Compile / console / scalacOptions := compilerOptions.value :+ "-Yrepl-class-based", Compile / doc / scalacOptions ++= scaladocOptions, + // TODO: tweak unmanagedSourceDirectories to support scala-3.3 directory // Don't package sources & docs when publishing locally as it adds a significant // overhead when testing because of publishLocalTransitive. Tweaking publishArtifact // would more readable, but it would also affect remote (sonatype) publishing. diff --git a/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java b/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java index a8059e6ed..d51fa2c3b 100644 --- a/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java +++ b/scalafix-interfaces/src/main/java/scalafix/interfaces/Scalafix.java @@ -135,6 +135,7 @@ static Scalafix fetchAndClassloadInstance(String requestedScalaVersion, List