From eeeadfaabee0a8dcbc167a3cc592ad8b9601549e Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Tue, 23 Apr 2024 23:13:18 +0200 Subject: [PATCH 1/5] drop sbt 1.3.x support --- build.sbt | 6 ++++-- src/main/scala/sbt/internal/sbtscalafix/JLineAccess.scala | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index c6e8f114..3b4af4a6 100644 --- a/build.sbt +++ b/build.sbt @@ -48,7 +48,7 @@ libraryDependencies ++= List( scalaVersion := "2.12.20" // keep this as low as possible to avoid running into binary incompatibility such as https://github.com/sbt/sbt/issues/5049 -pluginCrossBuild / sbtVersion := "1.3.1" +pluginCrossBuild / sbtVersion := "1.4.0" scriptedSbt := { val jdk = System.getProperty("java.specification.version").toDouble @@ -56,7 +56,9 @@ scriptedSbt := { if (jdk >= 21) "1.9.0" // first release that supports JDK21 else - "1.3.3" // get https://github.com/sbt/sbt/issues/1673 to avoid race conditions + // https://github.com/sbt/sbt/commit/3b9b200 + // 1.4.[0-2] force batch mode which is not compatible with custom build.properties + "1.4.3" } libraryDependencies += compilerPlugin(scalafixSemanticdb) diff --git a/src/main/scala/sbt/internal/sbtscalafix/JLineAccess.scala b/src/main/scala/sbt/internal/sbtscalafix/JLineAccess.scala index 327e6cb2..ff547574 100644 --- a/src/main/scala/sbt/internal/sbtscalafix/JLineAccess.scala +++ b/src/main/scala/sbt/internal/sbtscalafix/JLineAccess.scala @@ -2,5 +2,5 @@ package sbt.internal.sbtscalafix /** Helper class to access sbt's JLine instance */ object JLineAccess { - def terminalWidth: Int = sbt.internal.util.JLine.usingTerminal(_.getWidth) + def terminalWidth: Int = sbt.internal.util.Terminal.get.getWidth } From b238358fb9c52461972b1478e4c74b84aa9d4a96 Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Tue, 23 Apr 2024 23:14:14 +0200 Subject: [PATCH 2/5] remove sbt 1.3 workarounds --- src/main/scala/scalafix/sbt/ScalafixEnable.scala | 8 +------- src/main/scala/scalafix/sbt/ScalafixPlugin.scala | 4 +--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main/scala/scalafix/sbt/ScalafixEnable.scala b/src/main/scala/scalafix/sbt/ScalafixEnable.scala index 2f390b4d..8e071a57 100644 --- a/src/main/scala/scalafix/sbt/ScalafixEnable.scala +++ b/src/main/scala/scalafix/sbt/ScalafixEnable.scala @@ -172,13 +172,7 @@ object ScalafixEnable { ) } } - } ++ Seq( - semanticdbEnabled := true, - // support sbt 1.3.[0-3] which does not contain - // https://github.com/sbt/sbt/pull/5202 - (semanticdbCompilerPlugin := semanticdbCompilerPlugin.value - .withRevision((semanticdbVersion).value)) - ) + } :+ (semanticdbEnabled := true) settings <- inScope(ThisScope.copy(project = Select(project.ref)))( scalacOptionsSettings ++ enableSemanticdbPlugin diff --git a/src/main/scala/scalafix/sbt/ScalafixPlugin.scala b/src/main/scala/scalafix/sbt/ScalafixPlugin.scala index cc1b44ba..638a41f9 100644 --- a/src/main/scala/scalafix/sbt/ScalafixPlugin.scala +++ b/src/main/scala/scalafix/sbt/ScalafixPlugin.scala @@ -229,9 +229,7 @@ object ScalafixPlugin extends AutoPlugin { Def.settings( Defaults.configSettings, sourcesInBase := false, - // local copy of https://github.com/sbt/sbt/blob/e4231ac03903e174bc9975ee00d34064a1d1f373/main/src/main/scala/sbt/Keys.scala#L400 - // so that it does not break on sbt version below 1.4.0 - SettingKey[Boolean]("bspEnabled") := false + bspEnabled := false ) ), update := { From f93b28028178798f38ce3acd28bc909cf81b76f6 Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Tue, 23 Apr 2024 23:14:37 +0200 Subject: [PATCH 3/5] leverage sbt 1.4 APIs --- .../scala/scalafix/sbt/ScalafixPlugin.scala | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/src/main/scala/scalafix/sbt/ScalafixPlugin.scala b/src/main/scala/scalafix/sbt/ScalafixPlugin.scala index 638a41f9..9a04919e 100644 --- a/src/main/scala/scalafix/sbt/ScalafixPlugin.scala +++ b/src/main/scala/scalafix/sbt/ScalafixPlugin.scala @@ -655,11 +655,11 @@ object ScalafixPlugin extends AutoPlugin { ): Unit = implicitly[JsonWriter[A]].write(obj, builder) } - // we actually don't need to read anything back, see https://github.com/sbt/sbt/pull/5513 + // implicit conversion of collection is only available on JsonFormat implicit val argFormat = liftFormat(argWriter) def diffWithPreviousRuns[T](f: (Boolean, Set[File]) => T): T = { - val tracker = Tracked.inputChanged(streams.cacheDirectory / "args") { + val tracker = Tracked.inputChangedW(streams.cacheDirectory / "args") { (argsChanged: Boolean, _: Seq[Arg.CacheKey]) => val targets = paths.map(_.toFile).toSet @@ -738,21 +738,14 @@ object ScalafixPlugin extends AutoPlugin { shellArgs: ShellArgs, config: ConfigKey ): Def.Initialize[Task[Seq[Path]]] = - Def.taskDyn { - // Dynamic task to avoid redundantly computing `unmanagedSources.value` - if (shellArgs.files.nonEmpty) { - Def.task { - shellArgs.files.map(file(_).toPath) - } - } else { - Def.task { - for { - source <- (config / scalafix / unmanagedSources).value - if source.exists() - if isScalaFile(source) - } yield source.toPath - } - } + Def.taskIf { + if (shellArgs.files.nonEmpty) shellArgs.files.map(file(_).toPath) + else + for { + source <- (config / scalafix / unmanagedSources).value + if source.exists() + if isScalaFile(source) + } yield source.toPath } private[sbt] val relaxScalacOptionsConfigSettings: Seq[Def.Setting[_]] = From 0ccbddd53b803d5e097741c1cf5a3275bb30efa9 Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Tue, 23 Apr 2024 23:16:10 +0200 Subject: [PATCH 4/5] run sbt 1.4+ scripted like the others --- src/sbt-test/sbt-1.4/build-lint/project/build.properties | 1 - src/sbt-test/{sbt-1.4 => sbt-scalafix}/build-lint/build.sbt | 0 .../{sbt-1.4 => sbt-scalafix}/build-lint/project/plugins.sbt | 0 src/sbt-test/{sbt-1.4 => sbt-scalafix}/build-lint/test | 0 4 files changed, 1 deletion(-) delete mode 100644 src/sbt-test/sbt-1.4/build-lint/project/build.properties rename src/sbt-test/{sbt-1.4 => sbt-scalafix}/build-lint/build.sbt (100%) rename src/sbt-test/{sbt-1.4 => sbt-scalafix}/build-lint/project/plugins.sbt (100%) rename src/sbt-test/{sbt-1.4 => sbt-scalafix}/build-lint/test (100%) diff --git a/src/sbt-test/sbt-1.4/build-lint/project/build.properties b/src/sbt-test/sbt-1.4/build-lint/project/build.properties deleted file mode 100644 index dbae93bc..00000000 --- a/src/sbt-test/sbt-1.4/build-lint/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.4.9 diff --git a/src/sbt-test/sbt-1.4/build-lint/build.sbt b/src/sbt-test/sbt-scalafix/build-lint/build.sbt similarity index 100% rename from src/sbt-test/sbt-1.4/build-lint/build.sbt rename to src/sbt-test/sbt-scalafix/build-lint/build.sbt diff --git a/src/sbt-test/sbt-1.4/build-lint/project/plugins.sbt b/src/sbt-test/sbt-scalafix/build-lint/project/plugins.sbt similarity index 100% rename from src/sbt-test/sbt-1.4/build-lint/project/plugins.sbt rename to src/sbt-test/sbt-scalafix/build-lint/project/plugins.sbt diff --git a/src/sbt-test/sbt-1.4/build-lint/test b/src/sbt-test/sbt-scalafix/build-lint/test similarity index 100% rename from src/sbt-test/sbt-1.4/build-lint/test rename to src/sbt-test/sbt-scalafix/build-lint/test From 8a264aacdf27be213b923ba4e3687005bc1179a1 Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Wed, 24 Apr 2024 18:45:25 +0200 Subject: [PATCH 5/5] parallelize scripted scriptedBatchExecution effectively ignores custom build.properties, so this takes a different approach, running one sbt version per execution, spread over JDK versions for simplicity. --- .github/workflows/ci.yml | 14 +++++++++++--- build.sbt | 9 ++++----- .../cross-build-scala3/project/build.properties | 1 - src/sbt-test/sbt-1.5/scala-3/build.sbt | 1 - .../sbt-1.5/scala-3/project/build.properties | 1 - .../scalafixEnable/project/build.properties | 1 - .../sbt-1.5/testkit/project/build.properties | 1 - .../scalafixResolvers/.env | 0 .../scalafixResolvers/build.sbt | 0 .../scalafixResolvers/project/plugins.sbt | 0 .../scalafixResolvers/test | 0 .../cross-build-scala3/.scalafix-2.conf | 0 .../cross-build-scala3/.scalafix-3.conf | 0 .../cross-build-scala3/build.sbt | 0 .../cross-build-scala3/project/plugins.sbt | 0 .../cross-build-scala3/src/main/scala-2/Main.scala | 0 .../src/main/scala-2/Main.scala.expected | 0 .../cross-build-scala3/src/main/scala-3/Main.scala | 0 .../src/main/scala-3/Main.scala.expected | 0 .../cross-build-scala3/test | 0 src/sbt-test/skip-sbt1.4/scala-3/build.sbt | 1 + .../scala-3/project/plugins.sbt | 0 .../src/main/scala/SignificantIndentation.scala | 0 src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scala-3/test | 0 .../scalafixEnable/build.sbt | 2 +- .../scalafixEnable/project/plugins.sbt | 0 .../scala210/src/main/scala/Main.scala | 0 .../scala211/src/main/scala/Main.scala | 0 .../scala212/src/main/scala/Main.scala | 0 .../src/main/scala/SignificantIndentation.scala | 0 .../{sbt-1.5 => skip-sbt1.4}/scalafixEnable/test | 0 .../{sbt-1.5 => skip-sbt1.4}/testkit/build.sbt | 2 +- .../input/src/main/scala-2.13/fix/Source3.scala | 0 .../input/src/main/scala/fix/SemanticBasic.scala | 0 .../output/src/main/scala-2.13/fix/Source3.scala | 0 .../output/src/main/scala/fix/SemanticBasic.scala | 0 .../testkit/project/TargetAxis.scala | 0 .../testkit/project/plugins.sbt | 0 .../resources/META-INF/services/scalafix.v1.Rule | 0 .../rules/src/main/scala/fix/Semantic.scala | 0 src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/test | 0 .../src/test/scala/fix/InputOutputSuite.scala | 0 42 files changed, 18 insertions(+), 15 deletions(-) delete mode 100644 src/sbt-test/sbt-1.5/cross-build-scala3/project/build.properties delete mode 100644 src/sbt-test/sbt-1.5/scala-3/build.sbt delete mode 100644 src/sbt-test/sbt-1.5/scala-3/project/build.properties delete mode 100644 src/sbt-test/sbt-1.5/scalafixEnable/project/build.properties delete mode 100644 src/sbt-test/sbt-1.5/testkit/project/build.properties rename src/sbt-test/{skip-java17 => skip-java17+}/scalafixResolvers/.env (100%) rename src/sbt-test/{skip-java17 => skip-java17+}/scalafixResolvers/build.sbt (100%) rename src/sbt-test/{skip-java17 => skip-java17+}/scalafixResolvers/project/plugins.sbt (100%) rename src/sbt-test/{skip-java17 => skip-java17+}/scalafixResolvers/test (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/cross-build-scala3/.scalafix-2.conf (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/cross-build-scala3/.scalafix-3.conf (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/cross-build-scala3/build.sbt (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/cross-build-scala3/project/plugins.sbt (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/cross-build-scala3/src/main/scala-2/Main.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/cross-build-scala3/src/main/scala-2/Main.scala.expected (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/cross-build-scala3/src/main/scala-3/Main.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/cross-build-scala3/src/main/scala-3/Main.scala.expected (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/cross-build-scala3/test (100%) create mode 100644 src/sbt-test/skip-sbt1.4/scala-3/build.sbt rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scala-3/project/plugins.sbt (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scala-3/src/main/scala/SignificantIndentation.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scala-3/test (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scalafixEnable/build.sbt (89%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scalafixEnable/project/plugins.sbt (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scalafixEnable/scala210/src/main/scala/Main.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scalafixEnable/scala211/src/main/scala/Main.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scalafixEnable/scala212/src/main/scala/Main.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scalafixEnable/scala3/src/main/scala/SignificantIndentation.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/scalafixEnable/test (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/build.sbt (98%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/input/src/main/scala-2.13/fix/Source3.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/input/src/main/scala/fix/SemanticBasic.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/output/src/main/scala-2.13/fix/Source3.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/output/src/main/scala/fix/SemanticBasic.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/project/TargetAxis.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/project/plugins.sbt (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/rules/src/main/resources/META-INF/services/scalafix.v1.Rule (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/rules/src/main/scala/fix/Semantic.scala (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/test (100%) rename src/sbt-test/{sbt-1.5 => skip-sbt1.4}/testkit/tests/src/test/scala/fix/InputOutputSuite.scala (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f4218b9..ffade04d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,7 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: temurin:8 + - run: rm -rf src/sbt-test/skip-sbt1.4 - run: sbt test scripted jdk11: name: JDK11 tests @@ -22,6 +23,7 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: temurin:11 + - run: rm -rf src/sbt-test/skip-sbt1.4 - run: sbt test scripted jdk17: name: JDK17 tests @@ -31,7 +33,10 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: temurin:17 - - run: sbt "test; scripted sbt-*/* skip-windows/*" + - run: rm -rf src/sbt-test/skip-java17+ + - run: rm -rf src/sbt-test/skip-sbt1.4 + - run: sbt test scripted + jdk21: name: JDK21 tests runs-on: ubuntu-latest @@ -40,14 +45,17 @@ jobs: - uses: coursier/setup-action@v1 with: jvm: temurin:21 - - run: sbt "test; scripted sbt-scalafix/* skip-windows/*" + - run: rm -rf src/sbt-test/skip-java17+ + - run: sbt test scripted windows: name: Windows tests runs-on: windows-latest steps: - uses: actions/checkout@v4 - uses: coursier/setup-action@v1 - - run: sbt ci-windows + - run: rm -r -fo src\sbt-test\skip-sbt1.4 + - run: rm -r -fo src\sbt-test\skip-windows + - run: sbt test-skip-windows scripted shell: bash checks: name: Scalafmt diff --git a/build.sbt b/build.sbt index 3b4af4a6..7a4ec6e2 100644 --- a/build.sbt +++ b/build.sbt @@ -31,9 +31,8 @@ developers := List( ) ) -commands += Command.command("ci-windows") { s => +commands += Command.command("test-skip-windows") { s => "testOnly -- -l SkipWindows" :: - "scripted sbt-*/*" :: s } @@ -56,9 +55,7 @@ scriptedSbt := { if (jdk >= 21) "1.9.0" // first release that supports JDK21 else - // https://github.com/sbt/sbt/commit/3b9b200 - // 1.4.[0-2] force batch mode which is not compatible with custom build.properties - "1.4.3" + (pluginCrossBuild / sbtVersion).value } libraryDependencies += compilerPlugin(scalafixSemanticdb) @@ -75,6 +72,8 @@ scalacOptions ++= List( enablePlugins(ScriptedPlugin) sbtPlugin := true scriptedBufferLog := false +scriptedBatchExecution := true +scriptedParallelInstances := 2 scriptedLaunchOpts ++= Seq( "-Xmx2048M", s"-Dplugin.version=${version.value}", diff --git a/src/sbt-test/sbt-1.5/cross-build-scala3/project/build.properties b/src/sbt-test/sbt-1.5/cross-build-scala3/project/build.properties deleted file mode 100644 index e64c208f..00000000 --- a/src/sbt-test/sbt-1.5/cross-build-scala3/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.5.8 diff --git a/src/sbt-test/sbt-1.5/scala-3/build.sbt b/src/sbt-test/sbt-1.5/scala-3/build.sbt deleted file mode 100644 index f34bf3c7..00000000 --- a/src/sbt-test/sbt-1.5/scala-3/build.sbt +++ /dev/null @@ -1 +0,0 @@ -scalaVersion := "3.0.0-RC3" diff --git a/src/sbt-test/sbt-1.5/scala-3/project/build.properties b/src/sbt-test/sbt-1.5/scala-3/project/build.properties deleted file mode 100644 index e64c208f..00000000 --- a/src/sbt-test/sbt-1.5/scala-3/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.5.8 diff --git a/src/sbt-test/sbt-1.5/scalafixEnable/project/build.properties b/src/sbt-test/sbt-1.5/scalafixEnable/project/build.properties deleted file mode 100644 index e64c208f..00000000 --- a/src/sbt-test/sbt-1.5/scalafixEnable/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.5.8 diff --git a/src/sbt-test/sbt-1.5/testkit/project/build.properties b/src/sbt-test/sbt-1.5/testkit/project/build.properties deleted file mode 100644 index e64c208f..00000000 --- a/src/sbt-test/sbt-1.5/testkit/project/build.properties +++ /dev/null @@ -1 +0,0 @@ -sbt.version=1.5.8 diff --git a/src/sbt-test/skip-java17/scalafixResolvers/.env b/src/sbt-test/skip-java17+/scalafixResolvers/.env similarity index 100% rename from src/sbt-test/skip-java17/scalafixResolvers/.env rename to src/sbt-test/skip-java17+/scalafixResolvers/.env diff --git a/src/sbt-test/skip-java17/scalafixResolvers/build.sbt b/src/sbt-test/skip-java17+/scalafixResolvers/build.sbt similarity index 100% rename from src/sbt-test/skip-java17/scalafixResolvers/build.sbt rename to src/sbt-test/skip-java17+/scalafixResolvers/build.sbt diff --git a/src/sbt-test/skip-java17/scalafixResolvers/project/plugins.sbt b/src/sbt-test/skip-java17+/scalafixResolvers/project/plugins.sbt similarity index 100% rename from src/sbt-test/skip-java17/scalafixResolvers/project/plugins.sbt rename to src/sbt-test/skip-java17+/scalafixResolvers/project/plugins.sbt diff --git a/src/sbt-test/skip-java17/scalafixResolvers/test b/src/sbt-test/skip-java17+/scalafixResolvers/test similarity index 100% rename from src/sbt-test/skip-java17/scalafixResolvers/test rename to src/sbt-test/skip-java17+/scalafixResolvers/test diff --git a/src/sbt-test/sbt-1.5/cross-build-scala3/.scalafix-2.conf b/src/sbt-test/skip-sbt1.4/cross-build-scala3/.scalafix-2.conf similarity index 100% rename from src/sbt-test/sbt-1.5/cross-build-scala3/.scalafix-2.conf rename to src/sbt-test/skip-sbt1.4/cross-build-scala3/.scalafix-2.conf diff --git a/src/sbt-test/sbt-1.5/cross-build-scala3/.scalafix-3.conf b/src/sbt-test/skip-sbt1.4/cross-build-scala3/.scalafix-3.conf similarity index 100% rename from src/sbt-test/sbt-1.5/cross-build-scala3/.scalafix-3.conf rename to src/sbt-test/skip-sbt1.4/cross-build-scala3/.scalafix-3.conf diff --git a/src/sbt-test/sbt-1.5/cross-build-scala3/build.sbt b/src/sbt-test/skip-sbt1.4/cross-build-scala3/build.sbt similarity index 100% rename from src/sbt-test/sbt-1.5/cross-build-scala3/build.sbt rename to src/sbt-test/skip-sbt1.4/cross-build-scala3/build.sbt diff --git a/src/sbt-test/sbt-1.5/cross-build-scala3/project/plugins.sbt b/src/sbt-test/skip-sbt1.4/cross-build-scala3/project/plugins.sbt similarity index 100% rename from src/sbt-test/sbt-1.5/cross-build-scala3/project/plugins.sbt rename to src/sbt-test/skip-sbt1.4/cross-build-scala3/project/plugins.sbt diff --git a/src/sbt-test/sbt-1.5/cross-build-scala3/src/main/scala-2/Main.scala b/src/sbt-test/skip-sbt1.4/cross-build-scala3/src/main/scala-2/Main.scala similarity index 100% rename from src/sbt-test/sbt-1.5/cross-build-scala3/src/main/scala-2/Main.scala rename to src/sbt-test/skip-sbt1.4/cross-build-scala3/src/main/scala-2/Main.scala diff --git a/src/sbt-test/sbt-1.5/cross-build-scala3/src/main/scala-2/Main.scala.expected b/src/sbt-test/skip-sbt1.4/cross-build-scala3/src/main/scala-2/Main.scala.expected similarity index 100% rename from src/sbt-test/sbt-1.5/cross-build-scala3/src/main/scala-2/Main.scala.expected rename to src/sbt-test/skip-sbt1.4/cross-build-scala3/src/main/scala-2/Main.scala.expected diff --git a/src/sbt-test/sbt-1.5/cross-build-scala3/src/main/scala-3/Main.scala b/src/sbt-test/skip-sbt1.4/cross-build-scala3/src/main/scala-3/Main.scala similarity index 100% rename from src/sbt-test/sbt-1.5/cross-build-scala3/src/main/scala-3/Main.scala rename to src/sbt-test/skip-sbt1.4/cross-build-scala3/src/main/scala-3/Main.scala diff --git a/src/sbt-test/sbt-1.5/cross-build-scala3/src/main/scala-3/Main.scala.expected b/src/sbt-test/skip-sbt1.4/cross-build-scala3/src/main/scala-3/Main.scala.expected similarity index 100% rename from src/sbt-test/sbt-1.5/cross-build-scala3/src/main/scala-3/Main.scala.expected rename to src/sbt-test/skip-sbt1.4/cross-build-scala3/src/main/scala-3/Main.scala.expected diff --git a/src/sbt-test/sbt-1.5/cross-build-scala3/test b/src/sbt-test/skip-sbt1.4/cross-build-scala3/test similarity index 100% rename from src/sbt-test/sbt-1.5/cross-build-scala3/test rename to src/sbt-test/skip-sbt1.4/cross-build-scala3/test diff --git a/src/sbt-test/skip-sbt1.4/scala-3/build.sbt b/src/sbt-test/skip-sbt1.4/scala-3/build.sbt new file mode 100644 index 00000000..5d620df2 --- /dev/null +++ b/src/sbt-test/skip-sbt1.4/scala-3/build.sbt @@ -0,0 +1 @@ +scalaVersion := "3.3.1" diff --git a/src/sbt-test/sbt-1.5/scala-3/project/plugins.sbt b/src/sbt-test/skip-sbt1.4/scala-3/project/plugins.sbt similarity index 100% rename from src/sbt-test/sbt-1.5/scala-3/project/plugins.sbt rename to src/sbt-test/skip-sbt1.4/scala-3/project/plugins.sbt diff --git a/src/sbt-test/sbt-1.5/scala-3/src/main/scala/SignificantIndentation.scala b/src/sbt-test/skip-sbt1.4/scala-3/src/main/scala/SignificantIndentation.scala similarity index 100% rename from src/sbt-test/sbt-1.5/scala-3/src/main/scala/SignificantIndentation.scala rename to src/sbt-test/skip-sbt1.4/scala-3/src/main/scala/SignificantIndentation.scala diff --git a/src/sbt-test/sbt-1.5/scala-3/test b/src/sbt-test/skip-sbt1.4/scala-3/test similarity index 100% rename from src/sbt-test/sbt-1.5/scala-3/test rename to src/sbt-test/skip-sbt1.4/scala-3/test diff --git a/src/sbt-test/sbt-1.5/scalafixEnable/build.sbt b/src/sbt-test/skip-sbt1.4/scalafixEnable/build.sbt similarity index 89% rename from src/sbt-test/sbt-1.5/scalafixEnable/build.sbt rename to src/sbt-test/skip-sbt1.4/scalafixEnable/build.sbt index 93274b51..020de2d3 100644 --- a/src/sbt-test/sbt-1.5/scalafixEnable/build.sbt +++ b/src/sbt-test/skip-sbt1.4/scalafixEnable/build.sbt @@ -21,5 +21,5 @@ lazy val scala212 = project lazy val scala3 = project .in(file("scala3")) .settings( - scalaVersion := "3.0.0-RC3" // built-in support for semanticdb + scalaVersion := "3.3.1" // built-in support for semanticdb ) diff --git a/src/sbt-test/sbt-1.5/scalafixEnable/project/plugins.sbt b/src/sbt-test/skip-sbt1.4/scalafixEnable/project/plugins.sbt similarity index 100% rename from src/sbt-test/sbt-1.5/scalafixEnable/project/plugins.sbt rename to src/sbt-test/skip-sbt1.4/scalafixEnable/project/plugins.sbt diff --git a/src/sbt-test/sbt-1.5/scalafixEnable/scala210/src/main/scala/Main.scala b/src/sbt-test/skip-sbt1.4/scalafixEnable/scala210/src/main/scala/Main.scala similarity index 100% rename from src/sbt-test/sbt-1.5/scalafixEnable/scala210/src/main/scala/Main.scala rename to src/sbt-test/skip-sbt1.4/scalafixEnable/scala210/src/main/scala/Main.scala diff --git a/src/sbt-test/sbt-1.5/scalafixEnable/scala211/src/main/scala/Main.scala b/src/sbt-test/skip-sbt1.4/scalafixEnable/scala211/src/main/scala/Main.scala similarity index 100% rename from src/sbt-test/sbt-1.5/scalafixEnable/scala211/src/main/scala/Main.scala rename to src/sbt-test/skip-sbt1.4/scalafixEnable/scala211/src/main/scala/Main.scala diff --git a/src/sbt-test/sbt-1.5/scalafixEnable/scala212/src/main/scala/Main.scala b/src/sbt-test/skip-sbt1.4/scalafixEnable/scala212/src/main/scala/Main.scala similarity index 100% rename from src/sbt-test/sbt-1.5/scalafixEnable/scala212/src/main/scala/Main.scala rename to src/sbt-test/skip-sbt1.4/scalafixEnable/scala212/src/main/scala/Main.scala diff --git a/src/sbt-test/sbt-1.5/scalafixEnable/scala3/src/main/scala/SignificantIndentation.scala b/src/sbt-test/skip-sbt1.4/scalafixEnable/scala3/src/main/scala/SignificantIndentation.scala similarity index 100% rename from src/sbt-test/sbt-1.5/scalafixEnable/scala3/src/main/scala/SignificantIndentation.scala rename to src/sbt-test/skip-sbt1.4/scalafixEnable/scala3/src/main/scala/SignificantIndentation.scala diff --git a/src/sbt-test/sbt-1.5/scalafixEnable/test b/src/sbt-test/skip-sbt1.4/scalafixEnable/test similarity index 100% rename from src/sbt-test/sbt-1.5/scalafixEnable/test rename to src/sbt-test/skip-sbt1.4/scalafixEnable/test diff --git a/src/sbt-test/sbt-1.5/testkit/build.sbt b/src/sbt-test/skip-sbt1.4/testkit/build.sbt similarity index 98% rename from src/sbt-test/sbt-1.5/testkit/build.sbt rename to src/sbt-test/skip-sbt1.4/testkit/build.sbt index 0b242a25..e080f726 100644 --- a/src/sbt-test/sbt-1.5/testkit/build.sbt +++ b/src/sbt-test/skip-sbt1.4/testkit/build.sbt @@ -1,7 +1,7 @@ lazy val V = _root_.scalafix.sbt.BuildInfo lazy val rulesCrossVersions = Seq(V.scala213, V.scala212) -lazy val scala3Version = "3.0.0" +lazy val scala3Version = "3.3.1" inThisBuild( List( diff --git a/src/sbt-test/sbt-1.5/testkit/input/src/main/scala-2.13/fix/Source3.scala b/src/sbt-test/skip-sbt1.4/testkit/input/src/main/scala-2.13/fix/Source3.scala similarity index 100% rename from src/sbt-test/sbt-1.5/testkit/input/src/main/scala-2.13/fix/Source3.scala rename to src/sbt-test/skip-sbt1.4/testkit/input/src/main/scala-2.13/fix/Source3.scala diff --git a/src/sbt-test/sbt-1.5/testkit/input/src/main/scala/fix/SemanticBasic.scala b/src/sbt-test/skip-sbt1.4/testkit/input/src/main/scala/fix/SemanticBasic.scala similarity index 100% rename from src/sbt-test/sbt-1.5/testkit/input/src/main/scala/fix/SemanticBasic.scala rename to src/sbt-test/skip-sbt1.4/testkit/input/src/main/scala/fix/SemanticBasic.scala diff --git a/src/sbt-test/sbt-1.5/testkit/output/src/main/scala-2.13/fix/Source3.scala b/src/sbt-test/skip-sbt1.4/testkit/output/src/main/scala-2.13/fix/Source3.scala similarity index 100% rename from src/sbt-test/sbt-1.5/testkit/output/src/main/scala-2.13/fix/Source3.scala rename to src/sbt-test/skip-sbt1.4/testkit/output/src/main/scala-2.13/fix/Source3.scala diff --git a/src/sbt-test/sbt-1.5/testkit/output/src/main/scala/fix/SemanticBasic.scala b/src/sbt-test/skip-sbt1.4/testkit/output/src/main/scala/fix/SemanticBasic.scala similarity index 100% rename from src/sbt-test/sbt-1.5/testkit/output/src/main/scala/fix/SemanticBasic.scala rename to src/sbt-test/skip-sbt1.4/testkit/output/src/main/scala/fix/SemanticBasic.scala diff --git a/src/sbt-test/sbt-1.5/testkit/project/TargetAxis.scala b/src/sbt-test/skip-sbt1.4/testkit/project/TargetAxis.scala similarity index 100% rename from src/sbt-test/sbt-1.5/testkit/project/TargetAxis.scala rename to src/sbt-test/skip-sbt1.4/testkit/project/TargetAxis.scala diff --git a/src/sbt-test/sbt-1.5/testkit/project/plugins.sbt b/src/sbt-test/skip-sbt1.4/testkit/project/plugins.sbt similarity index 100% rename from src/sbt-test/sbt-1.5/testkit/project/plugins.sbt rename to src/sbt-test/skip-sbt1.4/testkit/project/plugins.sbt diff --git a/src/sbt-test/sbt-1.5/testkit/rules/src/main/resources/META-INF/services/scalafix.v1.Rule b/src/sbt-test/skip-sbt1.4/testkit/rules/src/main/resources/META-INF/services/scalafix.v1.Rule similarity index 100% rename from src/sbt-test/sbt-1.5/testkit/rules/src/main/resources/META-INF/services/scalafix.v1.Rule rename to src/sbt-test/skip-sbt1.4/testkit/rules/src/main/resources/META-INF/services/scalafix.v1.Rule diff --git a/src/sbt-test/sbt-1.5/testkit/rules/src/main/scala/fix/Semantic.scala b/src/sbt-test/skip-sbt1.4/testkit/rules/src/main/scala/fix/Semantic.scala similarity index 100% rename from src/sbt-test/sbt-1.5/testkit/rules/src/main/scala/fix/Semantic.scala rename to src/sbt-test/skip-sbt1.4/testkit/rules/src/main/scala/fix/Semantic.scala diff --git a/src/sbt-test/sbt-1.5/testkit/test b/src/sbt-test/skip-sbt1.4/testkit/test similarity index 100% rename from src/sbt-test/sbt-1.5/testkit/test rename to src/sbt-test/skip-sbt1.4/testkit/test diff --git a/src/sbt-test/sbt-1.5/testkit/tests/src/test/scala/fix/InputOutputSuite.scala b/src/sbt-test/skip-sbt1.4/testkit/tests/src/test/scala/fix/InputOutputSuite.scala similarity index 100% rename from src/sbt-test/sbt-1.5/testkit/tests/src/test/scala/fix/InputOutputSuite.scala rename to src/sbt-test/skip-sbt1.4/testkit/tests/src/test/scala/fix/InputOutputSuite.scala