From 874f680a14cf0bb5985d8e32d9040745ae31104c Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Mon, 28 Apr 2025 12:14:13 +0200 Subject: [PATCH 1/6] Update `runner` & `test-runner` to Scala 3.3 LTS --- project/deps.sc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/project/deps.sc b/project/deps.sc index 78d5c22135..eff63ff19b 100644 --- a/project/deps.sc +++ b/project/deps.sc @@ -3,11 +3,11 @@ import mill._ import scalalib._ object Scala { - def scala212 = "2.12.20" - def scala213 = "2.13.16" - def runnerScala3 = "3.0.2" // the newest version that is compatible with all Scala 3.x versions - def scala3LtsPrefix = "3.3" // used for the LTS version tags + def scala212 = "2.12.20" + def scala213 = "2.13.16" + def scala3LtsPrefix = "3.3" // used for the LTS version tags def scala3Lts = s"$scala3LtsPrefix.5" // the LTS version currently used in the build + def runnerScala3 = scala3Lts def scala3NextPrefix = "3.7" def scala3Next = s"$scala3NextPrefix.0" // the newest/next version of Scala def scala3NextAnnounced = "3.6.4" // the newest/next version of Scala that's been announced @@ -27,7 +27,7 @@ object Scala { val scala3MainVersions = (defaults ++ allScala3).distinct val mainVersions = (Seq(scala213) ++ scala3MainVersions).distinct val runnerScalaVersions = runnerScala3 +: allScala2 - val testRunnerScalaVersions = runnerScalaVersions ++ allScala3 + val testRunnerScalaVersions = (runnerScalaVersions ++ allScala3).distinct def scalaJs = "1.19.0" def scalaJsCli = scalaJs // this must be compatible with the Scala.js version From 3a1907eb95eb3bde14300eec030702124527350f Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Wed, 30 Apr 2025 13:30:10 +0200 Subject: [PATCH 2/6] Move `coursier` utils to the `core` module --- .../src/main/scala/scala/cli/commands/fmt/FmtOptions.scala | 2 +- .../cli/src/main/scala/scala/cli/commands/repl/Repl.scala | 2 +- modules/cli/src/main/scala/scala/cli/package.scala | 7 ------- modules/core/src/main/scala/scala/build/CsUtils.scala | 5 +++++ 4 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 modules/cli/src/main/scala/scala/cli/package.scala create mode 100644 modules/core/src/main/scala/scala/build/CsUtils.scala diff --git a/modules/cli/src/main/scala/scala/cli/commands/fmt/FmtOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/fmt/FmtOptions.scala index 4045d4df3a..979fe73a65 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/fmt/FmtOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/fmt/FmtOptions.scala @@ -4,6 +4,7 @@ import caseapp.* import coursier.core.Version import scala.build.EitherCps.{either, value} +import scala.build.coursierVersion import scala.build.errors.BuildException import scala.build.internal.FetchExternalBinary import scala.build.options.BuildOptions @@ -16,7 +17,6 @@ import scala.cli.commands.shared.{ SharedOptions } import scala.cli.commands.{Constants, tags} -import scala.cli.coursierVersion import scala.util.Properties // format: off diff --git a/modules/cli/src/main/scala/scala/cli/commands/repl/Repl.scala b/modules/cli/src/main/scala/scala/cli/commands/repl/Repl.scala index 0a1e97f56e..0d9fd788a1 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/repl/Repl.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/repl/Repl.scala @@ -37,7 +37,7 @@ import scala.cli.config.{ConfigDb, Keys} import scala.cli.packaging.Library import scala.cli.util.ArgHelpers.* import scala.cli.util.ConfigDbUtils -import scala.cli.{CurrentParams, ScalaCli, coursierVersion} +import scala.cli.{CurrentParams, ScalaCli} import scala.jdk.CollectionConverters.* import scala.util.Properties diff --git a/modules/cli/src/main/scala/scala/cli/package.scala b/modules/cli/src/main/scala/scala/cli/package.scala deleted file mode 100644 index 96f0dc2a1c..0000000000 --- a/modules/cli/src/main/scala/scala/cli/package.scala +++ /dev/null @@ -1,7 +0,0 @@ -package scala - -import coursier.core.Version - -package object cli { - extension (s: String) def coursierVersion: Version = Version(s) -} diff --git a/modules/core/src/main/scala/scala/build/CsUtils.scala b/modules/core/src/main/scala/scala/build/CsUtils.scala new file mode 100644 index 0000000000..b447b8b2fe --- /dev/null +++ b/modules/core/src/main/scala/scala/build/CsUtils.scala @@ -0,0 +1,5 @@ +package scala.build + +import coursier.core.Version + +extension (s: String) def coursierVersion: Version = Version(s) From 9dbd7ffb9a97e47b15834696002d8e9131ee2e05 Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Wed, 30 Apr 2025 16:52:18 +0200 Subject: [PATCH 3/6] Downgrade the `runner` module dependency when it's added to the classpath for Scala >= 3.0.0 and < current Scala 3 LTS version --- build.sc | 7 ++++- .../scala/scala/cli/commands/run/Run.scala | 2 ++ .../cli/integration/RunTestDefinitions.scala | 14 ++++++++++ .../cli/integration/RunTestsDefault.scala | 19 +++++++++++++ .../main/scala/scala/build/Artifacts.scala | 27 ++++++++++++++++--- project/deps.sc | 18 +++++++++++-- 6 files changed, 80 insertions(+), 7 deletions(-) diff --git a/build.sc b/build.sc index 5f387e1065..56c946b159 100644 --- a/build.sc +++ b/build.sc @@ -1,7 +1,7 @@ import $ivy.`com.lihaoyi::mill-contrib-bloop:$MILL_VERSION` import $ivy.`io.get-coursier::coursier-launcher:2.1.24` import $ivy.`io.github.alexarchambault.mill::mill-native-image-upload:0.1.29` -import $file.project.deps, deps.{Deps, Docker, InternalDeps, Java, Scala, TestDeps} +import $file.project.deps, deps.{Cli, Deps, Docker, InternalDeps, Java, Scala, TestDeps} import $file.project.publish, publish.{ghOrg, ghName, ScalaCliPublishModule, organization} import $file.project.settings, settings.{ CliLaunchers, @@ -454,6 +454,7 @@ trait Core extends ScalaCliCrossSbtModule | def runnerOrganization = "${runner(Scala.runnerScala3).pomSettings().organization}" | def runnerModuleName = "${runner(Scala.runnerScala3).artifactName()}" | def runnerVersion = "${runner(Scala.runnerScala3).publishVersion()}" + | def runnerLegacyVersion = "${Cli.runnerLegacyVersion}" | def runnerMainClass = "$runnerMainClass" | | def semanticDbPluginOrganization = "${Deps.semanticDbScalac.dep.module.organization @@ -1060,6 +1061,9 @@ trait CliIntegration extends SbtModule with ScalaCliPublishModule with HasTests | def maxAmmoniteScala213Version = "${Scala.maxAmmoniteScala213Version}" | def maxAmmoniteScala3Version = "${Scala.maxAmmoniteScala3Version}" | def maxAmmoniteScala3LtsVersion = "${Scala.maxAmmoniteScala3LtsVersion}" + | def legacyScala3Versions = Seq(${Scala.legacyScala3Versions.map(p => + s"\"$p\"" + ).mkString(", ")}) | def scalaJsVersion = "${Scala.scalaJs}" | def scalaJsCliVersion = "${Scala.scalaJsCli}" | def scalaNativeVersion = "${Deps.Versions.scalaNative}" @@ -1069,6 +1073,7 @@ trait CliIntegration extends SbtModule with ScalaCliPublishModule with HasTests | def ammoniteVersion = "${Deps.ammonite.dep.version}" | def defaultGraalVMJavaVersion = "${deps.graalVmJavaVersion}" | def defaultGraalVMVersion = "${deps.graalVmVersion}" + | def runnerLegacyVersion = "${Cli.runnerLegacyVersion}" | def scalaPyVersion = "${Deps.scalaPy.dep.version}" | def scalaPyMaxScalaNative = "${Deps.Versions.maxScalaNativeForScalaPy}" | def bloopVersion = "${Deps.bloopRifle.dep.version}" diff --git a/modules/cli/src/main/scala/scala/cli/commands/run/Run.scala b/modules/cli/src/main/scala/scala/cli/commands/run/Run.scala index 497d9763dd..2a18e2c726 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/run/Run.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/run/Run.scala @@ -16,6 +16,7 @@ import scala.build.errors.{BuildException, CompositeBuildException} import scala.build.input.{Inputs, ScalaCliInvokeData, SubCommand} import scala.build.internal.{Constants, Runner, ScalaJsLinkerConfig} import scala.build.internals.ConsoleUtils.ScalaCliConsole +import scala.build.internals.ConsoleUtils.ScalaCliConsole.warnPrefix import scala.build.internals.EnvVar import scala.build.options.{BuildOptions, JavaOpt, PackageType, Platform, ScalacOpt, Scope} import scala.cli.CurrentParams @@ -103,6 +104,7 @@ object Run extends ScalaCommand[RunOptions] with BuildCommandHelpers { addRunnerDependencyOpt = baseOptions.notForBloopOptions.addRunnerDependencyOpt.orElse { runMode(options) match { case _: RunMode.Spark | RunMode.HadoopJar => + logger.debug(s"$warnPrefix Skipping the runner dependency when running Spark/Hadoop.") Some(false) case RunMode.Default => None } diff --git a/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala b/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala index 0ccfe39612..2b28052df6 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala @@ -2400,4 +2400,18 @@ abstract class RunTestDefinitions expect(res.out.trim() == expectedOutput) } } + + test( + s"run a simple hello world with the runner module on the classpath and Scala $actualScalaVersion" + ) { + val expectedMessage = "Hello, world!" + val legacyRunnerWarning = "Defaulting to a legacy runner module version" + TestInputs(os.rel / "script.sc" -> s"""println("$expectedMessage")""") + .fromRoot { root => + val res = os.proc(TestUtil.cli, "run", ".", "--runner", extraOptions) + .call(cwd = root, stderr = os.Pipe) + expect(res.out.trim() == expectedMessage) + expect(!res.err.trim().contains(legacyRunnerWarning)) + } + } } diff --git a/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala b/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala index 62330214d2..7c8b29eb99 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala @@ -187,4 +187,23 @@ class RunTestsDefault extends RunTestDefinitions } } } + + for { + scalaVersion <- + Constants.legacyScala3Versions.sorted.reverse.distinctBy(_.split('.').take(2).mkString(".")) + expectedMessage = "Hello, world!" + expectedWarning = + s"Defaulting to a legacy runner module version: ${Constants.runnerLegacyVersion}" + } + test( + s"run a simple hello world with the runner module on the classpath and Scala $scalaVersion (legacy)" + ) { + TestInputs(os.rel / "script.sc" -> s"""println("$expectedMessage")""").fromRoot { root => + val res = + os.proc(TestUtil.cli, "run", ".", "-S", scalaVersion, TestUtil.extraOptions, "--runner") + .call(cwd = root, stderr = os.Pipe) + expect(res.out.trim() == expectedMessage) + expect(res.err.trim().contains(expectedWarning)) + } + } } diff --git a/modules/options/src/main/scala/scala/build/Artifacts.scala b/modules/options/src/main/scala/scala/build/Artifacts.scala index 23451ad8c6..2078f4219b 100644 --- a/modules/options/src/main/scala/scala/build/Artifacts.scala +++ b/modules/options/src/main/scala/scala/build/Artifacts.scala @@ -23,6 +23,7 @@ import scala.build.internal.Constants import scala.build.internal.Constants.* import scala.build.internal.CsLoggerUtil.* import scala.build.internal.Util.{PositionedScalaDependencyOps, ScalaModuleOps} +import scala.build.internals.ConsoleUtils.ScalaCliConsole.warnPrefix import scala.collection.mutable final case class Artifacts( @@ -399,18 +400,36 @@ object Artifacts { } val (hasRunner, extraRunnerJars) = - if (scalaOpt.nonEmpty) { + if scalaOpt.nonEmpty then { val addJvmRunner0 = addJvmRunner.getOrElse(false) val runnerJars = - if (addJvmRunner0) { + if addJvmRunner0 then { val maybeSnapshotRepo = - if (runnerVersion.endsWith("SNAPSHOT")) + if runnerVersion.endsWith("SNAPSHOT") then Seq(coursier.Repositories.sonatype("snapshots")) else Nil + val scalaVersion = (for { + scalaArtifactsParams <- scalaArtifactsParamsOpt + scalaParams = scalaArtifactsParams.params + scalaVersion = scalaParams.scalaVersion + } yield scalaVersion).getOrElse(defaultScalaVersion) + val runnerVersion0 = + if scalaVersion.startsWith("3") && + scalaVersion.coursierVersion < s"$scala3LtsPrefix.0".coursierVersion + then { + logger.message( + s"""$warnPrefix Scala $scalaVersion is no longer supported by the runner module. + |$warnPrefix Defaulting to a legacy runner module version: $runnerLegacyVersion. + |$warnPrefix To use the latest runner, upgrade Scala to at least $scala3LtsPrefix.""" + .stripMargin + ) + runnerLegacyVersion + } + else runnerVersion value { artifacts( Seq(Positioned.none( - dep"$runnerOrganization::$runnerModuleName:$runnerVersion,intransitive" + dep"$runnerOrganization::$runnerModuleName:$runnerVersion0,intransitive" )), extraRepositories ++ maybeSnapshotRepo, scalaArtifactsParamsOpt.map(_.params), diff --git a/project/deps.sc b/project/deps.sc index eff63ff19b..826c100578 100644 --- a/project/deps.sc +++ b/project/deps.sc @@ -2,6 +2,10 @@ import Deps.Versions import mill._ import scalalib._ +object Cli { + def runnerLegacyVersion = "1.7.1" // last runner version to support pre-LTS Scala 3 versions +} + object Scala { def scala212 = "2.12.20" def scala213 = "2.13.16" @@ -32,9 +36,13 @@ object Scala { def scalaJs = "1.19.0" def scalaJsCli = scalaJs // this must be compatible with the Scala.js version + private def patchVer(sv: String): Int = + sv.split('.').drop(2).head.takeWhile(_.isDigit).toInt + + private def minorVer(sv: String): Int = + sv.split('.').drop(1).head.takeWhile(_.isDigit).toInt + def listAll: Seq[String] = { - def patchVer(sv: String): Int = - sv.split('.').drop(2).head.takeWhile(_.isDigit).toInt val max212 = patchVer(scala212) val max213 = patchVer(scala213) val max30 = 2 @@ -57,6 +65,12 @@ object Scala { (0 until max37).map(i => s"3.7.$i") ++ Seq(scala3Next) } + def legacyScala3Versions = + listAll + .filter(_.startsWith("3")) + .distinct + .filter(minorVer(_) < minorVer(scala3Lts)) + def maxAmmoniteScala212Version = scala212 def maxAmmoniteScala213Version = scala213 def maxAmmoniteScala3Version = "3.6.3" From 623ff3f9188933380508b404262cbcb8af1748a9 Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Mon, 5 May 2025 10:42:57 +0200 Subject: [PATCH 4/6] Downgrade the `test-runner` module dependency when it's added to the classpath for Scala >= 3.0.0 and < current Scala 3 LTS version --- .../cli/integration/RunTestsDefault.scala | 3 +- .../cli/integration/TestTestsDefault.scala | 37 ++++++++++++++++-- .../scala/cli/integration/TestUtil.scala | 9 +++++ .../main/scala/scala/build/Artifacts.scala | 38 +++++++++++++------ 4 files changed, 69 insertions(+), 18 deletions(-) diff --git a/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala b/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala index 7c8b29eb99..ce7c0fd7c5 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala @@ -189,8 +189,7 @@ class RunTestsDefault extends RunTestDefinitions } for { - scalaVersion <- - Constants.legacyScala3Versions.sorted.reverse.distinctBy(_.split('.').take(2).mkString(".")) + scalaVersion <- TestUtil.legacyScalaVersionsOnePerMinor expectedMessage = "Hello, world!" expectedWarning = s"Defaulting to a legacy runner module version: ${Constants.runnerLegacyVersion}" diff --git a/modules/integration/src/test/scala/scala/cli/integration/TestTestsDefault.scala b/modules/integration/src/test/scala/scala/cli/integration/TestTestsDefault.scala index 9f17e7827f..af36ceecaa 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/TestTestsDefault.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/TestTestsDefault.scala @@ -5,6 +5,7 @@ import com.eed3si9n.expecty.Expecty.expect import java.io.File import scala.cli.integration.Constants.munitVersion +import scala.cli.integration.TestUtil.StringOps class TestTestsDefault extends TestTestDefinitions with TestDefault { test("Pure Java with Scala tests") { @@ -62,11 +63,39 @@ class TestTestsDefault extends TestTestDefinitions with TestDefault { ).fromRoot { root => val output = os.proc(TestUtil.cli, "test", extraOptions, ".", "--cross", "--power") .call(cwd = root).out.text() - def countOccurrences(a: String, b: String): Int = - if (b.isEmpty) 0 // Avoid infinite splitting - else a.sliding(b.length).count(_ == b) expect(output.contains(expectedMessage)) - expect(countOccurrences(output, expectedMessage) == crossVersions.length) + expect(output.countOccurrences(expectedMessage) == crossVersions.length) } } + + for { + scalaVersion <- TestUtil.legacyScalaVersionsOnePerMinor + expectedMessage = "Hello, world!" + expectedWarning = + s"Defaulting to a legacy test-runner module version: ${Constants.runnerLegacyVersion}" + } + test(s"run a simple test with Scala $scalaVersion (legacy)") { + TestInputs(os.rel / "example.test.scala" -> + // using JUnit to work around TASTy and macro incompatibilities + s"""//> using dep com.novocode:junit-interface:0.11 + |import org.junit.Test + | + |class MyTests { + | @Test + | def foo(): Unit = { + | assert(2 + 2 == 4) + | println("$expectedMessage") + | } + |} + |""".stripMargin).fromRoot { root => + val res = + os.proc(TestUtil.cli, "test", ".", "-S", scalaVersion, TestUtil.extraOptions) + .call(cwd = root, stderr = os.Pipe) + val out = res.out.trim() + expect(out.contains(expectedMessage)) + val err = res.err.trim() + expect(err.contains(expectedWarning)) + expect(err.countOccurrences(expectedWarning) == 1) + } + } } diff --git a/modules/integration/src/test/scala/scala/cli/integration/TestUtil.scala b/modules/integration/src/test/scala/scala/cli/integration/TestUtil.scala index c2af7803e1..d212018107 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/TestUtil.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/TestUtil.scala @@ -27,6 +27,9 @@ object TestUtil { val cli: Seq[String] = cliCommand(cliPath) val ltsEqualsNext: Boolean = Constants.scala3Lts equals Constants.scala3Next + lazy val legacyScalaVersionsOnePerMinor: Seq[String] = + Constants.legacyScala3Versions.sorted.reverse.distinctBy(_.split('.').take(2).mkString(".")) + def cliCommand(cliPath: String): Seq[String] = if (isNativeCli) Seq(cliPath) @@ -367,4 +370,10 @@ object TestUtil { Thread.sleep(200L) if (proc.isAlive()) proc.destroyForcibly() } + + implicit class StringOps(a: String) { + def countOccurrences(b: String): Int = + if (b.isEmpty) 0 // Avoid infinite splitting + else a.sliding(b.length).count(_ == b) + } } diff --git a/modules/options/src/main/scala/scala/build/Artifacts.scala b/modules/options/src/main/scala/scala/build/Artifacts.scala index 2078f4219b..66daa72d50 100644 --- a/modules/options/src/main/scala/scala/build/Artifacts.scala +++ b/modules/options/src/main/scala/scala/build/Artifacts.scala @@ -130,11 +130,32 @@ object Artifacts { ): Either[BuildException, Artifacts] = either { val dependencies = defaultDependencies ++ extraDependencies + val scalaVersion = (for { + scalaArtifactsParams <- scalaArtifactsParamsOpt + scalaParams = scalaArtifactsParams.params + scalaVersion = scalaParams.scalaVersion + } yield scalaVersion).getOrElse(defaultScalaVersion) + + val shouldUseLegacyRunners = + scalaVersion.startsWith("3") && + scalaVersion.coursierVersion < s"$scala3LtsPrefix.0".coursierVersion + val jvmTestRunnerDependencies = - if (addJvmTestRunner) - Seq(dep"$testRunnerOrganization::$testRunnerModuleName:$testRunnerVersion") - else - Nil + if addJvmTestRunner then { + val testRunnerVersion0 = + if shouldUseLegacyRunners then { + logger.message( + s"""$warnPrefix Scala $scalaVersion is no longer supported by the test-runner module. + |$warnPrefix Defaulting to a legacy test-runner module version: $runnerLegacyVersion. + |$warnPrefix To use the latest test-runner, upgrade Scala to at least $scala3LtsPrefix.""" + .stripMargin + ) + runnerLegacyVersion + } + else testRunnerVersion + Seq(dep"$testRunnerOrganization::$testRunnerModuleName:$testRunnerVersion0") + } + else Nil val jmhDependencies = addJmhDependencies.toSeq .map(version => dep"${Constants.jmhOrg}:${Constants.jmhGeneratorBytecodeModule}:$version") @@ -408,15 +429,8 @@ object Artifacts { if runnerVersion.endsWith("SNAPSHOT") then Seq(coursier.Repositories.sonatype("snapshots")) else Nil - val scalaVersion = (for { - scalaArtifactsParams <- scalaArtifactsParamsOpt - scalaParams = scalaArtifactsParams.params - scalaVersion = scalaParams.scalaVersion - } yield scalaVersion).getOrElse(defaultScalaVersion) val runnerVersion0 = - if scalaVersion.startsWith("3") && - scalaVersion.coursierVersion < s"$scala3LtsPrefix.0".coursierVersion - then { + if shouldUseLegacyRunners then { logger.message( s"""$warnPrefix Scala $scalaVersion is no longer supported by the runner module. |$warnPrefix Defaulting to a legacy runner module version: $runnerLegacyVersion. From aca7be1ced2f1a94853b88aebff0a5bddce0e2d6 Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Tue, 6 May 2025 14:27:00 +0200 Subject: [PATCH 5/6] Bump `mill-scalafix` to 0.4.2 and enable the `RemoveUnused` rule for Scala 3 --- .scalafix3.conf | 3 +-- .../src/main/scala/sclicheck/sclicheck.scala | 11 +++++------ project/settings.sc | 4 +++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.scalafix3.conf b/.scalafix3.conf index e5a920e622..e89a263c6f 100644 --- a/.scalafix3.conf +++ b/.scalafix3.conf @@ -1,7 +1,6 @@ -# Same as .scalafix.conf, but for RemoveUnused commented out rules = [ DisableSyntax, - # RemoveUnused, + RemoveUnused, OrganizeImports, NoValInForComprehension, # ProcedureSyntax diff --git a/modules/docs-tests/src/main/scala/sclicheck/sclicheck.scala b/modules/docs-tests/src/main/scala/sclicheck/sclicheck.scala index 60c5283ffd..ada8456801 100644 --- a/modules/docs-tests/src/main/scala/sclicheck/sclicheck.scala +++ b/modules/docs-tests/src/main/scala/sclicheck/sclicheck.scala @@ -379,12 +379,11 @@ def checkFile(file: os.Path, options: Options): Unit = val header = s"File was generated from based on $relFile, do not edit manually!" allSources.result().foreach { s => val content = os.read.lines(s) - val cleared = - if !shouldAlignContent(s) || content.size < 2 then content - else - val head = content.take(1).dropWhile(_ == fakeLineMarker) - val tail = content.drop(1).dropWhile(_ == fakeLineMarker) - head ++ tail + if !shouldAlignContent(s) || content.size < 2 then content + else + val head = content.take(1).dropWhile(_ == fakeLineMarker) + val tail = content.drop(1).dropWhile(_ == fakeLineMarker) + head ++ tail os.write.over(s, content.mkString(s"// $header\n\n", "\n", "")) } diff --git a/project/settings.sc b/project/settings.sc index d9ee20e7fe..529d126b41 100644 --- a/project/settings.sc +++ b/project/settings.sc @@ -1,4 +1,4 @@ -import $ivy.`com.goyeau::mill-scalafix::0.3.1` +import $ivy.`com.goyeau::mill-scalafix::0.4.2` import $ivy.`io.github.alexarchambault.mill::mill-native-image::0.1.29` import $file.deps, deps.{ @@ -820,6 +820,8 @@ trait ScalaCliScalafixModule extends ScalafixModule { val warnUnusedOptions = if (!parentOptions.contains("-Ywarn-unused") && scalaVersion().startsWith("2.")) Seq("-Ywarn-unused") + else if (!parentOptions.contains("-Wunused:all") && scalaVersion().startsWith("3.")) + Seq("-Wunused:all") else Nil parentOptions ++ semDbOptions ++ warnUnusedOptions } From cf5f186e8ad49579cd68b3fea1119759afe87382 Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Tue, 6 May 2025 14:27:55 +0200 Subject: [PATCH 6/6] [NIT] Scalafix `RemoveUnused` changes --- .../src/main/scala/scala/build/Bloop.scala | 4 +-- .../src/main/scala/scala/build/Build.scala | 10 +++---- .../scala/build/ConsoleBloopBuildClient.scala | 2 +- .../main/scala/scala/build/CrossSources.scala | 13 +++++----- .../main/scala/scala/build/LocalRepo.scala | 1 - .../build/PersistentDiagnosticLogger.scala | 4 +-- .../scala/scala/build/ScalafixArtifacts.scala | 4 +-- .../src/main/scala/scala/build/Sources.scala | 2 +- .../scala/scala/build/bsp/BspClient.scala | 6 ++--- .../main/scala/scala/build/bsp/BspImpl.scala | 6 ++--- .../scala/scala/build/bsp/BspServer.scala | 6 ++--- .../bsp/JvmBuildServerForwardStubs.scala | 2 +- .../build/bsp/LoggingJvmBuildServer.scala | 2 +- .../main/scala/scala/build/bsp/package.scala | 4 +-- .../scala/build/bsp/protocol/TextEdit.scala | 2 +- .../scala/build/compiler/BloopCompiler.scala | 1 - .../main/scala/scala/build/input/Inputs.scala | 2 +- .../scala/scala/build/internal/Runner.scala | 8 +++--- .../internal/markdown/MarkdownCodeBlock.scala | 2 +- .../preprocessing/DataPreprocessor.scala | 1 - .../preprocessing/DeprecatedDirectives.scala | 5 ---- .../DirectivesPreprocessor.scala | 8 +++--- .../preprocessing/ExtractedDirectives.scala | 8 +++--- .../build/preprocessing/JarPreprocessor.scala | 1 - .../preprocessing/ScalaPreprocessor.scala | 7 +++-- .../preprocessing/ScriptPreprocessor.scala | 6 ++--- .../preprocessing/UsingDirectivesOps.scala | 4 +-- .../scala/scala/cli/ScalaCliCommands.scala | 2 +- .../scala/scala/cli/commands/HelpCmd.scala | 2 +- .../commands/RestrictedCommandsParser.scala | 2 +- .../scala/cli/commands/ScalaCommand.scala | 8 +++--- .../commands/ScalaCommandWithCustomHelp.scala | 2 +- .../scala/cli/commands/addpath/AddPath.scala | 2 +- .../cli/commands/addpath/AddPathOptions.scala | 2 +- .../scala/cli/commands/bloop/BloopExit.scala | 2 +- .../cli/commands/bloop/BloopExitOptions.scala | 2 +- .../cli/commands/bloop/BloopOptions.scala | 2 +- .../commands/bloop/BloopOutputOptions.scala | 2 +- .../scala/cli/commands/bloop/BloopStart.scala | 2 +- .../commands/bloop/BloopStartOptions.scala | 2 +- .../scala/scala/cli/commands/bsp/Bsp.scala | 16 ++++++------ .../scala/cli/commands/bsp/BspOptions.scala | 2 +- .../scala/cli/commands/clean/Clean.scala | 2 +- .../cli/commands/clean/CleanOptions.scala | 2 +- .../scala/cli/commands/compile/Compile.scala | 8 +++--- .../cli/commands/compile/CompileOptions.scala | 2 +- .../scala/cli/commands/config/Config.scala | 6 ++--- .../cli/commands/config/ConfigOptions.scala | 4 +-- .../commands/config/ThrowawayPgpSecret.scala | 2 +- .../commands/default/DefaultFileOptions.scala | 2 +- .../cli/commands/default/DefaultOptions.scala | 2 +- .../commands/default/LegacyScalaOptions.scala | 4 +-- .../dependencyupdate/DependencyUpdate.scala | 4 +-- .../DependencyUpdateOptions.scala | 2 +- .../commands/directories/Directories.scala | 2 +- .../directories/DirectoriesOptions.scala | 2 +- .../scala/scala/cli/commands/doc/Doc.scala | 10 +++---- .../scala/cli/commands/doc/DocOptions.scala | 2 +- .../scala/cli/commands/export0/Export.scala | 10 +++---- .../cli/commands/export0/ExportOptions.scala | 2 +- .../scala/cli/commands/fix/BuiltInRules.scala | 5 ++-- .../scala/scala/cli/commands/fix/Fix.scala | 4 +-- .../scala/cli/commands/fix/FixOptions.scala | 2 +- .../cli/commands/fix/ScalafixOptions.scala | 2 +- .../cli/commands/fix/ScalafixRules.scala | 8 +++--- .../scala/scala/cli/commands/fmt/Fmt.scala | 8 +++--- .../scala/cli/commands/fmt/FmtOptions.scala | 2 +- .../cli/commands/github/LibSodiumJni.scala | 2 +- .../cli/commands/github/SecretCreate.scala | 8 +++--- .../commands/github/SecretCreateOptions.scala | 2 +- .../cli/commands/github/SecretList.scala | 8 +++--- .../commands/github/SecretListOptions.scala | 2 +- .../commands/github/SharedSecretOptions.scala | 4 +-- .../InstallCompletions.scala | 4 +-- .../InstallCompletionsOptions.scala | 2 +- .../commands/installhome/InstallHome.scala | 4 +-- .../installhome/InstallHomeOptions.scala | 2 +- .../scala/scala/cli/commands/new/New.scala | 2 +- .../scala/cli/commands/new/NewOptions.scala | 4 +-- .../scala/cli/commands/package0/Package.scala | 26 +++++++++---------- .../commands/package0/PackageOptions.scala | 10 +++---- .../commands/package0/PackagerOptions.scala | 2 +- .../scala/cli/commands/pgp/DummyOptions.scala | 2 +- .../cli/commands/pgp/ExternalCommand.scala | 2 +- .../scala/cli/commands/pgp/PgpCommands.scala | 1 - .../cli/commands/pgp/PgpExternalCommand.scala | 6 ++--- .../cli/commands/pgp/PgpExternalOptions.scala | 2 +- .../scala/cli/commands/pgp/PgpProxy.scala | 2 +- .../scala/cli/commands/pgp/PgpProxyJvm.scala | 2 +- .../cli/commands/pgp/PgpPullOptions.scala | 2 +- .../cli/commands/pgp/PgpPushOptions.scala | 2 +- .../commands/pgp/PgpScalaSigningOptions.scala | 4 +-- .../pgp/SharedPgpPushPullOptions.scala | 2 +- .../scala/cli/commands/publish/Publish.scala | 12 ++++----- .../publish/PublishConnectionOptions.scala | 2 +- .../cli/commands/publish/PublishLocal.scala | 2 +- .../publish/PublishLocalOptions.scala | 4 +-- .../cli/commands/publish/PublishOptions.scala | 4 +-- .../publish/PublishParamsOptions.scala | 6 ++--- .../publish/PublishRepositoryOptions.scala | 4 +-- .../cli/commands/publish/PublishSetup.scala | 6 ++--- .../publish/PublishSetupOptions.scala | 6 ++--- .../commands/publish/RepositoryParser.scala | 1 - .../publish/SharedPublishOptions.scala | 2 +- .../commands/publish/checks/CheckUtils.scala | 2 +- .../publish/checks/PasswordCheck.scala | 1 - .../publish/checks/PgpSecretKeyCheck.scala | 12 ++++----- .../publish/checks/RepositoryCheck.scala | 2 +- .../commands/publish/checks/UserCheck.scala | 1 - .../scala/scala/cli/commands/repl/Repl.scala | 12 ++++----- .../scala/cli/commands/repl/ReplOptions.scala | 2 +- .../cli/commands/repl/SharedReplOptions.scala | 2 +- .../scala/scala/cli/commands/run/Run.scala | 12 ++++----- .../scala/cli/commands/run/RunOptions.scala | 2 +- .../cli/commands/run/SharedRunOptions.scala | 2 +- .../cli/commands/setupide/SetupIde.scala | 10 +++---- .../commands/setupide/SetupIdeOptions.scala | 2 +- .../shared/AllExternalHelpOptions.scala | 8 +++--- .../commands/shared/BenchmarkingOptions.scala | 2 +- .../cli/commands/shared/CoursierOptions.scala | 6 ++--- .../cli/commands/shared/CrossOptions.scala | 2 +- .../cli/commands/shared/GlobalOptions.scala | 2 +- .../shared/GlobalSuppressWarningOptions.scala | 2 +- .../commands/shared/HelpGroupOptions.scala | 8 +++--- .../cli/commands/shared/HelpMessages.scala | 3 +-- .../cli/commands/shared/HelpOptions.scala | 2 +- .../cli/commands/shared/JavaPropOptions.scala | 8 +++--- .../cli/commands/shared/LoggingOptions.scala | 6 ++--- .../commands/shared/MainClassOptions.scala | 2 +- .../cli/commands/shared/MarkdownOptions.scala | 2 +- .../cli/commands/shared/ScalaCliHelp.scala | 2 +- .../cli/commands/shared/ScalaJsOptions.scala | 6 ++--- .../commands/shared/ScalaNativeOptions.scala | 6 ++--- .../commands/shared/ScalacExtraOptions.scala | 6 ++--- .../cli/commands/shared/ScalacOptions.scala | 8 +++--- .../cli/commands/shared/ScopeOptions.scala | 2 +- .../commands/shared/SemanticDbOptions.scala | 6 ++--- .../shared/SharedBspFileOptions.scala | 2 +- .../SharedCompilationServerOptions.scala | 10 +++---- .../commands/shared/SharedDebugOptions.scala | 2 +- .../shared/SharedDependencyOptions.scala | 6 ++--- .../commands/shared/SharedInputOptions.scala | 2 +- .../commands/shared/SharedJavaOptions.scala | 2 +- .../commands/shared/SharedJvmOptions.scala | 6 ++--- .../cli/commands/shared/SharedOptions.scala | 19 +++++++------- .../commands/shared/SharedPythonOptions.scala | 2 +- .../shared/SharedVersionOptions.scala | 2 +- .../commands/shared/SharedWatchOptions.scala | 2 +- .../shared/SharedWorkspaceOptions.scala | 6 ++--- .../cli/commands/shared/SnippetOptions.scala | 2 +- .../shared/SourceGeneratorOptions.scala | 2 +- .../shared/SuppressWarningOptions.scala | 2 +- .../commands/shared/VerbosityOptions.scala | 8 +++--- .../scala/cli/commands/shebang/Shebang.scala | 2 +- .../cli/commands/shebang/ShebangOptions.scala | 2 +- .../scala/scala/cli/commands/test/Test.scala | 10 +++---- .../scala/cli/commands/test/TestOptions.scala | 2 +- .../cli/commands/uninstall/Uninstall.scala | 2 +- .../commands/uninstall/UninstallOptions.scala | 2 +- .../SharedUninstallCompletionsOptions.scala | 2 +- .../UninstallCompletions.scala | 4 +-- .../UninstallCompletionsOptions.scala | 2 +- .../scala/cli/commands/update/Update.scala | 10 +++---- .../cli/commands/update/UpdateOptions.scala | 4 +-- .../commands/util/BuildCommandHelpers.scala | 2 +- .../scala/cli/commands/util/JvmUtils.scala | 6 ++--- .../scala/cli/commands/util/RunSpark.scala | 2 +- .../commands/util/ScalaCliSttpBackend.scala | 2 +- .../cli/commands/util/ScalacOptionsUtil.scala | 1 - .../scala/cli/commands/version/Version.scala | 4 +-- .../cli/commands/version/VersionOptions.scala | 4 +-- .../scala/cli/exportCmd/JsonProject.scala | 2 +- .../cli/exportCmd/JsonProjectDescriptor.scala | 3 +-- .../scala/cli/exportCmd/MavenProject.scala | 2 +- .../exportCmd/MavenProjectDescriptor.scala | 15 +++++------ .../cli/exportCmd/MillProjectDescriptor.scala | 2 +- .../scala/scala/cli/internal/CliLogger.scala | 6 ++--- .../scala/scala/cli/internal/ProcUtil.scala | 1 - .../scala/cli/launcher/LauncherCli.scala | 4 +-- .../scala/cli/launcher/LauncherOptions.scala | 2 +- .../scala/cli/launcher/PowerOptions.scala | 2 +- .../launcher/ScalaRunnerLauncherOptions.scala | 2 +- .../cli/commands/tests/ReplOptionsTests.scala | 2 +- .../scala/cli/tests/CachedBinaryTests.scala | 2 +- .../test/scala/cli/tests/PackageTests.scala | 2 +- .../test/scala/cli/tests/ScalafmtTest.scala | 6 ++--- .../build/errors/ConfigDbException.scala | 5 ++-- .../InvalidBinaryScalaVersionError.scala | 5 ++-- .../errors/MultipleScalaVersionsError.scala | 5 ++-- .../build/errors/ScalaVersionError.scala | 2 +- .../scala/scala/build/errors/Severity.scala | 2 +- .../errors/UnsupportedScalaVersionError.scala | 5 ++-- .../HasBuildOptionsWithRequirements.scala | 2 +- .../directives/Benchmarking.scala | 5 ++-- .../preprocessing/directives/BuildInfo.scala | 2 +- .../preprocessing/directives/CustomJar.scala | 8 +++--- .../preprocessing/directives/Dependency.scala | 6 ++--- .../directives/DirectiveHandler.scala | 13 +++++----- .../directives/DirectiveUtil.scala | 2 +- .../preprocessing/directives/Exclude.scala | 4 +-- .../preprocessing/directives/JavaHome.scala | 2 +- .../directives/JavaOptions.scala | 4 +-- .../preprocessing/directives/JavaProps.scala | 6 ++--- .../directives/JavacOptions.scala | 6 ++--- .../build/preprocessing/directives/Jvm.scala | 2 +- .../preprocessing/directives/MainClass.scala | 2 +- .../directives/ObjectWrapper.scala | 2 +- .../preprocessing/directives/Packaging.scala | 4 +-- .../preprocessing/directives/Platform.scala | 4 +-- .../preprocessing/directives/Plugin.scala | 4 +-- .../directives/ProcessedDirective.scala | 2 +- .../preprocessing/directives/Publish.scala | 4 +-- .../directives/PublishContextual.scala | 4 +-- .../preprocessing/directives/Python.scala | 2 +- .../preprocessing/directives/Repository.scala | 2 +- .../directives/RequirePlatform.scala | 2 +- .../directives/RequireScalaVersion.scala | 2 +- .../RequireScalaVersionBounds.scala | 2 +- .../directives/RequireScope.scala | 4 +-- .../preprocessing/directives/Resources.scala | 4 +-- .../preprocessing/directives/ScalaJs.scala | 2 +- .../directives/ScalaNative.scala | 2 +- .../directives/ScalaVersion.scala | 2 +- .../directives/ScalacOptions.scala | 4 +-- .../preprocessing/directives/Sources.scala | 4 +-- .../preprocessing/directives/Tests.scala | 2 +- .../preprocessing/directives/Toolkit.scala | 8 +++--- .../scala/cli/doc/GenerateReferenceDoc.scala | 10 +++---- .../scala/cli/doc/InternalDocOptions.scala | 2 +- .../scala/cli/doc/ReferenceDocUtils.scala | 2 +- .../scala/cli/integration/BspSuite.scala | 10 +++---- .../cli/integration/BspTestDefinitions.scala | 6 ++--- .../scala/cli/integration/BspTests213.scala | 4 +-- .../cli/integration/BspTests3NextRc.scala | 4 +-- .../scala/cli/integration/GitHubTests.scala | 2 +- .../scala/cli/integration/JmhTests.scala | 4 +-- .../integration/PackageTestDefinitions.scala | 2 +- .../cli/integration/PublishSetupTests.scala | 2 +- .../integration/PublishTestDefinitions.scala | 2 +- .../RunScalacCompatTestDefinitions.scala | 2 +- .../cli/integration/RunTestDefinitions.scala | 2 +- .../ScriptWrapperTestDefinitions.scala | 4 +-- .../scala/cli/integration/TestUtil.scala | 2 +- .../cli/integration/util/DockerServer.scala | 2 +- .../main/scala/scala/build/Artifacts.scala | 10 +++---- .../scala/scala/build/CoursierUtils.scala | 2 +- .../build/TemporaryInMemoryRepository.scala | 2 +- .../ActionableDependencyHandler.scala | 7 +++-- .../actionable/ActionableDiagnostic.scala | 1 - .../build/actionable/ActionableHandler.scala | 2 +- .../scala/scala/build/info/BuildInfo.scala | 2 +- .../scala/build/info/ScopedBuildInfo.scala | 2 +- .../scala/build/options/BuildOptions.scala | 15 +++++------ .../scala/build/options/ComputeVersion.scala | 9 +++---- .../scala/build/options/ConfigMonoid.scala | 4 +-- .../scala/build/options/HasHashData.scala | 4 +-- .../build/options/ScalaVersionUtil.scala | 8 +++--- .../scala/scala/build/options/Scope.scala | 1 - .../scala/build/options/ScriptOptions.scala | 1 - 259 files changed, 510 insertions(+), 546 deletions(-) diff --git a/modules/build/src/main/scala/scala/build/Bloop.scala b/modules/build/src/main/scala/scala/build/Bloop.scala index 743acb10ed..58a16f04c1 100644 --- a/modules/build/src/main/scala/scala/build/Bloop.scala +++ b/modules/build/src/main/scala/scala/build/Bloop.scala @@ -12,10 +12,10 @@ import java.io.{File, IOException} import scala.annotation.tailrec import scala.build.EitherCps.{either, value} import scala.build.errors.{BuildException, ModuleFormatError} -import scala.build.internal.CsLoggerUtil.* +import scala.build.internal.CsLoggerUtil._ import scala.concurrent.ExecutionException import scala.concurrent.duration.FiniteDuration -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ object Bloop { diff --git a/modules/build/src/main/scala/scala/build/Build.scala b/modules/build/src/main/scala/scala/build/Build.scala index 493ddf3333..f3aebcfc99 100644 --- a/modules/build/src/main/scala/scala/build/Build.scala +++ b/modules/build/src/main/scala/scala/build/Build.scala @@ -11,16 +11,16 @@ import java.util.concurrent.{ScheduledExecutorService, ScheduledFuture} import scala.annotation.tailrec import scala.build.EitherCps.{either, value} -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.compiler.{ScalaCompiler, ScalaCompilerMaker} -import scala.build.errors.* -import scala.build.input.* +import scala.build.errors._ +import scala.build.input._ import scala.build.internal.resource.ResourceMapper import scala.build.internal.{Constants, MainClass, Name, Util} -import scala.build.options.* +import scala.build.options._ import scala.build.options.validation.ValidationException import scala.build.postprocessing.LineConversion.scalaLineToScLineShift -import scala.build.postprocessing.* +import scala.build.postprocessing._ import scala.collection.mutable.ListBuffer import scala.concurrent.duration.DurationInt import scala.util.control.NonFatal diff --git a/modules/build/src/main/scala/scala/build/ConsoleBloopBuildClient.scala b/modules/build/src/main/scala/scala/build/ConsoleBloopBuildClient.scala index 6580c7737b..8ce2ab4d60 100644 --- a/modules/build/src/main/scala/scala/build/ConsoleBloopBuildClient.scala +++ b/modules/build/src/main/scala/scala/build/ConsoleBloopBuildClient.scala @@ -12,7 +12,7 @@ import scala.build.internals.ConsoleUtils.ScalaCliConsole import scala.build.options.Scope import scala.build.postprocessing.LineConversion.scalaLineToScLine import scala.collection.mutable -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ class ConsoleBloopBuildClient( logger: Logger, diff --git a/modules/build/src/main/scala/scala/build/CrossSources.scala b/modules/build/src/main/scala/scala/build/CrossSources.scala index c7e731752a..2bfba208ff 100644 --- a/modules/build/src/main/scala/scala/build/CrossSources.scala +++ b/modules/build/src/main/scala/scala/build/CrossSources.scala @@ -1,10 +1,9 @@ package scala.build - import java.io.File -import scala.build.CollectionOps.* +import scala.build.CollectionOps._ import scala.build.EitherCps.{either, value} -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.Positioned import scala.build.errors.{ BuildException, @@ -13,8 +12,8 @@ import scala.build.errors.{ MalformedDirectiveError, Severity } -import scala.build.input.ElementsUtils.* -import scala.build.input.* +import scala.build.input.ElementsUtils._ +import scala.build.input._ import scala.build.internal.Constants import scala.build.internal.util.{RegexUtils, WarningMessages} import scala.build.options.{ @@ -25,10 +24,10 @@ import scala.build.options.{ SuppressWarningOptions, WithBuildRequirements } -import scala.build.preprocessing.* +import scala.build.preprocessing._ import scala.build.testrunner.DynamicTestRunner.globPattern import scala.util.Try -import scala.util.chaining.* +import scala.util.chaining._ /** Information gathered from preprocessing command inputs - sources (including unwrapped scripts) * and build options from using directives diff --git a/modules/build/src/main/scala/scala/build/LocalRepo.scala b/modules/build/src/main/scala/scala/build/LocalRepo.scala index fc48eadcf3..4d74f80489 100644 --- a/modules/build/src/main/scala/scala/build/LocalRepo.scala +++ b/modules/build/src/main/scala/scala/build/LocalRepo.scala @@ -1,5 +1,4 @@ package scala.build - import coursier.core.{Repository, Version} import coursier.parse.RepositoryParser import coursier.paths.Util diff --git a/modules/build/src/main/scala/scala/build/PersistentDiagnosticLogger.scala b/modules/build/src/main/scala/scala/build/PersistentDiagnosticLogger.scala index 6e10265efb..bf06390483 100644 --- a/modules/build/src/main/scala/scala/build/PersistentDiagnosticLogger.scala +++ b/modules/build/src/main/scala/scala/build/PersistentDiagnosticLogger.scala @@ -1,13 +1,13 @@ package scala.build import bloop.rifle.BloopRifleLogger -import org.scalajs.logging.Logger as ScalaJsLogger +import org.scalajs.logging.{Logger => ScalaJsLogger} import java.io.PrintStream import scala.build.errors.{BuildException, Diagnostic} import scala.build.internals.FeatureType -import scala.scalanative.build as sn +import scala.scalanative.{build => sn} /** Used to collect and send diagnostics to the build client when operating as a BSP */ class PersistentDiagnosticLogger(parent: Logger) extends Logger { diff --git a/modules/build/src/main/scala/scala/build/ScalafixArtifacts.scala b/modules/build/src/main/scala/scala/build/ScalafixArtifacts.scala index a368a8d637..5ec8f57e0f 100644 --- a/modules/build/src/main/scala/scala/build/ScalafixArtifacts.scala +++ b/modules/build/src/main/scala/scala/build/ScalafixArtifacts.scala @@ -4,7 +4,7 @@ import coursier.cache.FileCache import coursier.core.{Repository, Version} import coursier.error.{CoursierError, ResolutionError} import coursier.util.Task -import dependency.* +import dependency._ import org.apache.commons.compress.archivers.zip.ZipFile import os.Path @@ -14,7 +14,7 @@ import java.util.Properties import scala.build.EitherCps.{either, value} import scala.build.errors.{BuildException, FetchingDependenciesError} import scala.build.internal.Constants -import scala.build.internal.CsLoggerUtil.* +import scala.build.internal.CsLoggerUtil._ final case class ScalafixArtifacts( scalafixJars: Seq[os.Path], diff --git a/modules/build/src/main/scala/scala/build/Sources.scala b/modules/build/src/main/scala/scala/build/Sources.scala index 5abbd640ed..d5680ba1c6 100644 --- a/modules/build/src/main/scala/scala/build/Sources.scala +++ b/modules/build/src/main/scala/scala/build/Sources.scala @@ -9,7 +9,7 @@ import scala.build.info.BuildInfo import scala.build.input.Inputs import scala.build.internal.{CodeWrapper, WrapperParams} import scala.build.options.{BuildOptions, Scope} -import scala.build.preprocessing.* +import scala.build.preprocessing._ final case class Sources( paths: Seq[(os.Path, os.RelPath)], diff --git a/modules/build/src/main/scala/scala/build/bsp/BspClient.scala b/modules/build/src/main/scala/scala/build/bsp/BspClient.scala index 44103f2bea..006947f114 100644 --- a/modules/build/src/main/scala/scala/build/bsp/BspClient.scala +++ b/modules/build/src/main/scala/scala/build/bsp/BspClient.scala @@ -1,10 +1,10 @@ package scala.build.bsp import ch.epfl.scala.bsp4j.{ScalaAction, ScalaDiagnostic, ScalaTextEdit, ScalaWorkspaceEdit} -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import com.google.gson.{Gson, JsonElement} -import java.lang.Boolean as JBoolean +import java.lang.{Boolean => JBoolean} import java.net.URI import java.nio.file.Paths import java.util.concurrent.{ConcurrentHashMap, ExecutorService} @@ -15,7 +15,7 @@ import scala.build.errors.{BuildException, CompositeBuildException, Diagnostic, import scala.build.internal.util.WarningMessages import scala.build.postprocessing.LineConversion.scalaLineToScLine import scala.build.{BloopBuildClient, GeneratedSource, Logger} -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ class BspClient( @volatile var logger: Logger, diff --git a/modules/build/src/main/scala/scala/build/bsp/BspImpl.scala b/modules/build/src/main/scala/scala/build/bsp/BspImpl.scala index 9313ea8990..02704da6c8 100644 --- a/modules/build/src/main/scala/scala/build/bsp/BspImpl.scala +++ b/modules/build/src/main/scala/scala/build/bsp/BspImpl.scala @@ -1,7 +1,7 @@ package scala.build.bsp import bloop.rifle.{BloopRifleConfig, BloopServer} -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import com.github.plokhotnyuk.jsoniter_scala.core.{JsonReaderException, readFromArray} import dependency.ScalaParameters import org.eclipse.lsp4j.jsonrpc @@ -12,7 +12,7 @@ import java.util.UUID import java.util.concurrent.{CompletableFuture, Executor} import scala.build.EitherCps.{either, value} -import scala.build.* +import scala.build._ import scala.build.compiler.BloopCompiler import scala.build.errors.{ BuildException, @@ -26,7 +26,7 @@ import scala.build.options.{BuildOptions, Scope} import scala.collection.mutable.ListBuffer import scala.concurrent.duration.DurationInt import scala.concurrent.{ExecutionContext, Future, Promise} -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.{Failure, Success} /** The implementation for [[Bsp]] command. diff --git a/modules/build/src/main/scala/scala/build/bsp/BspServer.scala b/modules/build/src/main/scala/scala/build/bsp/BspServer.scala index e2896ab46b..6d7060d2cf 100644 --- a/modules/build/src/main/scala/scala/build/bsp/BspServer.scala +++ b/modules/build/src/main/scala/scala/build/bsp/BspServer.scala @@ -1,18 +1,18 @@ package scala.build.bsp import ch.epfl.scala.bsp4j.{BuildClient, LogMessageParams, MessageType} -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import java.io.{File, PrintWriter, StringWriter} import java.net.URI import java.util.concurrent.{CompletableFuture, TimeUnit} -import java.util as ju +import java.{util => ju} import scala.build.Logger import scala.build.internal.Constants import scala.build.options.Scope import scala.concurrent.{Future, Promise} -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.Random class BspServer( diff --git a/modules/build/src/main/scala/scala/build/bsp/JvmBuildServerForwardStubs.scala b/modules/build/src/main/scala/scala/build/bsp/JvmBuildServerForwardStubs.scala index 081399719f..7e87aab742 100644 --- a/modules/build/src/main/scala/scala/build/bsp/JvmBuildServerForwardStubs.scala +++ b/modules/build/src/main/scala/scala/build/bsp/JvmBuildServerForwardStubs.scala @@ -1,6 +1,6 @@ package scala.build.bsp -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import java.util.concurrent.CompletableFuture diff --git a/modules/build/src/main/scala/scala/build/bsp/LoggingJvmBuildServer.scala b/modules/build/src/main/scala/scala/build/bsp/LoggingJvmBuildServer.scala index de5a6fb9c8..014d51a05e 100644 --- a/modules/build/src/main/scala/scala/build/bsp/LoggingJvmBuildServer.scala +++ b/modules/build/src/main/scala/scala/build/bsp/LoggingJvmBuildServer.scala @@ -1,6 +1,6 @@ package scala.build.bsp -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import java.util.concurrent.CompletableFuture diff --git a/modules/build/src/main/scala/scala/build/bsp/package.scala b/modules/build/src/main/scala/scala/build/bsp/package.scala index 5f3fe3e632..058e84da7c 100644 --- a/modules/build/src/main/scala/scala/build/bsp/package.scala +++ b/modules/build/src/main/scala/scala/build/bsp/package.scala @@ -1,11 +1,11 @@ package scala.build import ch.epfl.scala.bsp4j.SourcesItem -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import java.util.concurrent.CompletableFuture -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ package object bsp { diff --git a/modules/build/src/main/scala/scala/build/bsp/protocol/TextEdit.scala b/modules/build/src/main/scala/scala/build/bsp/protocol/TextEdit.scala index 89b8543f4e..6e691bd0e5 100644 --- a/modules/build/src/main/scala/scala/build/bsp/protocol/TextEdit.scala +++ b/modules/build/src/main/scala/scala/build/bsp/protocol/TextEdit.scala @@ -1,6 +1,6 @@ package scala.build.bsp.protocol -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import com.google.gson.Gson case class TextEdit(range: b.Range, newText: String) { diff --git a/modules/build/src/main/scala/scala/build/compiler/BloopCompiler.scala b/modules/build/src/main/scala/scala/build/compiler/BloopCompiler.scala index 3cc7b3d145..bd7770a490 100644 --- a/modules/build/src/main/scala/scala/build/compiler/BloopCompiler.scala +++ b/modules/build/src/main/scala/scala/build/compiler/BloopCompiler.scala @@ -1,5 +1,4 @@ package scala.build.compiler - import ch.epfl.scala.bsp4j import scala.annotation.tailrec diff --git a/modules/build/src/main/scala/scala/build/input/Inputs.scala b/modules/build/src/main/scala/scala/build/input/Inputs.scala index 8e93d14632..ba890642df 100644 --- a/modules/build/src/main/scala/scala/build/input/Inputs.scala +++ b/modules/build/src/main/scala/scala/build/input/Inputs.scala @@ -8,7 +8,7 @@ import java.security.MessageDigest import scala.annotation.tailrec import scala.build.Directories import scala.build.errors.{BuildException, InputsException, WorkspaceError} -import scala.build.input.ElementsUtils.* +import scala.build.input.ElementsUtils._ import scala.build.internal.Constants import scala.build.internal.zip.WrappedZipInputStream import scala.build.options.Scope diff --git a/modules/build/src/main/scala/scala/build/internal/Runner.scala b/modules/build/src/main/scala/scala/build/internal/Runner.scala index b6037a3d31..651b8c1da5 100644 --- a/modules/build/src/main/scala/scala/build/internal/Runner.scala +++ b/modules/build/src/main/scala/scala/build/internal/Runner.scala @@ -4,7 +4,7 @@ import coursier.jvm.Execve import org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv import org.scalajs.jsenv.nodejs.NodeJSEnv import org.scalajs.jsenv.{Input, JSEnv, RunConfig} -import org.scalajs.testing.adapter.TestAdapter as ScalaJsTestAdapter +import org.scalajs.testing.adapter.{TestAdapter => ScalaJsTestAdapter} import sbt.testing.{Framework, Status} import java.io.File @@ -13,11 +13,11 @@ import java.nio.file.{Files, Path, Paths} import scala.build.EitherCps.{either, value} import scala.build.Logger import scala.build.Ops.EitherSeqOps -import scala.build.errors.* +import scala.build.errors._ import scala.build.internals.EnvVar -import scala.build.testrunner.FrameworkUtils.* +import scala.build.testrunner.FrameworkUtils._ import scala.build.testrunner.{AsmTestRunner, TestRunner} -import scala.scalanative.testinterface.adapter.TestAdapter as ScalaNativeTestAdapter +import scala.scalanative.testinterface.adapter.{TestAdapter => ScalaNativeTestAdapter} import scala.util.{Failure, Properties, Success} object Runner { diff --git a/modules/build/src/main/scala/scala/build/internal/markdown/MarkdownCodeBlock.scala b/modules/build/src/main/scala/scala/build/internal/markdown/MarkdownCodeBlock.scala index 982c9a0d20..38f0184cbc 100644 --- a/modules/build/src/main/scala/scala/build/internal/markdown/MarkdownCodeBlock.scala +++ b/modules/build/src/main/scala/scala/build/internal/markdown/MarkdownCodeBlock.scala @@ -4,7 +4,7 @@ import scala.annotation.tailrec import scala.build.Position import scala.build.errors.{BuildException, MarkdownUnclosedBackticksError} import scala.collection.mutable -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ /** Representation for a (closed) code block contained in Markdown * diff --git a/modules/build/src/main/scala/scala/build/preprocessing/DataPreprocessor.scala b/modules/build/src/main/scala/scala/build/preprocessing/DataPreprocessor.scala index e767875ca1..966664d637 100644 --- a/modules/build/src/main/scala/scala/build/preprocessing/DataPreprocessor.scala +++ b/modules/build/src/main/scala/scala/build/preprocessing/DataPreprocessor.scala @@ -1,5 +1,4 @@ package scala.build.preprocessing - import java.nio.charset.StandardCharsets import scala.build.EitherCps.{either, value} diff --git a/modules/build/src/main/scala/scala/build/preprocessing/DeprecatedDirectives.scala b/modules/build/src/main/scala/scala/build/preprocessing/DeprecatedDirectives.scala index 62218fc265..f60b53fd1b 100644 --- a/modules/build/src/main/scala/scala/build/preprocessing/DeprecatedDirectives.scala +++ b/modules/build/src/main/scala/scala/build/preprocessing/DeprecatedDirectives.scala @@ -31,11 +31,6 @@ object DeprecatedDirectives { private def valueReplacement(replacements: String*)(warning: String): WarningAndReplacement = (warning, DirectiveTemplate(Nil, Some(replacements.toSeq))) - private def allAliasesOf(key: String, handler: DirectiveHandler[?]): Seq[String] = - handler.keys.find(_.nameAliases.contains(key)) - .toSeq - .flatMap(_.nameAliases) - private def allKeysFrom(handler: DirectiveHandler[?]): Seq[String] = handler.keys.flatMap(_.nameAliases) diff --git a/modules/build/src/main/scala/scala/build/preprocessing/DirectivesPreprocessor.scala b/modules/build/src/main/scala/scala/build/preprocessing/DirectivesPreprocessor.scala index 15bde02c3b..4cd76753c0 100644 --- a/modules/build/src/main/scala/scala/build/preprocessing/DirectivesPreprocessor.scala +++ b/modules/build/src/main/scala/scala/build/preprocessing/DirectivesPreprocessor.scala @@ -1,7 +1,7 @@ package scala.build.preprocessing import scala.build.EitherCps.{either, value} import scala.build.Logger -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.directives.{ HasBuildOptions, HasBuildOptionsWithRequirements, @@ -23,9 +23,9 @@ import scala.build.options.{ SuppressWarningOptions, WithBuildRequirements } -import scala.build.preprocessing.directives.DirectivesPreprocessingUtils.* -import scala.build.preprocessing.directives.PartiallyProcessedDirectives.* -import scala.build.preprocessing.directives.* +import scala.build.preprocessing.directives.DirectivesPreprocessingUtils._ +import scala.build.preprocessing.directives.PartiallyProcessedDirectives._ +import scala.build.preprocessing.directives._ case class DirectivesPreprocessor( path: Either[String, os.Path], diff --git a/modules/build/src/main/scala/scala/build/preprocessing/ExtractedDirectives.scala b/modules/build/src/main/scala/scala/build/preprocessing/ExtractedDirectives.scala index f347b91c17..b2d26d0a39 100644 --- a/modules/build/src/main/scala/scala/build/preprocessing/ExtractedDirectives.scala +++ b/modules/build/src/main/scala/scala/build/preprocessing/ExtractedDirectives.scala @@ -8,16 +8,16 @@ import com.virtuslab.using_directives.custom.model.{ UsingDirectives, Value } -import com.virtuslab.using_directives.custom.utils.ast.* +import com.virtuslab.using_directives.custom.utils.ast._ import scala.annotation.targetName -import scala.build.errors.* +import scala.build.errors._ import scala.build.options.SuppressWarningOptions -import scala.build.preprocessing.UsingDirectivesOps.* +import scala.build.preprocessing.UsingDirectivesOps._ import scala.build.preprocessing.directives.{DirectiveUtil, ScopedDirective, StrictDirective} import scala.build.{Logger, Position} import scala.collection.mutable -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ case class ExtractedDirectives( directives: Seq[StrictDirective], diff --git a/modules/build/src/main/scala/scala/build/preprocessing/JarPreprocessor.scala b/modules/build/src/main/scala/scala/build/preprocessing/JarPreprocessor.scala index 8e7b5e994b..86eac4e890 100644 --- a/modules/build/src/main/scala/scala/build/preprocessing/JarPreprocessor.scala +++ b/modules/build/src/main/scala/scala/build/preprocessing/JarPreprocessor.scala @@ -1,5 +1,4 @@ package scala.build.preprocessing - import java.nio.charset.StandardCharsets import scala.build.EitherCps.{either, value} diff --git a/modules/build/src/main/scala/scala/build/preprocessing/ScalaPreprocessor.scala b/modules/build/src/main/scala/scala/build/preprocessing/ScalaPreprocessor.scala index 2f537abc78..e4b383232d 100644 --- a/modules/build/src/main/scala/scala/build/preprocessing/ScalaPreprocessor.scala +++ b/modules/build/src/main/scala/scala/build/preprocessing/ScalaPreprocessor.scala @@ -1,21 +1,20 @@ package scala.build.preprocessing - import dependency.AnyDependency import dependency.parser.DependencyParser import java.nio.charset.StandardCharsets import scala.build.EitherCps.{either, value} -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.directives.{ HasBuildOptions, HasBuildOptionsWithRequirements, HasBuildRequirements } -import scala.build.errors.* +import scala.build.errors._ import scala.build.input.{Inputs, ScalaCliInvokeData, ScalaFile, SingleElement, VirtualScalaFile} import scala.build.internal.Util -import scala.build.options.* +import scala.build.options._ import scala.build.preprocessing.directives.{ DirectiveHandler, DirectiveUtil, diff --git a/modules/build/src/main/scala/scala/build/preprocessing/ScriptPreprocessor.scala b/modules/build/src/main/scala/scala/build/preprocessing/ScriptPreprocessor.scala index c0c4d24a16..73fa0b2034 100644 --- a/modules/build/src/main/scala/scala/build/preprocessing/ScriptPreprocessor.scala +++ b/modules/build/src/main/scala/scala/build/preprocessing/ScriptPreprocessor.scala @@ -6,7 +6,7 @@ import scala.build.EitherCps.{either, value} import scala.build.Logger import scala.build.errors.BuildException import scala.build.input.{Inputs, ScalaCliInvokeData, Script, SingleElement, VirtualScript} -import scala.build.internal.* +import scala.build.internal._ import scala.build.internal.util.WarningMessages import scala.build.options.{BuildOptions, BuildRequirements, Platform, SuppressWarningOptions} import scala.build.preprocessing.PreprocessedSource @@ -106,8 +106,8 @@ case object ScriptPreprocessor extends Preprocessor { inputArgPath.getOrElse(subPath.toString) ) - val className = (pkg :+ wrapper).map(_.raw).mkString(".") - val relPath = os.rel / (subPath / os.up) / s"${subPath.last.stripSuffix(".sc")}.scala" + (pkg :+ wrapper).map(_.raw).mkString(".") + val relPath = os.rel / (subPath / os.up) / s"${subPath.last.stripSuffix(".sc")}.scala" val file = PreprocessedSource.UnwrappedScript( originalPath = reportingPath.map((subPath, _)), diff --git a/modules/build/src/main/scala/scala/build/preprocessing/UsingDirectivesOps.scala b/modules/build/src/main/scala/scala/build/preprocessing/UsingDirectivesOps.scala index c8d8b0e2de..14863fd65d 100644 --- a/modules/build/src/main/scala/scala/build/preprocessing/UsingDirectivesOps.scala +++ b/modules/build/src/main/scala/scala/build/preprocessing/UsingDirectivesOps.scala @@ -1,11 +1,11 @@ package scala.build.preprocessing import com.virtuslab.using_directives.custom.model.UsingDirectives -import com.virtuslab.using_directives.custom.utils.ast.* +import com.virtuslab.using_directives.custom.utils.ast._ import scala.annotation.tailrec import scala.build.Position -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ object UsingDirectivesOps { extension (ud: UsingDirectives) { diff --git a/modules/cli/src/main/scala/scala/cli/ScalaCliCommands.scala b/modules/cli/src/main/scala/scala/cli/ScalaCliCommands.scala index 59d57347b4..beabb270be 100644 --- a/modules/cli/src/main/scala/scala/cli/ScalaCliCommands.scala +++ b/modules/cli/src/main/scala/scala/cli/ScalaCliCommands.scala @@ -5,7 +5,7 @@ import caseapp.core.help.{Help, HelpFormat, RuntimeCommandsHelp} import java.nio.file.InvalidPathException -import scala.cli.commands.* +import scala.cli.commands._ import scala.cli.commands.shared.ScalaCliHelp class ScalaCliCommands( diff --git a/modules/cli/src/main/scala/scala/cli/commands/HelpCmd.scala b/modules/cli/src/main/scala/scala/cli/commands/HelpCmd.scala index 3dae7f5673..14ff895a5e 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/HelpCmd.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/HelpCmd.scala @@ -1,6 +1,6 @@ package scala.cli.commands -import caseapp.* +import caseapp._ import caseapp.core.help.RuntimeCommandsHelp import scala.build.Logger diff --git a/modules/cli/src/main/scala/scala/cli/commands/RestrictedCommandsParser.scala b/modules/cli/src/main/scala/scala/cli/commands/RestrictedCommandsParser.scala index f5c4a2bcce..81acf9b2a7 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/RestrictedCommandsParser.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/RestrictedCommandsParser.scala @@ -11,7 +11,7 @@ import scala.build.input.ScalaCliInvokeData import scala.build.internal.util.WarningMessages import scala.build.internals.{ConsoleUtils, FeatureType} import scala.cli.ScalaCli -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ object RestrictedCommandsParser { def apply[T]( diff --git a/modules/cli/src/main/scala/scala/cli/commands/ScalaCommand.scala b/modules/cli/src/main/scala/scala/cli/commands/ScalaCommand.scala index 373453e179..90b1bb994f 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/ScalaCommand.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/ScalaCommand.scala @@ -8,7 +8,7 @@ import caseapp.core.util.Formatter import caseapp.core.{Arg, Error, RemainingArgs} import caseapp.{HelpMessage, Name} import coursier.core.{Repository, Version} -import dependency.* +import dependency._ import org.codehaus.plexus.classworlds.launcher.Launcher import java.util.concurrent.atomic.{AtomicBoolean, AtomicReference} @@ -25,13 +25,13 @@ import scala.build.options.ScalacOpt.noDashPrefixes import scala.build.options.{BuildOptions, ScalacOpt, Scope} import scala.build.{Artifacts, Directories, Logger, Positioned, ReplArtifacts} import scala.cli.commands.default.LegacyScalaOptions -import scala.cli.commands.shared.* +import scala.cli.commands.shared._ import scala.cli.commands.util.CommandHelpers -import scala.cli.commands.util.ScalacOptionsUtil.* +import scala.cli.commands.util.ScalacOptionsUtil._ import scala.cli.config.{ConfigDb, Keys} import scala.cli.internal.ProcUtil import scala.cli.launcher.LauncherOptions -import scala.cli.util.ConfigDbUtils.* +import scala.cli.util.ConfigDbUtils._ import scala.cli.{CurrentParams, ScalaCli} import scala.util.{Properties, Try} diff --git a/modules/cli/src/main/scala/scala/cli/commands/ScalaCommandWithCustomHelp.scala b/modules/cli/src/main/scala/scala/cli/commands/ScalaCommandWithCustomHelp.scala index 88f9dbbd42..7fb64d5a31 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/ScalaCommandWithCustomHelp.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/ScalaCommandWithCustomHelp.scala @@ -11,7 +11,7 @@ import scala.cli.commands.shared.{ HelpGroupOptions, ScalaCliHelp } -import scala.cli.commands.util.HelpUtils.* +import scala.cli.commands.util.HelpUtils._ import scala.cli.launcher.LauncherOptions abstract class ScalaCommandWithCustomHelp[T <: HasGlobalOptions]( diff --git a/modules/cli/src/main/scala/scala/cli/commands/addpath/AddPath.scala b/modules/cli/src/main/scala/scala/cli/commands/addpath/AddPath.scala index 4851dcbe40..8cee0978c4 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/addpath/AddPath.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/addpath/AddPath.scala @@ -1,6 +1,6 @@ package scala.cli.commands.addpath -import caseapp.* +import caseapp._ import coursier.env.{EnvironmentUpdate, ProfileUpdater} import java.io.File diff --git a/modules/cli/src/main/scala/scala/cli/commands/addpath/AddPathOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/addpath/AddPathOptions.scala index 17b4cfbefe..fe966a408e 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/addpath/AddPathOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/addpath/AddPathOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.addpath -import caseapp.* +import caseapp._ import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions} import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopExit.scala b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopExit.scala index a2f6612dac..213f12336c 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopExit.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopExit.scala @@ -1,7 +1,7 @@ package scala.cli.commands.bloop import bloop.rifle.{BloopRifle, BloopRifleConfig} -import caseapp.* +import caseapp._ import scala.build.{Directories, Logger, Os} import scala.cli.CurrentParams diff --git a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopExitOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopExitOptions.scala index f2c5884a9f..39d71da29d 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopExitOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopExitOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.bloop -import caseapp.* +import caseapp._ import scala.cli.commands.shared.{CoursierOptions, GlobalOptions, HasGlobalOptions, HelpMessages, SharedCompilationServerOptions} diff --git a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopOptions.scala index 376b8e9346..970df46f98 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.bloop -import caseapp.* +import caseapp._ import scala.cli.commands.shared._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopOutputOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopOutputOptions.scala index fd91faab4a..fb5ceae38a 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopOutputOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopOutputOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.bloop -import caseapp.* +import caseapp._ import scala.cli.commands.shared.{GlobalOptions, GlobalSuppressWarningOptions, HasGlobalOptions, HelpMessages, LoggingOptions, SharedCompilationServerOptions} diff --git a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopStart.scala b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopStart.scala index c68a51411f..94cd0425bc 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopStart.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopStart.scala @@ -2,7 +2,7 @@ package scala.cli.commands.bloop import bloop.rifle.internal.BuildInfo import bloop.rifle.{BloopRifle, BloopRifleConfig, BloopThreads} -import caseapp.* +import caseapp._ import scala.build.options.{BuildOptions, InternalOptions} import scala.build.{Directories, Logger, Os} diff --git a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopStartOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopStartOptions.scala index 1bdb421c93..41103ebe59 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopStartOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/bloop/BloopStartOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.bloop -import caseapp.* +import caseapp._ import scala.cli.commands.shared._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/bsp/Bsp.scala b/modules/cli/src/main/scala/scala/cli/commands/bsp/Bsp.scala index 7c2595ac94..cc84534314 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/bsp/Bsp.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/bsp/Bsp.scala @@ -1,18 +1,18 @@ package scala.cli.commands.bsp -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker import scala.build.EitherCps.{either, value} -import scala.build.* +import scala.build._ import scala.build.bsp.{BspReloadableOptions, BspThreads} import scala.build.errors.BuildException import scala.build.input.Inputs import scala.build.internals.EnvVar import scala.build.options.{BuildOptions, Scope} import scala.cli.commands.ScalaCommand -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.shared.SharedOptions import scala.cli.config.{ConfigDb, Keys} import scala.cli.launcher.LauncherOptions @@ -152,10 +152,10 @@ object Bsp extends ScalaCommand[BspOptions] { } val bspReloadableOptionsReference = BspReloadableOptions.Reference { () => - val sharedOptions = getSharedOptions() - val launcherOptions = getLauncherOptions() - val envs = getEnvsFromFile() - val bloopRifleConfig = sharedOptions.bloopRifleConfig() + val sharedOptions = getSharedOptions() + val launcherOptions = getLauncherOptions() + val envs = getEnvsFromFile() + sharedOptions.bloopRifleConfig() refreshPowerMode(launcherOptions, sharedOptions, envs) diff --git a/modules/cli/src/main/scala/scala/cli/commands/bsp/BspOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/bsp/BspOptions.scala index d81af50ef1..6dff4521e3 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/bsp/BspOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/bsp/BspOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.bsp -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.fullRunnerName import scala.cli.commands.shared.{HasSharedOptions, HelpMessages, SharedOptions} diff --git a/modules/cli/src/main/scala/scala/cli/commands/clean/Clean.scala b/modules/cli/src/main/scala/scala/cli/commands/clean/Clean.scala index 1d2c2e5287..ef19d787be 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/clean/Clean.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/clean/Clean.scala @@ -1,6 +1,6 @@ package scala.cli.commands.clean -import caseapp.* +import caseapp._ import scala.build.input.Inputs import scala.build.internal.Constants diff --git a/modules/cli/src/main/scala/scala/cli/commands/clean/CleanOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/clean/CleanOptions.scala index 36bbafc03e..50e6a63490 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/clean/CleanOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/clean/CleanOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.clean -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.fullRunnerName import scala.cli.commands.shared._ diff --git a/modules/cli/src/main/scala/scala/cli/commands/compile/Compile.scala b/modules/cli/src/main/scala/scala/cli/commands/compile/Compile.scala index b8ec04ac48..3770abd335 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/compile/Compile.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/compile/Compile.scala @@ -1,6 +1,6 @@ package scala.cli.commands.compile -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat import java.io.File @@ -8,16 +8,16 @@ import java.io.File import scala.build.options.{BuildOptions, Scope} import scala.build.{Build, BuildThreads, Builds, Logger, Os} import scala.cli.CurrentParams -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.setupide.SetupIde import scala.cli.commands.shared.{HelpCommandGroup, HelpGroup, SharedOptions} import scala.cli.commands.update.Update import scala.cli.commands.util.BuildCommandHelpers -import scala.cli.commands.util.BuildCommandHelpers.* +import scala.cli.commands.util.BuildCommandHelpers._ import scala.cli.commands.{CommandUtils, ScalaCommand, SpecificationLevel, WatchUtil} import scala.cli.config.{ConfigDb, Keys} import scala.cli.packaging.Library.fullClassPathMaybeAsJar -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.util.ConfigDbUtils object Compile extends ScalaCommand[CompileOptions] with BuildCommandHelpers { override def group: String = HelpCommandGroup.Main.toString diff --git a/modules/cli/src/main/scala/scala/cli/commands/compile/CompileOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/compile/CompileOptions.scala index 5b71b51f41..d99fb80a5c 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/compile/CompileOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/compile/CompileOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.compile -import caseapp.* +import caseapp._ import caseapp.core.help.Help import scala.cli.commands.shared._ diff --git a/modules/cli/src/main/scala/scala/cli/commands/config/Config.scala b/modules/cli/src/main/scala/scala/cli/commands/config/Config.scala index f6b3f0dad2..49e708b08a 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/config/Config.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/config/Config.scala @@ -4,16 +4,16 @@ import caseapp.core.RemainingArgs import caseapp.core.help.HelpFormat import coursier.cache.ArchiveCache -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.errors.{BuildException, CompositeBuildException, MalformedCliInputError} import scala.build.internal.util.WarningMessages import scala.build.internals.FeatureType import scala.build.{Directories, Logger} -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.shared.HelpGroup import scala.cli.commands.{ScalaCommand, SpecificationLevel} import scala.cli.config._ -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.util.ConfigDbUtils object Config extends ScalaCommand[ConfigOptions] { override def scalaSpecificationLevel: SpecificationLevel = SpecificationLevel.MUST diff --git a/modules/cli/src/main/scala/scala/cli/commands/config/ConfigOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/config/ConfigOptions.scala index c47008d64d..fe4cc7f64b 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/config/ConfigOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/config/ConfigOptions.scala @@ -1,11 +1,11 @@ package scala.cli.commands.config -import caseapp.* +import caseapp._ import scala.build.internals.ConsoleUtils.ScalaCliConsole import scala.cli.ScalaCli.{allowRestrictedFeatures, fullRunnerName, progName} import scala.cli.commands.pgp.PgpScalaSigningOptions -import scala.cli.commands.shared.* +import scala.cli.commands.shared._ import scala.cli.commands.tags import scala.cli.config.{Key, Keys} diff --git a/modules/cli/src/main/scala/scala/cli/commands/config/ThrowawayPgpSecret.scala b/modules/cli/src/main/scala/scala/cli/commands/config/ThrowawayPgpSecret.scala index aef0dad9d9..8d2a1aaf9d 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/config/ThrowawayPgpSecret.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/config/ThrowawayPgpSecret.scala @@ -7,7 +7,7 @@ import java.security.SecureRandom import scala.build.EitherCps.{either, value} import scala.build.errors.BuildException -import scala.build.{Logger, options as bo} +import scala.build.{Logger, options => bo} import scala.cli.commands.pgp.PgpProxyMaker import scala.cli.commands.shared.{CoursierOptions, SharedJvmOptions} import scala.cli.errors.PgpError diff --git a/modules/cli/src/main/scala/scala/cli/commands/default/DefaultFileOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/default/DefaultFileOptions.scala index c147cd5443..ac32ea0548 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/default/DefaultFileOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/default/DefaultFileOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.default -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.fullRunnerName import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions, HelpGroup, HelpMessages} diff --git a/modules/cli/src/main/scala/scala/cli/commands/default/DefaultOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/default/DefaultOptions.scala index ad5432033d..b32736aead 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/default/DefaultOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/default/DefaultOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.default -import caseapp.* +import caseapp._ import scala.cli.commands.repl.SharedReplOptions import scala.cli.commands.run.SharedRunOptions diff --git a/modules/cli/src/main/scala/scala/cli/commands/default/LegacyScalaOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/default/LegacyScalaOptions.scala index 5d1e3031db..dc20c7c25d 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/default/LegacyScalaOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/default/LegacyScalaOptions.scala @@ -1,13 +1,13 @@ package scala.cli.commands.default -import caseapp.* +import caseapp._ import caseapp.core.Indexed import scala.build.Logger import scala.cli.ScalaCli import scala.cli.ScalaCli.{fullRunnerName, progName} import scala.cli.commands.bloop.BloopExit -import scala.cli.commands.default.LegacyScalaOptions.* +import scala.cli.commands.default.LegacyScalaOptions._ import scala.cli.commands.package0.Package import scala.cli.commands.shared.HelpGroup import scala.cli.commands.shared.HelpMessages.PowerString diff --git a/modules/cli/src/main/scala/scala/cli/commands/dependencyupdate/DependencyUpdate.scala b/modules/cli/src/main/scala/scala/cli/commands/dependencyupdate/DependencyUpdate.scala index d1a3fa898c..25bdd45798 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/dependencyupdate/DependencyUpdate.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/dependencyupdate/DependencyUpdate.scala @@ -1,6 +1,6 @@ package scala.cli.commands.dependencyupdate -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat import scala.build.actionable.ActionableDependencyHandler @@ -11,7 +11,7 @@ import scala.build.{CrossSources, Logger, Position, Sources} import scala.cli.CurrentParams import scala.cli.commands.shared.{HelpCommandGroup, HelpGroup, SharedOptions} import scala.cli.commands.{ScalaCommand, SpecificationLevel} -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ object DependencyUpdate extends ScalaCommand[DependencyUpdateOptions] { override def group: String = HelpCommandGroup.Main.toString diff --git a/modules/cli/src/main/scala/scala/cli/commands/dependencyupdate/DependencyUpdateOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/dependencyupdate/DependencyUpdateOptions.scala index 58d9c4897c..ea760d6878 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/dependencyupdate/DependencyUpdateOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/dependencyupdate/DependencyUpdateOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.dependencyupdate -import caseapp.* +import caseapp._ import caseapp.core.help.Help import scala.cli.commands.shared.{HasSharedOptions, HelpGroup, ScopeOptions, SharedOptions} diff --git a/modules/cli/src/main/scala/scala/cli/commands/directories/Directories.scala b/modules/cli/src/main/scala/scala/cli/commands/directories/Directories.scala index 632de8ee02..6e0729a0b8 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/directories/Directories.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/directories/Directories.scala @@ -1,6 +1,6 @@ package scala.cli.commands.directories -import caseapp.* +import caseapp._ import scala.build.Logger import scala.cli.CurrentParams diff --git a/modules/cli/src/main/scala/scala/cli/commands/directories/DirectoriesOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/directories/DirectoriesOptions.scala index 7355ffceb5..454df1a6c0 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/directories/DirectoriesOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/directories/DirectoriesOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.directories -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.fullRunnerName import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions} diff --git a/modules/cli/src/main/scala/scala/cli/commands/doc/Doc.scala b/modules/cli/src/main/scala/scala/cli/commands/doc/Doc.scala index 01850d44fd..4cd5956be7 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/doc/Doc.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/doc/Doc.scala @@ -1,25 +1,25 @@ package scala.cli.commands.doc -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat -import dependency.* +import dependency._ import java.io.File import scala.build.EitherCps.{either, value} -import scala.build.* +import scala.build._ import scala.build.compiler.{ScalaCompilerMaker, SimpleScalaCompilerMaker} import scala.build.errors.BuildException import scala.build.interactive.InteractiveFileOps import scala.build.internal.{Constants, Runner} import scala.build.options.{BuildOptions, Scope} import scala.cli.CurrentParams -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.shared.{HelpCommandGroup, HelpGroup, SharedOptions} import scala.cli.commands.{CommandUtils, ScalaCommand, SpecificationLevel} import scala.cli.config.{ConfigDb, Keys} import scala.cli.errors.ScaladocGenerationFailedError -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.util.ConfigDbUtils import scala.util.Properties diff --git a/modules/cli/src/main/scala/scala/cli/commands/doc/DocOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/doc/DocOptions.scala index 3ce8ddebbc..cecd851db2 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/doc/DocOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/doc/DocOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.doc -import caseapp.* +import caseapp._ import caseapp.core.help.Help import scala.cli.ScalaCli.fullRunnerName diff --git a/modules/cli/src/main/scala/scala/cli/commands/export0/Export.scala b/modules/cli/src/main/scala/scala/cli/commands/export0/Export.scala index 66641fe192..d948ab3910 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/export0/Export.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/export0/Export.scala @@ -1,8 +1,8 @@ package scala.cli.commands.export0 -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat -import com.github.plokhotnyuk.jsoniter_scala.core.* +import com.github.plokhotnyuk.jsoniter_scala.core._ import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker import com.google.gson.{Gson, GsonBuilder} import coursier.cache.FileCache @@ -12,7 +12,7 @@ import java.io.{OutputStreamWriter, PrintStream} import java.nio.charset.{Charset, StandardCharsets} import scala.build.EitherCps.{either, value} -import scala.build.* +import scala.build._ import scala.build.errors.BuildException import scala.build.input.Inputs import scala.build.internal.Constants @@ -20,8 +20,8 @@ import scala.build.options.{BuildOptions, Platform, Scope} import scala.cli.CurrentParams import scala.cli.commands.shared.{HelpGroup, SharedOptions} import scala.cli.commands.{ScalaCommand, SpecificationLevel} -import scala.cli.exportCmd.* -import scala.cli.util.ArgHelpers.* +import scala.cli.exportCmd._ +import scala.cli.util.ArgHelpers._ import scala.util.Using object Export extends ScalaCommand[ExportOptions] { diff --git a/modules/cli/src/main/scala/scala/cli/commands/export0/ExportOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/export0/ExportOptions.scala index b3db6619aa..637feceace 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/export0/ExportOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/export0/ExportOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.export0 -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.fullRunnerName import scala.cli.commands.shared.{ diff --git a/modules/cli/src/main/scala/scala/cli/commands/fix/BuiltInRules.scala b/modules/cli/src/main/scala/scala/cli/commands/fix/BuiltInRules.scala index ae88854602..64d8fb3eeb 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/fix/BuiltInRules.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/fix/BuiltInRules.scala @@ -1,14 +1,13 @@ package scala.cli.commands.fix - import caseapp.core.RemainingArgs import os.{BasePathImpl, FilePath} import scala.build.Ops.EitherMap2 import scala.build.errors.{BuildException, CompositeBuildException} -import scala.build.input.* +import scala.build.input._ import scala.build.internal.Constants import scala.build.options.{BuildOptions, Scope, SuppressWarningOptions} -import scala.build.preprocessing.directives.* +import scala.build.preprocessing.directives._ import scala.build.preprocessing.{ExtractedDirectives, SheBang} import scala.build.{BuildThreads, CrossSources, Logger, Position, Sources} import scala.cli.commands.shared.SharedOptions diff --git a/modules/cli/src/main/scala/scala/cli/commands/fix/Fix.scala b/modules/cli/src/main/scala/scala/cli/commands/fix/Fix.scala index 0945ef9f76..413b6c457e 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/fix/Fix.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/fix/Fix.scala @@ -5,10 +5,10 @@ import caseapp.core.RemainingArgs import scala.build.EitherCps.{either, value} import scala.build.Ops.EitherMap2 import scala.build.errors.{BuildException, CompositeBuildException} -import scala.build.input.* +import scala.build.input._ import scala.build.internal.Constants import scala.build.options.{BuildOptions, Scope, SuppressWarningOptions} -import scala.build.preprocessing.directives.* +import scala.build.preprocessing.directives._ import scala.build.preprocessing.{ExtractedDirectives, SheBang} import scala.build.{BuildThreads, CrossSources, Logger, Position, Sources} import scala.cli.commands.shared.SharedOptions diff --git a/modules/cli/src/main/scala/scala/cli/commands/fix/FixOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/fix/FixOptions.scala index 0cf2beeccc..fbd4f21b86 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/fix/FixOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/fix/FixOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.fix -import caseapp.* +import caseapp._ import caseapp.core.help.Help import scala.cli.ScalaCli diff --git a/modules/cli/src/main/scala/scala/cli/commands/fix/ScalafixOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/fix/ScalafixOptions.scala index f1dd36871e..03584fcb88 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/fix/ScalafixOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/fix/ScalafixOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.fix -import caseapp.* +import caseapp._ import coursier.core.Version import scala.build.EitherCps.{either, value} diff --git a/modules/cli/src/main/scala/scala/cli/commands/fix/ScalafixRules.scala b/modules/cli/src/main/scala/scala/cli/commands/fix/ScalafixRules.scala index b98980cf93..8c4059fc8b 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/fix/ScalafixRules.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/fix/ScalafixRules.scala @@ -1,7 +1,7 @@ package scala.cli.commands.fix import coursier.cache.FileCache -import scalafix.interfaces.ScalafixError.* +import scalafix.interfaces.ScalafixError._ import java.io.File @@ -17,9 +17,9 @@ import scala.cli.commands.fix.ScalafixOptions import scala.cli.commands.shared.SharedOptions import scala.cli.commands.util.BuildCommandHelpers.copyOutput import scala.cli.commands.util.CommandHelpers -import scala.cli.commands.util.ScalacOptionsUtil.* -import scala.jdk.CollectionConverters.* -import scala.jdk.OptionConverters.* +import scala.cli.commands.util.ScalacOptionsUtil._ +import scala.jdk.CollectionConverters._ +import scala.jdk.OptionConverters._ object ScalafixRules extends CommandHelpers { def runRules( diff --git a/modules/cli/src/main/scala/scala/cli/commands/fmt/Fmt.scala b/modules/cli/src/main/scala/scala/cli/commands/fmt/Fmt.scala index 6c1d3d8aff..1e0a403a30 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/fmt/Fmt.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/fmt/Fmt.scala @@ -1,8 +1,8 @@ package scala.cli.commands.fmt -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat -import dependency.* +import dependency._ import scala.build.input.{Inputs, ProjectScalaFile, Script, SourceScalaFile} import scala.build.internal.{Constants, ExternalBinaryParams, FetchExternalBinary, Runner} @@ -11,9 +11,9 @@ import scala.build.options.BuildOptions import scala.build.{Logger, Sources} import scala.cli.CurrentParams import scala.cli.commands.ScalaCommand -import scala.cli.commands.fmt.FmtUtil.* +import scala.cli.commands.fmt.FmtUtil._ import scala.cli.commands.shared.{HelpCommandGroup, HelpGroup, SharedOptions} -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ object Fmt extends ScalaCommand[FmtOptions] { override def group: String = HelpCommandGroup.Main.toString diff --git a/modules/cli/src/main/scala/scala/cli/commands/fmt/FmtOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/fmt/FmtOptions.scala index 979fe73a65..e01fd8808b 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/fmt/FmtOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/fmt/FmtOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.fmt -import caseapp.* +import caseapp._ import coursier.core.Version import scala.build.EitherCps.{either, value} diff --git a/modules/cli/src/main/scala/scala/cli/commands/github/LibSodiumJni.scala b/modules/cli/src/main/scala/scala/cli/commands/github/LibSodiumJni.scala index e5891f4eb2..5857ed5cb9 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/github/LibSodiumJni.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/github/LibSodiumJni.scala @@ -13,7 +13,7 @@ import scala.build.Logger import scala.build.errors.BuildException import scala.build.internal.{Constants, FetchExternalBinary} import scala.build.internals.EnvVar -import scala.cli.internal.Constants as CliConstants +import scala.cli.internal.{Constants => CliConstants} import scala.util.Properties import scala.util.control.NonFatal diff --git a/modules/cli/src/main/scala/scala/cli/commands/github/SecretCreate.scala b/modules/cli/src/main/scala/scala/cli/commands/github/SecretCreate.scala index 7a308ad51a..718197fc91 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/github/SecretCreate.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/github/SecretCreate.scala @@ -2,22 +2,22 @@ package scala.cli.commands.github import caseapp.core.RemainingArgs import caseapp.core.help.HelpFormat -import com.github.plokhotnyuk.jsoniter_scala.core.* +import com.github.plokhotnyuk.jsoniter_scala.core._ import coursier.cache.ArchiveCache -import sttp.client3.* +import sttp.client3._ import java.nio.charset.StandardCharsets import java.util.Base64 import scala.build.EitherCps.{either, value} import scala.build.Logger -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.shared.HelpGroup import scala.cli.commands.util.ScalaCliSttpBackend import scala.cli.commands.{ScalaCommand, SpecificationLevel} import scala.cli.config.{PasswordOption, Secret} import scala.cli.errors.GitHubApiError -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ object SecretCreate extends ScalaCommand[SecretCreateOptions] { diff --git a/modules/cli/src/main/scala/scala/cli/commands/github/SecretCreateOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/github/SecretCreateOptions.scala index f357b06a45..0435afd740 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/github/SecretCreateOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/github/SecretCreateOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.github -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.progName import scala.cli.commands.shared.{CoursierOptions, HelpGroup, HelpMessages} diff --git a/modules/cli/src/main/scala/scala/cli/commands/github/SecretList.scala b/modules/cli/src/main/scala/scala/cli/commands/github/SecretList.scala index 9e7677207e..53c1689a89 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/github/SecretList.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/github/SecretList.scala @@ -2,18 +2,18 @@ package scala.cli.commands.github import caseapp.core.RemainingArgs import caseapp.core.help.HelpFormat -import com.github.plokhotnyuk.jsoniter_scala.core.* -import sttp.client3.* +import com.github.plokhotnyuk.jsoniter_scala.core._ +import sttp.client3._ import scala.build.EitherCps.{either, value} import scala.build.Logger -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.shared.HelpGroup import scala.cli.commands.util.ScalaCliSttpBackend import scala.cli.commands.{ScalaCommand, SpecificationLevel} import scala.cli.config.Secret import scala.cli.errors.GitHubApiError -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ object SecretList extends ScalaCommand[SecretListOptions] { diff --git a/modules/cli/src/main/scala/scala/cli/commands/github/SecretListOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/github/SecretListOptions.scala index 8e6086618b..890c743c70 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/github/SecretListOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/github/SecretListOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.github -import caseapp.* +import caseapp._ // format: off @HelpMessage("Lists secrets for a given GitHub repository.") diff --git a/modules/cli/src/main/scala/scala/cli/commands/github/SharedSecretOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/github/SharedSecretOptions.scala index dc860cdc68..7d0dcfb43c 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/github/SharedSecretOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/github/SharedSecretOptions.scala @@ -1,11 +1,11 @@ package scala.cli.commands.github -import caseapp.* +import caseapp._ import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions, HelpGroup} import scala.cli.commands.tags import scala.cli.signing.shared.{PasswordOption, Secret} -import scala.cli.signing.util.ArgParsers.* +import scala.cli.signing.util.ArgParsers._ // format: off final case class SharedSecretOptions( diff --git a/modules/cli/src/main/scala/scala/cli/commands/installcompletions/InstallCompletions.scala b/modules/cli/src/main/scala/scala/cli/commands/installcompletions/InstallCompletions.scala index 836068aeee..8c86d540e9 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/installcompletions/InstallCompletions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/installcompletions/InstallCompletions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.installcompletions -import caseapp.* +import caseapp._ import caseapp.core.complete.{Bash, Fish, Zsh} import caseapp.core.help.HelpFormat @@ -14,7 +14,7 @@ import scala.build.{Directories, Logger} import scala.cli.commands.shared.HelpGroup import scala.cli.commands.{ScalaCommand, SpecificationLevel} import scala.cli.internal.{Argv0, ProfileFileUpdater} -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.{CurrentParams, ScalaCli} object InstallCompletions extends ScalaCommand[InstallCompletionsOptions] { override def names = List( diff --git a/modules/cli/src/main/scala/scala/cli/commands/installcompletions/InstallCompletionsOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/installcompletions/InstallCompletionsOptions.scala index 73e2167147..a40261d1ba 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/installcompletions/InstallCompletionsOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/installcompletions/InstallCompletionsOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.installcompletions -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.fullRunnerName import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions, HelpGroup, HelpMessages} diff --git a/modules/cli/src/main/scala/scala/cli/commands/installhome/InstallHome.scala b/modules/cli/src/main/scala/scala/cli/commands/installhome/InstallHome.scala index 0e5153679a..36765134d8 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/installhome/InstallHome.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/installhome/InstallHome.scala @@ -1,6 +1,6 @@ package scala.cli.commands.installhome -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat import coursier.env.{EnvironmentUpdate, ProfileUpdater} @@ -13,7 +13,7 @@ import scala.cli.commands.{ ScalaCommand, SpecificationLevel } -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.io.StdIn.readLine import scala.util.Properties diff --git a/modules/cli/src/main/scala/scala/cli/commands/installhome/InstallHomeOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/installhome/InstallHomeOptions.scala index 9e0242c54b..eb57570646 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/installhome/InstallHomeOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/installhome/InstallHomeOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.installhome -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.{baseRunnerName, fullRunnerName} import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions, HelpGroup} diff --git a/modules/cli/src/main/scala/scala/cli/commands/new/New.scala b/modules/cli/src/main/scala/scala/cli/commands/new/New.scala index 71477efdae..d24bd180a4 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/new/New.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/new/New.scala @@ -1,7 +1,7 @@ package scala.cli.commands.`new` import caseapp.core.RemainingArgs -import dependency.* +import dependency._ import scala.build.internal.{Constants, OsLibc, Runner} import scala.build.options.{BuildOptions, JavaOptions} diff --git a/modules/cli/src/main/scala/scala/cli/commands/new/NewOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/new/NewOptions.scala index 517a00eb55..3334bd364e 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/new/NewOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/new/NewOptions.scala @@ -1,8 +1,8 @@ package scala.cli.commands.`new` -import caseapp.* +import caseapp._ -import scala.cli.commands.shared.* +import scala.cli.commands.shared._ @HelpMessage(NewOptions.newMessage, "", NewOptions.detailedNewMessage) final case class NewOptions( diff --git a/modules/cli/src/main/scala/scala/cli/commands/package0/Package.scala b/modules/cli/src/main/scala/scala/cli/commands/package0/Package.scala index 82b48aa740..b7dd642da4 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/package0/Package.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/package0/Package.scala @@ -1,12 +1,12 @@ package scala.cli.commands.package0 import ai.kien.python.Python -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat -import coursier.launcher.* -import dependency.* +import coursier.launcher._ +import dependency._ import os.{BasePathImpl, FilePath, Path, SegmentedPath} -import packager.config.* +import packager.config._ import packager.deb.DebianPackage import packager.docker.DockerPackage import packager.mac.dmg.DmgPackage @@ -20,30 +20,30 @@ import java.nio.file.attribute.FileTime import java.util.zip.{ZipEntry, ZipOutputStream} import scala.build.EitherCps.{either, value} -import scala.build.Ops.* -import scala.build.* -import scala.build.errors.* +import scala.build.Ops._ +import scala.build._ +import scala.build.errors._ import scala.build.interactive.InteractiveFileOps -import scala.build.internal.Util.* +import scala.build.internal.Util._ import scala.build.internal.resource.NativeResourceMapper import scala.build.internal.{Runner, ScalaJsLinkerConfig} import scala.build.options.PackageType.Native import scala.build.options.{BuildOptions, JavaOpt, PackageType, Platform, ScalaNativeTarget, Scope} import scala.cli.CurrentParams -import scala.cli.commands.OptionsHelper.* +import scala.cli.commands.OptionsHelper._ import scala.cli.commands.doc.Doc import scala.cli.commands.packaging.Spark -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.run.Run.orPythonDetectionError import scala.cli.commands.shared.{HelpCommandGroup, HelpGroup, MainClassOptions, SharedOptions} import scala.cli.commands.util.BuildCommandHelpers -import scala.cli.commands.util.BuildCommandHelpers.* +import scala.cli.commands.util.BuildCommandHelpers._ import scala.cli.commands.{CommandUtils, ScalaCommand, WatchUtil} import scala.cli.config.{ConfigDb, Keys} import scala.cli.errors.ScalaJsLinkingError import scala.cli.internal.{CachedBinary, Constants, ProcUtil, ScalaJsLinker} import scala.cli.packaging.{Library, NativeImage} -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.util.ConfigDbUtils import scala.util.Properties @@ -1083,8 +1083,6 @@ object Package extends ScalaCommand[PackageOptions] with BuildCommandHelpers { } }.toSeq.flatten - import PackageType.Native.* - val allCliOptions = pythonCliOptions ++ cliOptions ++ libraryLinkingOptions ++ diff --git a/modules/cli/src/main/scala/scala/cli/commands/package0/PackageOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/package0/PackageOptions.scala index d42760ebc7..914f130884 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/package0/PackageOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/package0/PackageOptions.scala @@ -1,17 +1,17 @@ package scala.cli.commands.package0 -import caseapp.* +import caseapp._ import caseapp.core.help.Help import scala.build.EitherCps.{either, value} -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.compiler.{ScalaCompilerMaker, SimpleScalaCompilerMaker} import scala.build.errors.{BuildException, CompositeBuildException, ModuleFormatError} -import scala.build.options.* -import scala.build.options.packaging.* +import scala.build.options._ +import scala.build.options.packaging._ import scala.build.{BuildThreads, Positioned} import scala.cli.commands.package0.PackageOptions -import scala.cli.commands.shared.* +import scala.cli.commands.shared._ import scala.cli.commands.tags @HelpMessage(PackageOptions.helpMessage, "", PackageOptions.detailedHelpMessage) diff --git a/modules/cli/src/main/scala/scala/cli/commands/package0/PackagerOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/package0/PackagerOptions.scala index 82a92097b1..f03a94061b 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/package0/PackagerOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/package0/PackagerOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.package0 -import caseapp.* +import caseapp._ import scala.cli.commands.shared.HelpGroup import scala.cli.commands.{Constants, tags} diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/DummyOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/DummyOptions.scala index ea1dabcbd0..fd1fbdff31 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/DummyOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/DummyOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.pgp -import caseapp.* +import caseapp._ final case class DummyOptions() diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/ExternalCommand.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/ExternalCommand.scala index 4965d99192..84387cfa30 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/ExternalCommand.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/ExternalCommand.scala @@ -1,6 +1,6 @@ package scala.cli.commands.pgp -import caseapp.* +import caseapp._ import scala.cli.commands.util.CommandHelpers diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpCommands.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpCommands.scala index ce4cdb274d..23ea5ad3de 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpCommands.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpCommands.scala @@ -1,5 +1,4 @@ package scala.cli.commands.pgp - import caseapp.core.app.Command class PgpCommands { diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpExternalCommand.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpExternalCommand.scala index 90b5e5bc6c..4090620ae4 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpExternalCommand.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpExternalCommand.scala @@ -4,12 +4,12 @@ import coursier.Repositories import coursier.cache.{ArchiveCache, Cache, FileCache} import coursier.core.Version import coursier.util.Task -import dependency.* +import dependency._ import java.io.File import scala.build.EitherCps.{either, value} -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.errors.{BuildException, ScalaJsLinkingError} import scala.build.internal.Util.{DependencyOps, ModuleOps} import scala.build.internal.{ @@ -22,7 +22,7 @@ import scala.build.internal.{ } import scala.build.options.BuildOptions import scala.build.options.scalajs.ScalaJsLinkerOptions -import scala.build.{Logger, Positioned, options as bo} +import scala.build.{Logger, Positioned, options => bo} import scala.cli.ScalaCli import scala.cli.commands.shared.{CoursierOptions, SharedJvmOptions} import scala.cli.commands.util.JvmUtils diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpExternalOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpExternalOptions.scala index a15b50d76b..00b0f64758 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpExternalOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpExternalOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.pgp -import caseapp.* +import caseapp._ import scala.cli.commands.shared.{ CoursierOptions, diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpProxy.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpProxy.scala index 4ecaf6c455..266b50e96c 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpProxy.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpProxy.scala @@ -4,7 +4,7 @@ import coursier.cache.{Cache, FileCache} import coursier.util.Task import scala.build.errors.BuildException -import scala.build.{Logger, options as bo} +import scala.build.{Logger, options => bo} import scala.cli.commands.pgp.{PgpCreateExternal, PgpKeyIdExternal} import scala.cli.commands.shared.{CoursierOptions, SharedJvmOptions} import scala.cli.errors.PgpError diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpProxyJvm.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpProxyJvm.scala index 3860cffb4d..b4a85c7d2f 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpProxyJvm.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpProxyJvm.scala @@ -7,7 +7,7 @@ import coursier.util.Task import java.nio.charset.StandardCharsets import scala.build.errors.BuildException -import scala.build.{Logger, options as bo} +import scala.build.{Logger, options => bo} import scala.cli.commands.shared.{CoursierOptions, SharedJvmOptions} import scala.cli.errors.PgpError import scala.cli.signing.commands.{PgpCreate, PgpCreateOptions, PgpKeyId} diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpPullOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpPullOptions.scala index 5fe8b903b4..d9d0360fde 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpPullOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpPullOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.pgp -import caseapp.* +import caseapp._ import scala.cli.commands.shared.{ GlobalOptions, diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpPushOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpPushOptions.scala index dd98b263f3..0a4dee71c5 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpPushOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpPushOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.pgp -import caseapp.* +import caseapp._ import scala.cli.commands.shared._ diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpScalaSigningOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpScalaSigningOptions.scala index 7a81f25978..4d59b07dde 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpScalaSigningOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/PgpScalaSigningOptions.scala @@ -1,9 +1,9 @@ package scala.cli.commands.pgp -import caseapp.* +import caseapp._ import scala.build.internal.Constants -import scala.build.options as bo +import scala.build.{options => bo} import scala.cli.commands.shared.{CoursierOptions, HelpGroup, LoggingOptions, SharedJvmOptions} import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/pgp/SharedPgpPushPullOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/pgp/SharedPgpPushPullOptions.scala index 1db1b3189d..1668a16ee4 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/pgp/SharedPgpPushPullOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/pgp/SharedPgpPushPullOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.pgp -import caseapp.* +import caseapp._ import sttp.model.Uri import scala.build.Logger diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/Publish.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/Publish.scala index 66b33c8f29..455de415cb 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/Publish.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/Publish.scala @@ -24,8 +24,8 @@ import java.util.concurrent.Executors import java.util.function.Supplier import scala.build.EitherCps.{either, value} -import scala.build.Ops.* -import scala.build.* +import scala.build.Ops._ +import scala.build._ import scala.build.compiler.ScalaCompilerMaker import scala.build.errors.{BuildException, CompositeBuildException, NoMainClassFoundError, Severity} import scala.build.input.Inputs @@ -41,9 +41,9 @@ import scala.build.options.{ Scope } import scala.cli.CurrentParams -import scala.cli.commands.package0.Package as PackageCmd +import scala.cli.commands.package0.{Package => PackageCmd} import scala.cli.commands.pgp.{PgpExternalCommand, PgpScalaSigningOptions} -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.publish.{PublishParamsOptions, PublishRepositoryOptions} import scala.cli.commands.shared.{ HelpCommandGroup, @@ -66,9 +66,9 @@ import scala.cli.errors.{ } import scala.cli.packaging.Library import scala.cli.publish.BouncycastleSignerMaker -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.util.ConfigDbUtils -import scala.cli.util.ConfigPasswordOptionHelpers.* +import scala.cli.util.ConfigPasswordOptionHelpers._ import scala.concurrent.duration.DurationInt import scala.util.control.NonFatal diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishConnectionOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishConnectionOptions.scala index bff87fe45b..4a42362d90 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishConnectionOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishConnectionOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.publish -import caseapp.* +import caseapp._ import scala.cli.commands.shared.{HelpGroup, SharedVersionOptions} import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishLocal.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishLocal.scala index 625d514800..2b32f7f3bd 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishLocal.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishLocal.scala @@ -9,7 +9,7 @@ import scala.cli.CurrentParams import scala.cli.commands.ScalaCommand import scala.cli.commands.shared.{HelpCommandGroup, SharedOptions} import scala.cli.config.ConfigDb -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ object PublishLocal extends ScalaCommand[PublishLocalOptions] { override def group: String = HelpCommandGroup.Main.toString diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishLocalOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishLocalOptions.scala index 1f8a07c6e4..ff0588db18 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishLocalOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishLocalOptions.scala @@ -1,10 +1,10 @@ package scala.cli.commands.publish -import caseapp.* +import caseapp._ import scala.cli.commands.pgp.PgpScalaSigningOptions import scala.cli.commands.publish.PublishSetupOptions.{cmdName, docWebsiteSuffix, helpHeader} -import scala.cli.commands.shared.* +import scala.cli.commands.shared._ // format: off @HelpMessage(PublishLocalOptions.helpMessage, "", PublishLocalOptions.detailedHelpMessage) diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishOptions.scala index f5eaea78be..e95192597d 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishOptions.scala @@ -1,10 +1,10 @@ package scala.cli.commands.publish -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.baseRunnerName import scala.cli.commands.pgp.PgpScalaSigningOptions -import scala.cli.commands.shared.* +import scala.cli.commands.shared._ import scala.cli.commands.tags // format: off diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishParamsOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishParamsOptions.scala index 38d9a74755..b2144b9582 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishParamsOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishParamsOptions.scala @@ -1,13 +1,13 @@ package scala.cli.commands.publish -import caseapp.* +import caseapp._ import scala.build.internals.EnvVar import scala.cli.commands.shared.{HelpGroup, SharedVersionOptions} import scala.cli.commands.tags import scala.cli.signing.shared.PasswordOption -import scala.cli.signing.util.ArgParsers.* -import scala.cli.util.ArgParsers.* +import scala.cli.signing.util.ArgParsers._ +import scala.cli.util.ArgParsers._ import scala.cli.util.MaybeConfigPasswordOption // format: off diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishRepositoryOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishRepositoryOptions.scala index 2e22ebd687..8a7d4dfb7f 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishRepositoryOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishRepositoryOptions.scala @@ -1,11 +1,11 @@ package scala.cli.commands.publish -import caseapp.* +import caseapp._ import scala.cli.commands.shared.HelpGroup import scala.cli.commands.tags import scala.cli.signing.shared.PasswordOption -import scala.cli.signing.util.ArgParsers.* +import scala.cli.signing.util.ArgParsers._ // format: off final case class PublishRepositoryOptions( diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishSetup.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishSetup.scala index ed301b5cc9..f3f0a4689c 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishSetup.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishSetup.scala @@ -6,19 +6,19 @@ import coursier.cache.ArchiveCache import java.nio.charset.StandardCharsets -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.errors.CompositeBuildException import scala.build.options.{BuildOptions, InternalOptions, Scope, SuppressWarningOptions} import scala.build.{CrossSources, Directories, Logger, Sources} import scala.cli.ScalaCli import scala.cli.commands.github.{LibSodiumJni, SecretCreate, SecretList} -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.shared.{HelpCommandGroup, SharedOptions} import scala.cli.commands.util.ScalaCliSttpBackend import scala.cli.commands.{CommandUtils, ScalaCommand, SpecificationLevel} import scala.cli.config.{ConfigDb, Keys} import scala.cli.internal.Constants -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.util.ConfigDbUtils object PublishSetup extends ScalaCommand[PublishSetupOptions] { diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishSetupOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishSetupOptions.scala index 093cc9958e..9c086a5a71 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/PublishSetupOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/PublishSetupOptions.scala @@ -1,12 +1,12 @@ package scala.cli.commands.publish -import caseapp.* +import caseapp._ import scala.cli.commands.pgp.{PgpScalaSigningOptions, SharedPgpPushPullOptions} -import scala.cli.commands.shared.* +import scala.cli.commands.shared._ import scala.cli.commands.tags import scala.cli.signing.shared.PasswordOption -import scala.cli.signing.util.ArgParsers.* +import scala.cli.signing.util.ArgParsers._ // format: off @HelpMessage(PublishSetupOptions.helpMessage, "", PublishSetupOptions.detailedHelpMessage) diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/RepositoryParser.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/RepositoryParser.scala index 6504c5edb2..ece8ada8eb 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/RepositoryParser.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/RepositoryParser.scala @@ -2,7 +2,6 @@ package scala.cli.commands.publish // from coursier.internal.SharedRepositoryParser // delete when coursier.internal.SharedRepositoryParser.repositoryOpt is available for us - import coursier.core.Repository import coursier.ivy.IvyRepository import coursier.maven.MavenRepository diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/SharedPublishOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/SharedPublishOptions.scala index c12b6e9788..862ddd097c 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/SharedPublishOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/SharedPublishOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.publish -import caseapp.* +import caseapp._ import scala.build.compiler.{ScalaCompilerMaker, SimpleScalaCompilerMaker} import scala.cli.commands.shared.{HelpGroup, ScopeOptions} diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/checks/CheckUtils.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/checks/CheckUtils.scala index 90a32984c1..4691c9c152 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/checks/CheckUtils.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/checks/CheckUtils.scala @@ -3,7 +3,7 @@ package scala.cli.commands.publish.checks import java.net.URI import scala.build.Logger -import scala.build.options.PublishOptions as BPublishOptions +import scala.build.options.{PublishOptions => BPublishOptions} import scala.cli.commands.publish.{PublishSetupOptions, RepoParams} object CheckUtils { diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/checks/PasswordCheck.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/checks/PasswordCheck.scala index b1135dfe50..b394f9f5c7 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/checks/PasswordCheck.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/checks/PasswordCheck.scala @@ -1,5 +1,4 @@ package scala.cli.commands.publish.checks - import java.net.URI import scala.build.EitherCps.{either, value} diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/checks/PgpSecretKeyCheck.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/checks/PgpSecretKeyCheck.scala index 5b12ee4e56..cfe5407ab2 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/checks/PgpSecretKeyCheck.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/checks/PgpSecretKeyCheck.scala @@ -2,26 +2,26 @@ package scala.cli.commands.publish.checks import coursier.cache.{ArchiveCache, FileCache} import coursier.util.Task -import sttp.client3.* +import sttp.client3._ import sttp.model.Uri import scala.build.EitherCps.{either, value} import scala.build.Logger -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.errors.{BuildException, CompositeBuildException, MalformedCliInputError} import scala.build.internal.util.WarningMessages import scala.build.options.publish.ConfigPasswordOption -import scala.build.options.publish.ConfigPasswordOption.* -import scala.build.options.PublishOptions as BPublishOptions +import scala.build.options.publish.ConfigPasswordOption._ +import scala.build.options.{PublishOptions => BPublishOptions} import scala.cli.commands.config.ThrowawayPgpSecret import scala.cli.commands.pgp.{KeyServer, PgpProxyMaker} -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.publish.{OptionCheck, PublishSetupOptions, SetSecret} import scala.cli.commands.util.JvmUtils import scala.cli.config.{ConfigDb, Keys} import scala.cli.errors.MissingPublishOptionError import scala.cli.signing.shared.PasswordOption -import scala.cli.util.ConfigPasswordOptionHelpers.* +import scala.cli.util.ConfigPasswordOptionHelpers._ /** Checks if: * - keys for signing files are present in using directives (either PGP or GPG) diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/checks/RepositoryCheck.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/checks/RepositoryCheck.scala index bb78e4d09f..baa7891117 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/checks/RepositoryCheck.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/checks/RepositoryCheck.scala @@ -2,7 +2,7 @@ package scala.cli.commands.publish.checks import scala.build.Logger import scala.build.errors.BuildException -import scala.build.options.PublishOptions as BPublishOptions +import scala.build.options.{PublishOptions => BPublishOptions} import scala.cli.commands.publish.{OptionCheck, PublishSetupOptions} import scala.cli.errors.MissingPublishOptionError diff --git a/modules/cli/src/main/scala/scala/cli/commands/publish/checks/UserCheck.scala b/modules/cli/src/main/scala/scala/cli/commands/publish/checks/UserCheck.scala index beb5020dbc..78ea59fedf 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/publish/checks/UserCheck.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/publish/checks/UserCheck.scala @@ -1,5 +1,4 @@ package scala.cli.commands.publish.checks - import java.net.URI import scala.build.EitherCps.{either, value} diff --git a/modules/cli/src/main/scala/scala/cli/commands/repl/Repl.scala b/modules/cli/src/main/scala/scala/cli/commands/repl/Repl.scala index 0d9fd788a1..7ccf76f7b0 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/repl/Repl.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/repl/Repl.scala @@ -1,18 +1,18 @@ package scala.cli.commands.repl import ai.kien.python.Python -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat import coursier.cache.FileCache import coursier.core.Version import coursier.error.{FetchError, ResolutionError} -import dependency.* +import dependency._ import java.io.File import java.util.zip.ZipFile import scala.build.EitherCps.{either, value} -import scala.build.* +import scala.build._ import scala.build.errors.{ BuildException, CantDownloadAmmoniteError, @@ -23,7 +23,7 @@ import scala.build.input.Inputs import scala.build.internal.{Constants, Runner} import scala.build.options.ScalacOpt.noDashPrefixes import scala.build.options.{BuildOptions, JavaOpt, MaybeScalaVersion, ScalaVersionUtil, Scope} -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.run.Run.{ maybePrintSimpleScalacOutput, orPythonDetectionError, @@ -35,10 +35,10 @@ import scala.cli.commands.util.BuildCommandHelpers import scala.cli.commands.{ScalaCommand, WatchUtil} import scala.cli.config.{ConfigDb, Keys} import scala.cli.packaging.Library -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.util.ConfigDbUtils import scala.cli.{CurrentParams, ScalaCli} -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.Properties object Repl extends ScalaCommand[ReplOptions] with BuildCommandHelpers { diff --git a/modules/cli/src/main/scala/scala/cli/commands/repl/ReplOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/repl/ReplOptions.scala index 868b5b407a..3d202c1554 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/repl/ReplOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/repl/ReplOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.repl -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.fullRunnerName import scala.cli.commands.shared.{HasSharedOptions, HelpMessages, SharedOptions} diff --git a/modules/cli/src/main/scala/scala/cli/commands/repl/SharedReplOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/repl/SharedReplOptions.scala index da7583b558..af6eaf0e42 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/repl/SharedReplOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/repl/SharedReplOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.repl -import caseapp.* +import caseapp._ import caseapp.core.help.Help import scala.cli.commands.shared.{ diff --git a/modules/cli/src/main/scala/scala/cli/commands/run/Run.scala b/modules/cli/src/main/scala/scala/cli/commands/run/Run.scala index 2a18e2c726..41c24f5c6d 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/run/Run.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/run/Run.scala @@ -1,7 +1,7 @@ package scala.cli.commands.run import ai.kien.python.Python -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat import java.io.File @@ -10,8 +10,8 @@ import java.util.concurrent.CompletableFuture import java.util.concurrent.atomic.AtomicReference import scala.build.EitherCps.{either, value} -import scala.build.Ops.* -import scala.build.* +import scala.build.Ops._ +import scala.build._ import scala.build.errors.{BuildException, CompositeBuildException} import scala.build.input.{Inputs, ScalaCliInvokeData, SubCommand} import scala.build.internal.{Constants, Runner, ScalaJsLinkerConfig} @@ -21,18 +21,18 @@ import scala.build.internals.EnvVar import scala.build.options.{BuildOptions, JavaOpt, PackageType, Platform, ScalacOpt, Scope} import scala.cli.CurrentParams import scala.cli.commands.package0.Package -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.run.RunMode import scala.cli.commands.setupide.SetupIde import scala.cli.commands.shared.{HelpCommandGroup, HelpGroup, SharedOptions} import scala.cli.commands.update.Update -import scala.cli.commands.util.BuildCommandHelpers.* +import scala.cli.commands.util.BuildCommandHelpers._ import scala.cli.commands.util.{BuildCommandHelpers, RunHadoop, RunSpark} import scala.cli.commands.{CommandUtils, ScalaCommand, SpecificationLevel, WatchUtil} import scala.cli.config.{ConfigDb, Keys} import scala.cli.internal.ProcUtil import scala.cli.packaging.Library.fullClassPathMaybeAsJar -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.util.ConfigDbUtils import scala.util.{Properties, Try} diff --git a/modules/cli/src/main/scala/scala/cli/commands/run/RunOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/run/RunOptions.scala index 1993aecb62..02c609f6d9 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/run/RunOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/run/RunOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.run -import caseapp.* +import caseapp._ import caseapp.core.help.Help import scala.cli.ScalaCli diff --git a/modules/cli/src/main/scala/scala/cli/commands/run/SharedRunOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/run/SharedRunOptions.scala index 832207f2c3..57c3244ca5 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/run/SharedRunOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/run/SharedRunOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.run -import caseapp.* +import caseapp._ import caseapp.core.help.Help import scala.cli.commands.shared._ diff --git a/modules/cli/src/main/scala/scala/cli/commands/setupide/SetupIde.scala b/modules/cli/src/main/scala/scala/cli/commands/setupide/SetupIde.scala index 1b3aa42ce3..883ec0ac62 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/setupide/SetupIde.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/setupide/SetupIde.scala @@ -1,15 +1,15 @@ package scala.cli.commands.setupide -import caseapp.* +import caseapp._ import ch.epfl.scala.bsp4j.BspConnectionDetails -import com.github.plokhotnyuk.jsoniter_scala.core.* +import com.github.plokhotnyuk.jsoniter_scala.core._ import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker import com.google.gson.GsonBuilder import java.nio.charset.{Charset, StandardCharsets} import scala.build.EitherCps.{either, value} -import scala.build.* +import scala.build._ import scala.build.bsp.IdeInputs import scala.build.errors.{BuildException, WorkspaceError} import scala.build.input.{Inputs, OnDisk, Virtual, WorkspaceOrigin} @@ -21,7 +21,7 @@ import scala.cli.commands.shared.{SharedBspFileOptions, SharedOptions} import scala.cli.commands.{CommandUtils, ScalaCommand} import scala.cli.errors.FoundVirtualInputsError import scala.cli.launcher.LauncherOptions -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ object SetupIde extends ScalaCommand[SetupIdeOptions] { @@ -47,7 +47,7 @@ object SetupIde extends ScalaCommand[SetupIdeOptions] { ) } - val sharedOptions = crossSources.sharedOptions(options) + crossSources.sharedOptions(options) val scopedSources = value(crossSources.scopedSources(options)) val mainSources = value(scopedSources.sources( diff --git a/modules/cli/src/main/scala/scala/cli/commands/setupide/SetupIdeOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/setupide/SetupIdeOptions.scala index 2d3cf269fb..031f29e11f 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/setupide/SetupIdeOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/setupide/SetupIdeOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.setupide -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.{baseRunnerName, fullRunnerName} import scala.cli.commands.shared.{ diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/AllExternalHelpOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/AllExternalHelpOptions.scala index 66dc531c7e..647b6180f6 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/AllExternalHelpOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/AllExternalHelpOptions.scala @@ -1,10 +1,10 @@ package scala.cli.commands.shared -import caseapp.core.Scala3Helpers.* +import caseapp.core.Scala3Helpers._ import caseapp.core.help.{Help, HelpFormat} -import caseapp.{Help, *} -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp.{Help, _} +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ @HelpMessage("Print help message") // this is an aggregate for all external and internal help options diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/BenchmarkingOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/BenchmarkingOptions.scala index 6d0ed1a579..4e49068e89 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/BenchmarkingOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/BenchmarkingOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.build.internal.Constants import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/CoursierOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/CoursierOptions.scala index 18c17ca1b5..0e97213ed3 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/CoursierOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/CoursierOptions.scala @@ -1,8 +1,8 @@ package scala.cli.commands.shared -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import coursier.cache.{CacheLogger, CachePolicy, FileCache} import scala.build.internals.EnvVar diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/CrossOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/CrossOptions.scala index 33147e9c17..6582ca545a 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/CrossOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/CrossOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/GlobalOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/GlobalOptions.scala index e3635489f9..46a4c8642d 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/GlobalOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/GlobalOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.launcher.PowerOptions diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/GlobalSuppressWarningOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/GlobalSuppressWarningOptions.scala index 6e04331eef..249e008b1e 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/GlobalSuppressWarningOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/GlobalSuppressWarningOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/HelpGroupOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/HelpGroupOptions.scala index 16f5d84b4b..5d5477b23c 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/HelpGroupOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/HelpGroupOptions.scala @@ -1,10 +1,10 @@ package scala.cli.commands.shared -import caseapp.* -import caseapp.core.Scala3Helpers.* +import caseapp._ +import caseapp.core.Scala3Helpers._ import caseapp.core.help.{Help, HelpFormat} -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/HelpMessages.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/HelpMessages.scala index d7fdea1cca..9fe01ff1f9 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/HelpMessages.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/HelpMessages.scala @@ -1,5 +1,4 @@ package scala.cli.commands.shared - import caseapp.core.Arg import scala.build.input.ScalaCliInvokeData @@ -7,7 +6,7 @@ import scala.build.internal.util.WarningMessages import scala.cli.ScalaCli import scala.cli.commands.{SpecificationLevel, tags} import scala.cli.config.Key -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ object HelpMessages { lazy val PowerString: String = if ScalaCli.allowRestrictedFeatures then "" else "--power " diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/HelpOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/HelpOptions.scala index 57ca68cc20..f7d640184f 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/HelpOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/HelpOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ // format: off @HelpMessage("Print help message") diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/JavaPropOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/JavaPropOptions.scala index 8144ed5c3d..51d5bc15df 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/JavaPropOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/JavaPropOptions.scala @@ -1,12 +1,12 @@ package scala.cli.commands.shared -import caseapp.* -import caseapp.core.Scala3Helpers.* +import caseapp._ +import caseapp.core.Scala3Helpers._ import caseapp.core.parser.{Argument, NilParser, StandardArgument} import caseapp.core.util.Formatter import caseapp.core.{Arg, Error} -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/LoggingOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/LoggingOptions.scala index 47a7834f5c..1e669b6266 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/LoggingOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/LoggingOptions.scala @@ -1,8 +1,8 @@ package scala.cli.commands.shared -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.build.{Logger, Os} import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/MainClassOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/MainClassOptions.scala index d871cb2bea..ead344d7cd 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/MainClassOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/MainClassOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.build.errors.{MainClassError, NoMainClassFoundError} import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/MarkdownOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/MarkdownOptions.scala index 0e93863653..6f4b27dcbb 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/MarkdownOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/MarkdownOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaCliHelp.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaCliHelp.scala index a04299c6f2..86eca7e0f1 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaCliHelp.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaCliHelp.scala @@ -3,7 +3,7 @@ package scala.cli.commands.shared import caseapp.core.Arg import caseapp.core.help.HelpFormat -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.util.{Properties, Try} object ScalaCliHelp { diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaJsOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaJsOptions.scala index 96045c4eec..3c8b01026d 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaJsOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaJsOptions.scala @@ -1,8 +1,8 @@ package scala.cli.commands.shared -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.cli.commands.{Constants, tags} diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaNativeOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaNativeOptions.scala index 79286e3b94..58ecb94d79 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaNativeOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/ScalaNativeOptions.scala @@ -1,8 +1,8 @@ package scala.cli.commands.shared -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.cli.commands.{Constants, tags} diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/ScalacExtraOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/ScalacExtraOptions.scala index 5d53ff6ce4..ff4ddb86bd 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/ScalacExtraOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/ScalacExtraOptions.scala @@ -1,8 +1,8 @@ package scala.cli.commands.shared -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/ScalacOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/ScalacOptions.scala index bb6eb324ad..16c3d7c12c 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/ScalacOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/ScalacOptions.scala @@ -1,12 +1,12 @@ package scala.cli.commands.shared -import caseapp.* -import caseapp.core.Scala3Helpers.* +import caseapp._ +import caseapp.core.Scala3Helpers._ import caseapp.core.parser.{Argument, ConsParser, NilParser, StandardArgument} import caseapp.core.util.Formatter import caseapp.core.{Arg, Error} -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.build.options.ScalacOpt.noDashPrefixes import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/ScopeOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/ScopeOptions.scala index 43cae7e6bb..81891a9452 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/ScopeOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/ScopeOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SemanticDbOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SemanticDbOptions.scala index 77075a02a0..f4d8855582 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SemanticDbOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SemanticDbOptions.scala @@ -1,8 +1,8 @@ package scala.cli.commands.shared -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedBspFileOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedBspFileOptions.scala index 35c3a67e32..7a07694c29 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedBspFileOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedBspFileOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedCompilationServerOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedCompilationServerOptions.scala index 91054ab969..3daf1fcf56 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedCompilationServerOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedCompilationServerOptions.scala @@ -2,11 +2,11 @@ package scala.cli.commands.shared import bloop.rifle.internal.BuildInfo import bloop.rifle.{BloopRifleConfig, BloopVersion, BspConnectionAddress} -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import coursier.cache.FileCache -import coursier.core.Version as Ver +import coursier.core.{Version => Ver} import coursier.util.Task import java.io.File @@ -17,7 +17,7 @@ import scala.build.internal.Util import scala.build.{Bloop, Logger, Os} import scala.cli.commands.Constants import scala.cli.commands.bloop.BloopJson -import scala.cli.commands.shared.* +import scala.cli.commands.shared._ import scala.cli.internal.Pid import scala.concurrent.duration.{Duration, FiniteDuration} import scala.util.Properties diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedDebugOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedDebugOptions.scala index b5b7e3c2f1..ac5f7c60e0 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedDebugOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedDebugOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import caseapp.core.help.Help import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedDependencyOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedDependencyOptions.scala index cc29986f84..81f575be5b 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedDependencyOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedDependencyOptions.scala @@ -1,8 +1,8 @@ package scala.cli.commands.shared -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.build.preprocessing.directives.Repository import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedInputOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedInputOptions.scala index 97a8447e03..a4d249f902 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedInputOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedInputOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedJavaOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedJavaOptions.scala index aae21c7893..8277f256b8 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedJavaOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedJavaOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedJvmOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedJvmOptions.scala index c971447113..968e9833de 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedJvmOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedJvmOptions.scala @@ -1,8 +1,8 @@ package scala.cli.commands.shared -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedOptions.scala index 43c86092a1..053be1593a 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedOptions.scala @@ -1,12 +1,12 @@ package scala.cli.commands.shared import bloop.rifle.BloopRifleConfig -import caseapp.* +import caseapp._ import caseapp.core.Arg import caseapp.core.help.Help import caseapp.core.util.Formatter -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import coursier.cache.FileCache import coursier.core.Version import coursier.util.{Artifact, Task} @@ -19,7 +19,7 @@ import java.util.concurrent.atomic.AtomicBoolean import scala.build.EitherCps.{either, value} import scala.build.Ops.EitherOptOps -import scala.build.* +import scala.build._ import scala.build.compiler.{BloopCompilerMaker, ScalaCompilerMaker, SimpleScalaCompilerMaker} import scala.build.directives.DirectiveDescription import scala.build.errors.{AmbiguousPlatformError, BuildException, ConfigDbException, Severity} @@ -31,12 +31,12 @@ import scala.build.internal.{Constants, FetchExternalBinary, OsLibc, Util} import scala.build.internals.ConsoleUtils.ScalaCliConsole import scala.build.options.ScalaVersionUtil.fileWithTtl0 import scala.build.options.{BuildOptions, ComputeVersion, Platform, ScalacOpt, ShadowingSeq} -import scala.build.preprocessing.directives.ClasspathUtils.* +import scala.build.preprocessing.directives.ClasspathUtils._ import scala.build.preprocessing.directives.Toolkit.maxScalaNativeWarningMsg import scala.build.preprocessing.directives.{Python, Toolkit} -import scala.build.options as bo +import scala.build.{options => bo} import scala.cli.ScalaCli -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.shared.{ HasGlobalOptions, ScalaJsOptions, @@ -47,13 +47,13 @@ import scala.cli.commands.shared.{ } import scala.cli.commands.tags import scala.cli.commands.util.JvmUtils -import scala.cli.commands.util.ScalacOptionsUtil.* +import scala.cli.commands.util.ScalacOptionsUtil._ import scala.cli.config.Key.BooleanEntry import scala.cli.config.{ConfigDb, Keys} import scala.cli.launcher.PowerOptions import scala.cli.util.ConfigDbUtils import scala.concurrent.ExecutionContextExecutorService -import scala.concurrent.duration.* +import scala.concurrent.duration._ import scala.util.Properties import scala.util.control.NonFatal @@ -670,7 +670,6 @@ final case class SharedOptions( } object SharedOptions { - import ArgFileOption.parser implicit lazy val parser: Parser[SharedOptions] = Parser.derive implicit lazy val help: Help[SharedOptions] = Help.derive implicit lazy val jsonCodec: JsonValueCodec[SharedOptions] = JsonCodecMaker.make diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedPythonOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedPythonOptions.scala index b8d2ee0c96..61caa276df 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedPythonOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedPythonOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.{Constants, tags} diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedVersionOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedVersionOptions.scala index bf113b99f2..2dffb97812 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedVersionOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedVersionOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedWatchOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedWatchOptions.scala index df4e28ec7e..89059c36f1 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedWatchOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedWatchOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedWorkspaceOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedWorkspaceOptions.scala index d694886907..a268ebdd90 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SharedWorkspaceOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SharedWorkspaceOptions.scala @@ -1,8 +1,8 @@ package scala.cli.commands.shared -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import scala.build.Os import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SnippetOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SnippetOptions.scala index 710349aeff..2c7989ff70 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SnippetOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SnippetOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SourceGeneratorOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SourceGeneratorOptions.scala index f8543074b4..36da4f5a0d 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SourceGeneratorOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SourceGeneratorOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/SuppressWarningOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/SuppressWarningOptions.scala index a3f65d165e..bab165eb86 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/SuppressWarningOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/SuppressWarningOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shared -import caseapp.* +import caseapp._ import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/shared/VerbosityOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shared/VerbosityOptions.scala index 5159273687..20374f8c89 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shared/VerbosityOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shared/VerbosityOptions.scala @@ -1,10 +1,10 @@ package scala.cli.commands.shared -import caseapp.* -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import caseapp._ +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ -import scala.build.interactive.Interactive.* +import scala.build.interactive.Interactive._ import scala.cli.commands.tags // format: off diff --git a/modules/cli/src/main/scala/scala/cli/commands/shebang/Shebang.scala b/modules/cli/src/main/scala/scala/cli/commands/shebang/Shebang.scala index 231b2a7ee6..8c1108274b 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shebang/Shebang.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shebang/Shebang.scala @@ -10,7 +10,7 @@ import scala.cli.CurrentParams import scala.cli.commands.run.Run import scala.cli.commands.shared.SharedOptions import scala.cli.commands.{ScalaCommand, SpecificationLevel} -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ object Shebang extends ScalaCommand[ShebangOptions] { override def stopAtFirstUnrecognized: Boolean = true diff --git a/modules/cli/src/main/scala/scala/cli/commands/shebang/ShebangOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/shebang/ShebangOptions.scala index 7f1421297d..befe7bcd56 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/shebang/ShebangOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/shebang/ShebangOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.shebang -import caseapp.* +import caseapp._ import scala.build.internals.ConsoleUtils.ScalaCliConsole import scala.cli.ScalaCli.{baseRunnerName, fullRunnerName, progName} diff --git a/modules/cli/src/main/scala/scala/cli/commands/test/Test.scala b/modules/cli/src/main/scala/scala/cli/commands/test/Test.scala index fba49e0f3d..fa5e7f4917 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/test/Test.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/test/Test.scala @@ -1,20 +1,20 @@ package scala.cli.commands.test -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat import java.nio.file.Path import scala.build.EitherCps.{either, value} -import scala.build.Ops.* -import scala.build.* +import scala.build.Ops._ +import scala.build._ import scala.build.errors.{BuildException, CompositeBuildException} import scala.build.internal.{Constants, Runner} import scala.build.internals.ConsoleUtils.ScalaCliConsole import scala.build.options.{BuildOptions, JavaOpt, Platform, Scope} import scala.build.testrunner.AsmTestRunner import scala.cli.CurrentParams -import scala.cli.commands.publish.ConfigUtil.* +import scala.cli.commands.publish.ConfigUtil._ import scala.cli.commands.run.Run import scala.cli.commands.setupide.SetupIde import scala.cli.commands.shared.{HelpCommandGroup, HelpGroup, SharedOptions} @@ -22,7 +22,7 @@ import scala.cli.commands.update.Update import scala.cli.commands.{CommandUtils, ScalaCommand, SpecificationLevel, WatchUtil} import scala.cli.config.{ConfigDb, Keys} import scala.cli.packaging.Library.fullClassPathMaybeAsJar -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.util.ConfigDbUtils object Test extends ScalaCommand[TestOptions] { diff --git a/modules/cli/src/main/scala/scala/cli/commands/test/TestOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/test/TestOptions.scala index 1a2cba4caa..555b3e0c76 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/test/TestOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/test/TestOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.test -import caseapp.* +import caseapp._ import caseapp.core.help.Help import scala.cli.commands.shared._ diff --git a/modules/cli/src/main/scala/scala/cli/commands/uninstall/Uninstall.scala b/modules/cli/src/main/scala/scala/cli/commands/uninstall/Uninstall.scala index b7afdd9e3d..0fa74fb7c4 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/uninstall/Uninstall.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/uninstall/Uninstall.scala @@ -1,6 +1,6 @@ package scala.cli.commands.uninstall -import caseapp.* +import caseapp._ import scala.build.Logger import scala.cli.CurrentParams diff --git a/modules/cli/src/main/scala/scala/cli/commands/uninstall/UninstallOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/uninstall/UninstallOptions.scala index a10d58c3d6..ea36965b9d 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/uninstall/UninstallOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/uninstall/UninstallOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.uninstall -import caseapp.* +import caseapp._ import java.nio.file.Path diff --git a/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/SharedUninstallCompletionsOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/SharedUninstallCompletionsOptions.scala index 6a3452eb3b..e271a6a96f 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/SharedUninstallCompletionsOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/SharedUninstallCompletionsOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.uninstallcompletions -import caseapp.* +import caseapp._ import scala.cli.commands.shared.HelpGroup import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/UninstallCompletions.scala b/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/UninstallCompletions.scala index 5b77346ec5..f7264e5a27 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/UninstallCompletions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/UninstallCompletions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.uninstallcompletions -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat import java.nio.charset.Charset @@ -12,7 +12,7 @@ import scala.cli.commands.installcompletions.InstallCompletions import scala.cli.commands.shared.HelpGroup import scala.cli.commands.{ScalaCommand, SpecificationLevel} import scala.cli.internal.ProfileFileUpdater -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ object UninstallCompletions extends ScalaCommand[UninstallCompletionsOptions] { diff --git a/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/UninstallCompletionsOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/UninstallCompletionsOptions.scala index 3da378dc8b..524821ed85 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/UninstallCompletionsOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/uninstallcompletions/UninstallCompletionsOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.uninstallcompletions -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.fullRunnerName import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions, HelpMessages} diff --git a/modules/cli/src/main/scala/scala/cli/commands/update/Update.scala b/modules/cli/src/main/scala/scala/cli/commands/update/Update.scala index 06827990cb..64511b8950 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/update/Update.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/update/Update.scala @@ -1,9 +1,9 @@ package scala.cli.commands.update -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import coursier.core import java.net.{HttpURLConnection, URL, URLConnection} @@ -11,12 +11,12 @@ import java.nio.charset.StandardCharsets import scala.build.Logger import scala.build.errors.CheckScalaCliVersionError -import scala.build.internal.Constants.{ghName, ghOrg, version as scalaCliVersion} +import scala.build.internal.Constants.{ghName, ghOrg, version => scalaCliVersion} import scala.cli.CurrentParams import scala.cli.commands.shared.HelpGroup import scala.cli.commands.{CommandUtils, ScalaCommand, SpecificationLevel} import scala.cli.signing.shared.Secret -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.util.control.NonFatal import scala.util.{Properties, Try} diff --git a/modules/cli/src/main/scala/scala/cli/commands/update/UpdateOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/update/UpdateOptions.scala index abac4f0fbf..6e1dc53097 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/update/UpdateOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/update/UpdateOptions.scala @@ -1,12 +1,12 @@ package scala.cli.commands.update -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.{baseRunnerName, fullRunnerName} import scala.cli.commands.shared.{GlobalOptions, HasGlobalOptions, HelpGroup, HelpMessages} import scala.cli.commands.tags import scala.cli.signing.shared.PasswordOption -import scala.cli.signing.util.ArgParsers.* +import scala.cli.signing.util.ArgParsers._ // format: off @HelpMessage(UpdateOptions.helpMessage, "", UpdateOptions.detailedHelpMessage) diff --git a/modules/cli/src/main/scala/scala/cli/commands/util/BuildCommandHelpers.scala b/modules/cli/src/main/scala/scala/cli/commands/util/BuildCommandHelpers.scala index 2b8935d203..66fb912af2 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/util/BuildCommandHelpers.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/util/BuildCommandHelpers.scala @@ -4,7 +4,7 @@ import scala.build.errors.BuildException import scala.build.{Build, Builds, Logger, Os} import scala.cli.commands.ScalaCommand import scala.cli.commands.shared.SharedOptions -import scala.cli.commands.util.ScalacOptionsUtil.* +import scala.cli.commands.util.ScalacOptionsUtil._ trait BuildCommandHelpers { self: ScalaCommand[?] => extension (successfulBuild: Build.Successful) { diff --git a/modules/cli/src/main/scala/scala/cli/commands/util/JvmUtils.scala b/modules/cli/src/main/scala/scala/cli/commands/util/JvmUtils.scala index b8bcdd312e..15c9bb3614 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/util/JvmUtils.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/util/JvmUtils.scala @@ -5,11 +5,11 @@ import java.io.File import scala.build.EitherCps.{either, value} import scala.build.errors.{BuildException, JvmDownloadError, UnrecognizedDebugModeError} -import scala.build.internal.CsLoggerUtil.* +import scala.build.internal.CsLoggerUtil._ import scala.build.internal.OsLibc import scala.build.options.BuildOptions.JavaHomeInfo import scala.build.options.{JavaOpt, JavaOptions, ShadowingSeq} -import scala.build.{Os, Position, Positioned, options as bo} +import scala.build.{Os, Position, Positioned, options => bo} import scala.cli.commands.shared.{CoursierOptions, SharedJvmOptions, SharedOptions} import scala.concurrent.ExecutionContextExecutorService import scala.util.control.NonFatal @@ -72,7 +72,7 @@ object JvmUtils { implicit val ec: ExecutionContextExecutorService = options.finalCache.ec val javaHomeManager = options.javaHomeManager .withMessage(s"Downloading JVM $jvmId") - val logger = javaHomeManager.cache + javaHomeManager.cache .flatMap(_.archiveCache.cache.loggerOpt) .getOrElse(_root_.coursier.cache.CacheLogger.nop) diff --git a/modules/cli/src/main/scala/scala/cli/commands/util/RunSpark.scala b/modules/cli/src/main/scala/scala/cli/commands/util/RunSpark.scala index 462d5628da..bc25891de1 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/util/RunSpark.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/util/RunSpark.scala @@ -5,7 +5,7 @@ import scala.build.errors.BuildException import scala.build.internal.Runner import scala.build.internals.EnvVar import scala.build.{Build, Logger} -import scala.cli.commands.package0.Package as PackageCmd +import scala.cli.commands.package0.{Package => PackageCmd} import scala.cli.commands.packaging.Spark import scala.cli.commands.run.RunMode import scala.cli.packaging.Library diff --git a/modules/cli/src/main/scala/scala/cli/commands/util/ScalaCliSttpBackend.scala b/modules/cli/src/main/scala/scala/cli/commands/util/ScalaCliSttpBackend.scala index 8a6e2abd28..f7d52d9325 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/util/ScalaCliSttpBackend.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/util/ScalaCliSttpBackend.scala @@ -1,7 +1,7 @@ package scala.cli.commands.util import sttp.capabilities.Effect -import sttp.client3.* +import sttp.client3._ import sttp.monad.MonadError import scala.build.Logger diff --git a/modules/cli/src/main/scala/scala/cli/commands/util/ScalacOptionsUtil.scala b/modules/cli/src/main/scala/scala/cli/commands/util/ScalacOptionsUtil.scala index 7d513f3bfb..04f21bebdc 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/util/ScalacOptionsUtil.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/util/ScalacOptionsUtil.scala @@ -1,5 +1,4 @@ package scala.cli.commands.util - import scala.build.Logger import scala.build.options.ScalacOpt.{filterScalacOptionKeys, noDashPrefixes} import scala.build.options.{ScalacOpt, ShadowingSeq} diff --git a/modules/cli/src/main/scala/scala/cli/commands/version/Version.scala b/modules/cli/src/main/scala/scala/cli/commands/version/Version.scala index 8ae33a5399..acaee8a623 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/version/Version.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/version/Version.scala @@ -1,6 +1,6 @@ package scala.cli.commands.version -import caseapp.* +import caseapp._ import caseapp.core.help.HelpFormat import scala.build.Logger @@ -9,7 +9,7 @@ import scala.cli.commands.shared.{HelpCommandGroup, HelpGroup} import scala.cli.commands.update.Update import scala.cli.commands.{CommandUtils, ScalaCommand, SpecificationLevel} import scala.cli.config.PasswordOption -import scala.cli.util.ArgHelpers.* +import scala.cli.util.ArgHelpers._ import scala.cli.{CurrentParams, ScalaCli} object Version extends ScalaCommand[VersionOptions] { diff --git a/modules/cli/src/main/scala/scala/cli/commands/version/VersionOptions.scala b/modules/cli/src/main/scala/scala/cli/commands/version/VersionOptions.scala index 61c560863d..5546c55f79 100644 --- a/modules/cli/src/main/scala/scala/cli/commands/version/VersionOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/commands/version/VersionOptions.scala @@ -1,6 +1,6 @@ package scala.cli.commands.version -import caseapp.* +import caseapp._ import scala.cli.ScalaCli.fullRunnerName import scala.cli.commands.shared.{ @@ -13,7 +13,7 @@ import scala.cli.commands.shared.{ } import scala.cli.commands.tags import scala.cli.signing.shared.PasswordOption -import scala.cli.signing.util.ArgParsers.* +import scala.cli.signing.util.ArgParsers._ // format: off @HelpMessage(VersionOptions.helpMessage, "", VersionOptions.detailedHelpMessage) diff --git a/modules/cli/src/main/scala/scala/cli/exportCmd/JsonProject.scala b/modules/cli/src/main/scala/scala/cli/exportCmd/JsonProject.scala index 7d8bf78757..1a46fc2016 100644 --- a/modules/cli/src/main/scala/scala/cli/exportCmd/JsonProject.scala +++ b/modules/cli/src/main/scala/scala/cli/exportCmd/JsonProject.scala @@ -11,7 +11,7 @@ import java.nio.charset.StandardCharsets import scala.build.info.{BuildInfo, ExportDependencyFormat, ScopedBuildInfo} import scala.build.options.ConfigMonoid -import scala.cli.util.SeqHelpers.* +import scala.cli.util.SeqHelpers._ import scala.reflect.NameTransformer import scala.util.{Properties, Using} diff --git a/modules/cli/src/main/scala/scala/cli/exportCmd/JsonProjectDescriptor.scala b/modules/cli/src/main/scala/scala/cli/exportCmd/JsonProjectDescriptor.scala index 77fc6d46a4..12bd5e37fc 100644 --- a/modules/cli/src/main/scala/scala/cli/exportCmd/JsonProjectDescriptor.scala +++ b/modules/cli/src/main/scala/scala/cli/exportCmd/JsonProjectDescriptor.scala @@ -1,5 +1,4 @@ package scala.cli.exportCmd - import com.github.plokhotnyuk.jsoniter_scala.core.WriterConfig import coursier.ivy.IvyRepository import coursier.maven.MavenRepository @@ -17,7 +16,7 @@ import scala.build.options.{BuildOptions, Scope} import scala.build.testrunner.AsmTestRunner import scala.build.{Logger, Positioned, Sources} import scala.cli.commands.util.CommandHelpers -import scala.cli.util.SeqHelpers.* +import scala.cli.util.SeqHelpers._ final case class JsonProjectDescriptor( projectName: Option[String] = None, diff --git a/modules/cli/src/main/scala/scala/cli/exportCmd/MavenProject.scala b/modules/cli/src/main/scala/scala/cli/exportCmd/MavenProject.scala index aa1de44786..21908bd7ec 100644 --- a/modules/cli/src/main/scala/scala/cli/exportCmd/MavenProject.scala +++ b/modules/cli/src/main/scala/scala/cli/exportCmd/MavenProject.scala @@ -25,7 +25,7 @@ final case class MavenProject( def writeTo(dir: os.Path): Unit = { - val nl = System.lineSeparator() + System.lineSeparator() val charset = StandardCharsets.UTF_8 val buildMavenContent = MavenModel( diff --git a/modules/cli/src/main/scala/scala/cli/exportCmd/MavenProjectDescriptor.scala b/modules/cli/src/main/scala/scala/cli/exportCmd/MavenProjectDescriptor.scala index 0c4be4b178..1e03991878 100644 --- a/modules/cli/src/main/scala/scala/cli/exportCmd/MavenProjectDescriptor.scala +++ b/modules/cli/src/main/scala/scala/cli/exportCmd/MavenProjectDescriptor.scala @@ -1,5 +1,4 @@ package scala.cli.exportCmd - import coursier.ivy.IvyRepository import coursier.maven.MavenRepository import coursier.parse.RepositoryParser @@ -16,7 +15,7 @@ import scala.build.testrunner.AsmTestRunner import scala.build.{Logger, Positioned, Sources} import scala.cli.ScalaCli import scala.cli.commands.export0.ExportOptions -import scala.cli.exportCmd.POMBuilderHelper.* +import scala.cli.exportCmd.POMBuilderHelper._ import scala.xml.{Elem, XML} object POMBuilderHelper { @@ -41,8 +40,8 @@ final case class MavenProjectDescriptor( mavenAppVersion: String, logger: Logger ) extends ProjectDescriptor { - private val q = "\"" - private val nl = System.lineSeparator() + + System.lineSeparator() private def sources(sourcesMain: Sources, sourcesTest: Sources): MavenProject = { val mainSources = ProjectDescriptor.sources(sourcesMain) @@ -134,7 +133,7 @@ final case class MavenProjectDescriptor( testDeps: ShadowingSeq[Positioned[AnyDependency]], isCompileOnly: Boolean ): Seq[MavenLibraryDependency] = { - val scopePriorities = List() + List() val mainDependenciesMaven = buildMavenDepModels(mainDeps, isCompileOnly) val testDependenciesMaven = buildMavenDepModels(testDeps, isCompileOnly) val resolvedDeps = (mainDependenciesMaven ++ testDependenciesMaven).groupBy(k => @@ -186,7 +185,7 @@ final case class MavenProjectDescriptor( val javacOptions = javacOptionsSettings(options) - val javaOptions = javaOptionsSettings(options) + javaOptionsSettings(options) val mavenJavaPlugin = buildJavaCompilerPlugin(javacOptions, jdkVersion) val mavenExecPlugin = buildJavaExecPlugin(javacOptions, jdkVersion) @@ -206,8 +205,8 @@ final case class MavenProjectDescriptor( scalaVersion: String ): MavenPlugin = { - val scalaVersionNode = buildNode("scalaVersion", scalaVersion) - val javacOptionsElem = { + buildNode("scalaVersion", scalaVersion) + locally { val opts = javacOptions.map { opt => buildNode("javacArg", opt) } diff --git a/modules/cli/src/main/scala/scala/cli/exportCmd/MillProjectDescriptor.scala b/modules/cli/src/main/scala/scala/cli/exportCmd/MillProjectDescriptor.scala index c3a312bdbb..a766fcd677 100644 --- a/modules/cli/src/main/scala/scala/cli/exportCmd/MillProjectDescriptor.scala +++ b/modules/cli/src/main/scala/scala/cli/exportCmd/MillProjectDescriptor.scala @@ -14,7 +14,7 @@ import scala.build.options.{BuildOptions, Platform, ScalaJsOptions, ScalaNativeO import scala.build.testrunner.AsmTestRunner import scala.build.{Logger, Sources} import scala.cli.ScalaCli -import scala.cli.util.SeqHelpers.* +import scala.cli.util.SeqHelpers._ final case class MillProjectDescriptor( millVersion: String, diff --git a/modules/cli/src/main/scala/scala/cli/internal/CliLogger.scala b/modules/cli/src/main/scala/scala/cli/internal/CliLogger.scala index fe91c52944..98474eec34 100644 --- a/modules/cli/src/main/scala/scala/cli/internal/CliLogger.scala +++ b/modules/cli/src/main/scala/scala/cli/internal/CliLogger.scala @@ -2,7 +2,7 @@ package scala.cli.internal import bloop.rifle.BloopRifleLogger import ch.epfl.scala.bsp4j.Location -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import coursier.cache.CacheLogger import coursier.cache.loggers.{FallbackRefreshDisplay, RefreshLogger} import org.scalajs.logging.{Level => ScalaJsLevel, Logger => ScalaJsLogger, ScalaConsoleLogger} @@ -16,8 +16,8 @@ import scala.build.internal.util.WarningMessages import scala.build.internals.FeatureType import scala.build.{ConsoleBloopBuildClient, Logger, Position} import scala.collection.mutable -import scala.jdk.CollectionConverters.* -import scala.scalanative.build as sn +import scala.jdk.CollectionConverters._ +import scala.scalanative.{build => sn} class CliLogger( val verbosity: Int, diff --git a/modules/cli/src/main/scala/scala/cli/internal/ProcUtil.scala b/modules/cli/src/main/scala/scala/cli/internal/ProcUtil.scala index 1facca8b46..4a26664cda 100644 --- a/modules/cli/src/main/scala/scala/cli/internal/ProcUtil.scala +++ b/modules/cli/src/main/scala/scala/cli/internal/ProcUtil.scala @@ -1,5 +1,4 @@ package scala.cli.internal - import java.net.{HttpURLConnection, URL, URLConnection} import java.nio.charset.StandardCharsets import java.util.concurrent.{CancellationException, CompletableFuture, CompletionException} diff --git a/modules/cli/src/main/scala/scala/cli/launcher/LauncherCli.scala b/modules/cli/src/main/scala/scala/cli/launcher/LauncherCli.scala index f45d855c3c..48ee17a7e7 100644 --- a/modules/cli/src/main/scala/scala/cli/launcher/LauncherCli.scala +++ b/modules/cli/src/main/scala/scala/cli/launcher/LauncherCli.scala @@ -4,7 +4,7 @@ import coursier.Repositories import coursier.cache.FileCache import coursier.core.Version import coursier.util.{Artifact, Task} -import dependency.* +import dependency._ import scala.build.internal.CsLoggerUtil.CsCacheExtensions import scala.build.internal.{Constants, OsLibc, Runner} @@ -13,7 +13,7 @@ import scala.build.options.{BuildOptions, JavaOptions} import scala.build.{Artifacts, Os, Positioned} import scala.cli.ScalaCli import scala.cli.commands.shared.{CoursierOptions, LoggingOptions} -import scala.concurrent.duration.* +import scala.concurrent.duration._ import scala.util.control.NonFatal object LauncherCli { diff --git a/modules/cli/src/main/scala/scala/cli/launcher/LauncherOptions.scala b/modules/cli/src/main/scala/scala/cli/launcher/LauncherOptions.scala index 8d3525f082..82b0536123 100644 --- a/modules/cli/src/main/scala/scala/cli/launcher/LauncherOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/launcher/LauncherOptions.scala @@ -1,6 +1,6 @@ package scala.cli.launcher -import caseapp.* +import caseapp._ import com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker diff --git a/modules/cli/src/main/scala/scala/cli/launcher/PowerOptions.scala b/modules/cli/src/main/scala/scala/cli/launcher/PowerOptions.scala index 5fd86643e4..214f5b4ffc 100644 --- a/modules/cli/src/main/scala/scala/cli/launcher/PowerOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/launcher/PowerOptions.scala @@ -1,6 +1,6 @@ package scala.cli.launcher -import caseapp.* +import caseapp._ import scala.cli.commands.shared.HelpGroup import scala.cli.commands.tags diff --git a/modules/cli/src/main/scala/scala/cli/launcher/ScalaRunnerLauncherOptions.scala b/modules/cli/src/main/scala/scala/cli/launcher/ScalaRunnerLauncherOptions.scala index 09ed8aedfe..3c180be826 100644 --- a/modules/cli/src/main/scala/scala/cli/launcher/ScalaRunnerLauncherOptions.scala +++ b/modules/cli/src/main/scala/scala/cli/launcher/ScalaRunnerLauncherOptions.scala @@ -1,6 +1,6 @@ package scala.cli.launcher -import caseapp.* +import caseapp._ import com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker diff --git a/modules/cli/src/test/scala/cli/commands/tests/ReplOptionsTests.scala b/modules/cli/src/test/scala/cli/commands/tests/ReplOptionsTests.scala index ea42115234..2373d9fe35 100644 --- a/modules/cli/src/test/scala/cli/commands/tests/ReplOptionsTests.scala +++ b/modules/cli/src/test/scala/cli/commands/tests/ReplOptionsTests.scala @@ -1,6 +1,6 @@ package scala.cli.commands.tests -import com.eed3si9n.expecty.Expecty.assert as expect +import com.eed3si9n.expecty.Expecty.{assert => expect} import scala.build.internal.Constants import scala.cli.commands.repl.{Repl, ReplOptions, SharedReplOptions} diff --git a/modules/cli/src/test/scala/cli/tests/CachedBinaryTests.scala b/modules/cli/src/test/scala/cli/tests/CachedBinaryTests.scala index 096025b207..9584b06dd1 100644 --- a/modules/cli/src/test/scala/cli/tests/CachedBinaryTests.scala +++ b/modules/cli/src/test/scala/cli/tests/CachedBinaryTests.scala @@ -1,7 +1,7 @@ package scala.cli.tests import bloop.rifle.BloopRifleConfig -import com.eed3si9n.expecty.Expecty.assert as expect +import com.eed3si9n.expecty.Expecty.{assert => expect} import os.Path import scala.build.options.{BuildOptions, InternalOptions} diff --git a/modules/cli/src/test/scala/cli/tests/PackageTests.scala b/modules/cli/src/test/scala/cli/tests/PackageTests.scala index c07f573f97..016766adfe 100644 --- a/modules/cli/src/test/scala/cli/tests/PackageTests.scala +++ b/modules/cli/src/test/scala/cli/tests/PackageTests.scala @@ -4,7 +4,7 @@ import com.eed3si9n.expecty.Expecty.expect import java.nio.file.FileSystems -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.options.{BuildOptions, InternalOptions, PackageType} import scala.build.tests.util.BloopServer import scala.build.tests.{TestInputs, TestLogger} diff --git a/modules/cli/src/test/scala/cli/tests/ScalafmtTest.scala b/modules/cli/src/test/scala/cli/tests/ScalafmtTest.scala index 9254f655ff..94ef72ca2b 100644 --- a/modules/cli/src/test/scala/cli/tests/ScalafmtTest.scala +++ b/modules/cli/src/test/scala/cli/tests/ScalafmtTest.scala @@ -1,9 +1,9 @@ package cli.tests import com.eed3si9n.expecty.Expecty.expect -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.internal.Constants import scala.build.tests.{TestInputs, TestLogger} import scala.cli.commands.fmt.{FmtOptions, FmtUtil} diff --git a/modules/core/src/main/scala/scala/build/errors/ConfigDbException.scala b/modules/core/src/main/scala/scala/build/errors/ConfigDbException.scala index 3594eee077..d03475b3a1 100644 --- a/modules/core/src/main/scala/scala/build/errors/ConfigDbException.scala +++ b/modules/core/src/main/scala/scala/build/errors/ConfigDbException.scala @@ -1,6 +1,5 @@ -package scala.build.errors - -import scala.build.errors.BuildException +package scala.build.errorsimport +scala.build.errors.BuildException final class ConfigDbException(cause: Exception) extends BuildException(s"Config DB error: ${cause.getMessage}", cause = cause) diff --git a/modules/core/src/main/scala/scala/build/errors/InvalidBinaryScalaVersionError.scala b/modules/core/src/main/scala/scala/build/errors/InvalidBinaryScalaVersionError.scala index fd1045716f..a77728ec89 100644 --- a/modules/core/src/main/scala/scala/build/errors/InvalidBinaryScalaVersionError.scala +++ b/modules/core/src/main/scala/scala/build/errors/InvalidBinaryScalaVersionError.scala @@ -1,6 +1,5 @@ -package scala.build.errors - -import scala.build.errors.ScalaVersionError.getTheGeneralErrorInfo +package scala.build.errorsimport +scala.build.errors.ScalaVersionError.getTheGeneralErrorInfo final class InvalidBinaryScalaVersionError(val invalidBinaryVersion: String) extends ScalaVersionError(s"Cannot find matching Scala version for '$invalidBinaryVersion'") diff --git a/modules/core/src/main/scala/scala/build/errors/MultipleScalaVersionsError.scala b/modules/core/src/main/scala/scala/build/errors/MultipleScalaVersionsError.scala index 919fc584fe..18303e4dc1 100644 --- a/modules/core/src/main/scala/scala/build/errors/MultipleScalaVersionsError.scala +++ b/modules/core/src/main/scala/scala/build/errors/MultipleScalaVersionsError.scala @@ -1,6 +1,5 @@ -package scala.build.errors - -import scala.build.Position +package scala.build.errorsimport +scala.build.Position final class MultipleScalaVersionsError(scalaVersions: Seq[String]) extends BuildException( diff --git a/modules/core/src/main/scala/scala/build/errors/ScalaVersionError.scala b/modules/core/src/main/scala/scala/build/errors/ScalaVersionError.scala index 04c36e95e3..b75f9a2370 100644 --- a/modules/core/src/main/scala/scala/build/errors/ScalaVersionError.scala +++ b/modules/core/src/main/scala/scala/build/errors/ScalaVersionError.scala @@ -1,7 +1,7 @@ package scala.build.errors import scala.build.Position -import scala.build.internal.Constants.* +import scala.build.internal.Constants._ class ScalaVersionError(message: String, positions: Seq[Position] = Nil, cause: Throwable = null) extends BuildException( diff --git a/modules/core/src/main/scala/scala/build/errors/Severity.scala b/modules/core/src/main/scala/scala/build/errors/Severity.scala index 9d491f6380..6cb6dcba31 100644 --- a/modules/core/src/main/scala/scala/build/errors/Severity.scala +++ b/modules/core/src/main/scala/scala/build/errors/Severity.scala @@ -1,6 +1,6 @@ package scala.build.errors -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} sealed abstract class Severity extends Product with Serializable { def toBsp4j: b.DiagnosticSeverity diff --git a/modules/core/src/main/scala/scala/build/errors/UnsupportedScalaVersionError.scala b/modules/core/src/main/scala/scala/build/errors/UnsupportedScalaVersionError.scala index 591bc3956a..bc92e8ac84 100644 --- a/modules/core/src/main/scala/scala/build/errors/UnsupportedScalaVersionError.scala +++ b/modules/core/src/main/scala/scala/build/errors/UnsupportedScalaVersionError.scala @@ -1,6 +1,5 @@ -package scala.build.errors - -import scala.build.errors.ScalaVersionError.getTheGeneralErrorInfo +package scala.build.errorsimport +scala.build.errors.ScalaVersionError.getTheGeneralErrorInfo final class UnsupportedScalaVersionError(val binaryVersion: String) extends ScalaVersionError(s"Unsupported Scala version: $binaryVersion") diff --git a/modules/directives/src/main/scala/scala/build/directives/HasBuildOptionsWithRequirements.scala b/modules/directives/src/main/scala/scala/build/directives/HasBuildOptionsWithRequirements.scala index 9e40ccf80a..462ce63aaa 100644 --- a/modules/directives/src/main/scala/scala/build/directives/HasBuildOptionsWithRequirements.scala +++ b/modules/directives/src/main/scala/scala/build/directives/HasBuildOptionsWithRequirements.scala @@ -1,6 +1,6 @@ package scala.build.directives -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.errors.{BuildException, CompositeBuildException} import scala.build.options.{BuildOptions, WithBuildRequirements} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Benchmarking.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Benchmarking.scala index 7e18d73aac..210de10d31 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Benchmarking.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Benchmarking.scala @@ -1,8 +1,7 @@ package scala.build.preprocessing.directives +import dependency._ -import dependency.* - -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.internal.Constants import scala.build.options.{ diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/BuildInfo.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/BuildInfo.scala index 7a3059b023..617c82e1df 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/BuildInfo.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/BuildInfo.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.{BuildOptions, SourceGeneratorOptions} import scala.cli.commands.SpecificationLevel diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/CustomJar.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/CustomJar.scala index a41bda931d..adab1e2f85 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/CustomJar.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/CustomJar.scala @@ -1,12 +1,12 @@ package scala.build.preprocessing.directives -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.Positioned -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.{BuildException, CompositeBuildException, WrongJarPathError} -import scala.build.options.WithBuildRequirements.* +import scala.build.options.WithBuildRequirements._ import scala.build.options.{BuildOptions, ClassPathOptions, Scope, WithBuildRequirements} import scala.build.preprocessing.ScopePath -import scala.build.preprocessing.directives.ClasspathUtils.* +import scala.build.preprocessing.directives.ClasspathUtils._ import scala.build.preprocessing.directives.CustomJar.JarType import scala.cli.commands.SpecificationLevel import scala.util.{Failure, Success, Try} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Dependency.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Dependency.scala index a31b77da2b..d7fe3ee57a 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Dependency.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Dependency.scala @@ -4,9 +4,9 @@ import dependency.AnyDependency import scala.build.EitherCps.{either, value} import scala.build.Positioned -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException -import scala.build.options.WithBuildRequirements.* +import scala.build.options.WithBuildRequirements._ import scala.build.options.{ BuildOptions, ClassPathOptions, @@ -15,7 +15,7 @@ import scala.build.options.{ WithBuildRequirements } import scala.build.preprocessing.directives.Dependency.DependencyType -import scala.build.preprocessing.directives.DirectiveUtil.* +import scala.build.preprocessing.directives.DirectiveUtil._ import scala.cli.commands.SpecificationLevel @DirectiveExamples("//> using dep com.lihaoyi::os-lib:0.9.1") diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/DirectiveHandler.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/DirectiveHandler.scala index 40d782cb3c..6ed86d09f7 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/DirectiveHandler.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/DirectiveHandler.scala @@ -1,12 +1,11 @@ package scala.build.preprocessing.directives - import com.virtuslab.using_directives.custom.model.{EmptyValue, Value} import java.util.Locale import scala.build.Logger -import scala.build.Ops.* -import scala.build.directives.* +import scala.build.Ops._ +import scala.build.directives._ import scala.build.errors.{ BuildException, CompositeBuildException, @@ -17,7 +16,7 @@ import scala.build.errors.{ } import scala.build.preprocessing.Scoped import scala.cli.commands.SpecificationLevel -import scala.deriving.* +import scala.deriving._ import scala.quoted.{_, given} trait DirectiveHandler[+T] { self => @@ -173,7 +172,7 @@ object DirectiveHandler { val nudeSubtype = TypeIdent(sym).tpe val baseConst = nudeSubtype.memberType(sym.primaryConstructor) val tpeArgsFromChild = typeArgs(tpe) - val const = baseConst match { + baseConst match { case MethodType(_, _, resTp) => resTp case PolyType(names, _, resPolyTp) => val targs = typeArgs(tpe) @@ -216,8 +215,8 @@ object DirectiveHandler { ${ deriveParserImpl[T] } private def deriveParserImpl[T](using q: Quotes, t: Type[T]): Expr[DirectiveHandler[T]] = { import quotes.reflect.* - val tSym = TypeTree.of[T].symbol - val origin = shortName[T] + val tSym = TypeTree.of[T].symbol + shortName[T] val fields0 = fields[T] val defaultMap: Map[String, Expr[Any]] = { diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/DirectiveUtil.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/DirectiveUtil.scala index f32b334e58..62ff19c122 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/DirectiveUtil.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/DirectiveUtil.scala @@ -6,7 +6,7 @@ import dependency.AnyDependency import dependency.parser.DependencyParser import scala.build.EitherCps.{either, value} -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.errors.{BuildException, CompositeBuildException, DependencyFormatError} import scala.build.preprocessing.ScopePath import scala.build.{Position, Positioned} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Exclude.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Exclude.scala index 164fd67926..14b6f2575e 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Exclude.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Exclude.scala @@ -1,8 +1,8 @@ package scala.build.preprocessing.directives import scala.build.EitherCps.{either, value} -import scala.build.Ops.* -import scala.build.directives.* +import scala.build.Ops._ +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.{BuildOptions, InternalOptions} import scala.build.{Positioned, options} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaHome.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaHome.scala index 05ef5e3a77..0e0005d1ba 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaHome.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaHome.scala @@ -2,7 +2,7 @@ package scala.build.preprocessing.directives import scala.build.EitherCps.{either, value} import scala.build.Positioned -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.{BuildException, WrongJavaHomePathError} import scala.build.options.{BuildOptions, JavaOptions} import scala.cli.commands.SpecificationLevel diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaOptions.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaOptions.scala index 1fc466cf1b..87c3789d9f 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaOptions.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaOptions.scala @@ -1,8 +1,8 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException -import scala.build.options.WithBuildRequirements.* +import scala.build.options.WithBuildRequirements._ import scala.build.options.{BuildOptions, JavaOpt, Scope, ShadowingSeq, WithBuildRequirements} import scala.build.{Positioned, options} import scala.cli.commands.SpecificationLevel diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaProps.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaProps.scala index ac54014aaa..b6d83b67a1 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaProps.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavaProps.scala @@ -1,10 +1,10 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException -import scala.build.options.WithBuildRequirements.* +import scala.build.options.WithBuildRequirements._ import scala.build.options.{BuildOptions, JavaOpt, Scope, ShadowingSeq, WithBuildRequirements} -import scala.build.preprocessing.directives.DirectiveUtil.* +import scala.build.preprocessing.directives.DirectiveUtil._ import scala.build.{Positioned, options} import scala.cli.commands.SpecificationLevel diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavacOptions.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavacOptions.scala index 17824af47d..a1cb0bbf91 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavacOptions.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/JavacOptions.scala @@ -1,10 +1,10 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException -import scala.build.options.WithBuildRequirements.* +import scala.build.options.WithBuildRequirements._ import scala.build.options.{BuildOptions, Scope, WithBuildRequirements} -import scala.build.preprocessing.directives.DirectiveUtil.* +import scala.build.preprocessing.directives.DirectiveUtil._ import scala.build.{Positioned, options} import scala.cli.commands.SpecificationLevel @DirectiveGroupName("Javac options") diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Jvm.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Jvm.scala index efc96e025f..abe8248dc2 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Jvm.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Jvm.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.{BuildOptions, JavaOpt} import scala.build.{Positioned, options} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/MainClass.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/MainClass.scala index da97f7eab1..6425f7014b 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/MainClass.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/MainClass.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.BuildOptions import scala.build.{Positioned, options} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ObjectWrapper.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ObjectWrapper.scala index 08f26a5a6a..d7a2e85234 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ObjectWrapper.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ObjectWrapper.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.{BuildOptions, ScriptOptions} import scala.cli.commands.SpecificationLevel diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Packaging.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Packaging.scala index c0d0779ad3..4d17ec6b07 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Packaging.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Packaging.scala @@ -3,8 +3,8 @@ package scala.build.preprocessing.directives import dependency.parser.ModuleParser import scala.build.EitherCps.{either, value} -import scala.build.Ops.* -import scala.build.directives.* +import scala.build.Ops._ +import scala.build.directives._ import scala.build.errors.{ BuildException, CompositeBuildException, diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Platform.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Platform.scala index 19fc7c8014..4f7b4b5005 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Platform.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Platform.scala @@ -1,8 +1,8 @@ package scala.build.preprocessing.directives import scala.build.EitherCps.{either, value} -import scala.build.Ops.* -import scala.build.directives.* +import scala.build.Ops._ +import scala.build.directives._ import scala.build.errors.{ BuildException, CompositeBuildException, diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Plugin.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Plugin.scala index 830150aefb..af596bb29d 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Plugin.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Plugin.scala @@ -4,10 +4,10 @@ import dependency.AnyDependency import scala.build.EitherCps.{either, value} import scala.build.Positioned -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.{BuildOptions, ScalaOptions} -import scala.build.preprocessing.directives.DirectiveUtil.* +import scala.build.preprocessing.directives.DirectiveUtil._ import scala.cli.commands.SpecificationLevel @DirectiveGroupName("Compiler plugins") diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ProcessedDirective.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ProcessedDirective.scala index 0245d29325..968df3e64c 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ProcessedDirective.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ProcessedDirective.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.errors.{BuildException, CompositeBuildException} import scala.build.preprocessing.Scoped diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Publish.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Publish.scala index 3994fe4a7e..fa098da607 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Publish.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Publish.scala @@ -1,8 +1,8 @@ package scala.build.preprocessing.directives import scala.build.EitherCps.{either, value} -import scala.build.Ops.* -import scala.build.directives.* +import scala.build.Ops._ +import scala.build.directives._ import scala.build.errors.{BuildException, CompositeBuildException} import scala.build.options.publish.{Developer, License, Vcs} import scala.build.options.{BuildOptions, PostBuildOptions, PublishOptions} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/PublishContextual.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/PublishContextual.scala index 151e809eae..72439060f6 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/PublishContextual.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/PublishContextual.scala @@ -1,8 +1,8 @@ package scala.build.preprocessing.directives import scala.build.EitherCps.{either, value} -import scala.build.Ops.* -import scala.build.directives.* +import scala.build.Ops._ +import scala.build.directives._ import scala.build.errors.{BuildException, CompositeBuildException, MalformedInputError} import scala.build.options._ import scala.build.options.publish.ConfigPasswordOption diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Python.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Python.scala index 507bf0a1d2..5c55fb00b5 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Python.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Python.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.internal.Constants import scala.build.options.{BuildOptions, PostBuildOptions, ScalaNativeOptions} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Repository.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Repository.scala index 0b1e735c42..b0537a778b 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Repository.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Repository.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.{BuildOptions, ClassPathOptions} import scala.build.{Positioned, options} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequirePlatform.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequirePlatform.scala index 7d8ef27bbb..9e13d7f6f6 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequirePlatform.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequirePlatform.scala @@ -1,7 +1,7 @@ package scala.build.preprocessing.directives import scala.build.EitherCps.{either, value} -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.{BuildException, MalformedPlatformError} import scala.build.options.{BuildRequirements, Platform} import scala.build.{Positioned, options} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScalaVersion.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScalaVersion.scala index 72aa5cc08a..6e039eadbf 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScalaVersion.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScalaVersion.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.BuildRequirements import scala.cli.commands.SpecificationLevel diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScalaVersionBounds.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScalaVersionBounds.scala index 1997f4a7f1..713bb39b95 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScalaVersionBounds.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScalaVersionBounds.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.BuildRequirements import scala.cli.commands.SpecificationLevel diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScope.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScope.scala index 653110d5f2..ee1600e552 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScope.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/RequireScope.scala @@ -1,9 +1,9 @@ package scala.build.preprocessing.directives import scala.build.EitherCps.{either, value} -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.Positioned -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.{BuildException, DirectiveErrors} import scala.build.options.{BuildRequirements, Scope} import scala.cli.commands.SpecificationLevel diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Resources.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Resources.scala index 4842af60da..02fc1dad80 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Resources.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Resources.scala @@ -1,9 +1,9 @@ package scala.build.preprocessing.directives import scala.build.Positioned -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException -import scala.build.options.WithBuildRequirements.* +import scala.build.options.WithBuildRequirements._ import scala.build.options.{BuildOptions, ClassPathOptions, Scope, WithBuildRequirements} import scala.cli.commands.SpecificationLevel diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaJs.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaJs.scala index 5784735a05..41d15e0bcf 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaJs.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaJs.scala @@ -4,7 +4,7 @@ import os.Path import scala.build.EitherCps.{either, value} import scala.build.Ops.EitherOptOps -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.internal.Constants import scala.build.options.{BuildOptions, ScalaJsMode, ScalaJsOptions} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaNative.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaNative.scala index 41a0d019c2..2f9ac530e6 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaNative.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaNative.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.internal.Constants import scala.build.options.{BuildOptions, ScalaNativeOptions} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaVersion.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaVersion.scala index 93e11eba31..1c581be1f2 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaVersion.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalaVersion.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.{BuildOptions, MaybeScalaVersion, ScalaOptions} import scala.build.{Positioned, options} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalacOptions.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalacOptions.scala index 48db4a520c..506fd0cf0e 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalacOptions.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/ScalacOptions.scala @@ -1,9 +1,9 @@ package scala.build.preprocessing.directives import scala.build.Positioned -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException -import scala.build.options.WithBuildRequirements.* +import scala.build.options.WithBuildRequirements._ import scala.build.options.{ BuildOptions, ScalaOptions, diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Sources.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Sources.scala index 82b1128826..221044d9c7 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Sources.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Sources.scala @@ -1,8 +1,8 @@ package scala.build.preprocessing.directives import scala.build.EitherCps.{either, value} -import scala.build.Ops.* -import scala.build.directives.* +import scala.build.Ops._ +import scala.build.directives._ import scala.build.errors.{BuildException, CompositeBuildException, WrongSourcePathError} import scala.build.options.{BuildOptions, InternalOptions} import scala.build.{Positioned, options} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Tests.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Tests.scala index 59fb852a21..16f21af018 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Tests.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Tests.scala @@ -1,6 +1,6 @@ package scala.build.preprocessing.directives -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.options.{BuildOptions, TestOptions} import scala.build.{Positioned, options} diff --git a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Toolkit.scala b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Toolkit.scala index 00697166c5..53ea1f2a89 100644 --- a/modules/directives/src/main/scala/scala/build/preprocessing/directives/Toolkit.scala +++ b/modules/directives/src/main/scala/scala/build/preprocessing/directives/Toolkit.scala @@ -1,15 +1,15 @@ package scala.build.preprocessing.directives import coursier.core.Version -import dependency.* +import dependency._ import scala.build.Positioned -import scala.build.directives.* +import scala.build.directives._ import scala.build.errors.BuildException import scala.build.internal.Constants import scala.build.options.BuildRequirements.ScopeRequirement -import scala.build.options.WithBuildRequirements.* -import scala.build.options.* +import scala.build.options.WithBuildRequirements._ +import scala.build.options._ import scala.cli.commands.SpecificationLevel @DirectiveGroupName("Toolkit") diff --git a/modules/generate-reference-doc/src/main/scala/scala/cli/doc/GenerateReferenceDoc.scala b/modules/generate-reference-doc/src/main/scala/scala/cli/doc/GenerateReferenceDoc.scala index 28a4c6ea5c..89f14415a7 100644 --- a/modules/generate-reference-doc/src/main/scala/scala/cli/doc/GenerateReferenceDoc.scala +++ b/modules/generate-reference-doc/src/main/scala/scala/cli/doc/GenerateReferenceDoc.scala @@ -1,8 +1,8 @@ package scala.cli.doc -import caseapp.* +import caseapp._ import caseapp.core.Arg -import caseapp.core.Scala3Helpers.* +import caseapp.core.Scala3Helpers._ import caseapp.core.util.Formatter import dotty.tools.dotc.ScalacCommand import munit.diff.Diff @@ -16,10 +16,10 @@ import scala.build.internal.Constants import scala.build.internals.EnvVar import scala.build.options.{BuildOptions, BuildRequirements, WithBuildRequirements} import scala.build.preprocessing.directives.DirectiveHandler -import scala.build.preprocessing.directives.DirectivesPreprocessingUtils.* +import scala.build.preprocessing.directives.DirectivesPreprocessingUtils._ import scala.cli.commands.{ScalaCommand, SpecificationLevel, tags} -import scala.cli.doc.ReferenceDocUtils.* -import scala.cli.util.ArgHelpers.* +import scala.cli.doc.ReferenceDocUtils._ +import scala.cli.util.ArgHelpers._ import scala.cli.{ScalaCli, ScalaCliCommands} object GenerateReferenceDoc extends CaseApp[InternalDocOptions] { diff --git a/modules/generate-reference-doc/src/main/scala/scala/cli/doc/InternalDocOptions.scala b/modules/generate-reference-doc/src/main/scala/scala/cli/doc/InternalDocOptions.scala index 1ed1dd0353..0b4db013c4 100644 --- a/modules/generate-reference-doc/src/main/scala/scala/cli/doc/InternalDocOptions.scala +++ b/modules/generate-reference-doc/src/main/scala/scala/cli/doc/InternalDocOptions.scala @@ -1,6 +1,6 @@ package scala.cli.doc -import caseapp.* +import caseapp._ final case class InternalDocOptions( outputDir: String = "website/docs/reference", diff --git a/modules/generate-reference-doc/src/main/scala/scala/cli/doc/ReferenceDocUtils.scala b/modules/generate-reference-doc/src/main/scala/scala/cli/doc/ReferenceDocUtils.scala index 2c52641a46..c46e9a86dc 100644 --- a/modules/generate-reference-doc/src/main/scala/scala/cli/doc/ReferenceDocUtils.scala +++ b/modules/generate-reference-doc/src/main/scala/scala/cli/doc/ReferenceDocUtils.scala @@ -5,7 +5,7 @@ import caseapp.HelpMessage import java.util.stream.IntStream import scala.annotation.tailrec -import scala.build.internals.ConsoleUtils.* +import scala.build.internals.ConsoleUtils._ object ReferenceDocUtils { extension (s: String) { diff --git a/modules/integration/src/test/scala/scala/cli/integration/BspSuite.scala b/modules/integration/src/test/scala/scala/cli/integration/BspSuite.scala index f8233acc24..107aea5c2f 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/BspSuite.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/BspSuite.scala @@ -1,9 +1,9 @@ package scala.cli.integration -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import com.eed3si9n.expecty.Expecty.expect -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import com.google.gson.Gson import com.google.gson.internal.LinkedTreeMap import org.eclipse.lsp4j.jsonrpc.messages.ResponseError @@ -14,9 +14,9 @@ import java.util.concurrent.{ExecutorService, ScheduledExecutorService} import scala.annotation.tailrec import scala.cli.integration.BspSuite.{Details, detailsCodec} import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent.duration.* +import scala.concurrent.duration._ import scala.concurrent.{Await, Future, Promise} -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.control.NonFatal import scala.util.{Failure, Success, Try} diff --git a/modules/integration/src/test/scala/scala/cli/integration/BspTestDefinitions.scala b/modules/integration/src/test/scala/scala/cli/integration/BspTestDefinitions.scala index 48f11f5c96..abd6be27d7 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/BspTestDefinitions.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/BspTestDefinitions.scala @@ -1,7 +1,7 @@ package scala.cli.integration import ch.epfl.scala.bsp4j.JvmTestEnvironmentParams -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import com.eed3si9n.expecty.Expecty.expect import com.google.gson.{Gson, JsonElement} @@ -11,8 +11,8 @@ import java.nio.file.Paths import scala.async.Async.{async, await} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future -import scala.concurrent.duration.* -import scala.jdk.CollectionConverters.* +import scala.concurrent.duration._ +import scala.jdk.CollectionConverters._ import scala.util.Properties abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArgs diff --git a/modules/integration/src/test/scala/scala/cli/integration/BspTests213.scala b/modules/integration/src/test/scala/scala/cli/integration/BspTests213.scala index d137d321bf..0c6759ebac 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/BspTests213.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/BspTests213.scala @@ -1,12 +1,12 @@ package scala.cli.integration -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import com.eed3si9n.expecty.Expecty.expect import com.google.gson.{Gson, JsonElement} import scala.async.Async.{async, await} import scala.concurrent.ExecutionContext.Implicits.global -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ class BspTests213 extends BspTestDefinitions with BspTests2Definitions with Test213 { List(".sc", ".scala").foreach { filetype => diff --git a/modules/integration/src/test/scala/scala/cli/integration/BspTests3NextRc.scala b/modules/integration/src/test/scala/scala/cli/integration/BspTests3NextRc.scala index 36bf0173e4..9781d2ff31 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/BspTests3NextRc.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/BspTests3NextRc.scala @@ -1,11 +1,11 @@ package scala.cli.integration -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import com.eed3si9n.expecty.Expecty.expect import scala.async.Async.{async, await} import scala.concurrent.ExecutionContext.Implicits.global -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.Properties class BspTests3NextRc extends BspTestDefinitions with BspTests3Definitions with Test3NextRc { diff --git a/modules/integration/src/test/scala/scala/cli/integration/GitHubTests.scala b/modules/integration/src/test/scala/scala/cli/integration/GitHubTests.scala index 1c8e761845..3e5afe84cd 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/GitHubTests.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/GitHubTests.scala @@ -1,7 +1,7 @@ package scala.cli.integration import com.eed3si9n.expecty.Expecty.expect -import com.github.plokhotnyuk.jsoniter_scala.core.* +import com.github.plokhotnyuk.jsoniter_scala.core._ import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker import coursier.cache.ArchiveCache import coursier.util.Artifact diff --git a/modules/integration/src/test/scala/scala/cli/integration/JmhTests.scala b/modules/integration/src/test/scala/scala/cli/integration/JmhTests.scala index 32dd7dc7ed..226fe0524d 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/JmhTests.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/JmhTests.scala @@ -1,13 +1,13 @@ package scala.cli.integration -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import com.eed3si9n.expecty.Expecty.expect import java.nio.file.Files import scala.async.Async.{async, await} import scala.concurrent.ExecutionContext.Implicits.global -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.Properties class JmhTests extends ScalaCliSuite with JmhSuite with BspSuite { diff --git a/modules/integration/src/test/scala/scala/cli/integration/PackageTestDefinitions.scala b/modules/integration/src/test/scala/scala/cli/integration/PackageTestDefinitions.scala index c7c70230be..ee2bf1e0d6 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/PackageTestDefinitions.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/PackageTestDefinitions.scala @@ -9,7 +9,7 @@ import java.util import java.util.zip.ZipFile import scala.cli.integration.TestUtil.removeAnsiColors -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.{Properties, Using} abstract class PackageTestDefinitions extends ScalaCliSuite with TestScalaVersionArgs { diff --git a/modules/integration/src/test/scala/scala/cli/integration/PublishSetupTests.scala b/modules/integration/src/test/scala/scala/cli/integration/PublishSetupTests.scala index 122b6edc9d..9b324a5170 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/PublishSetupTests.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/PublishSetupTests.scala @@ -6,7 +6,7 @@ import com.virtuslab.using_directives.reporter.ConsoleReporter import org.eclipse.jgit.api.Git import org.eclipse.jgit.transport.URIish -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.Properties import scala.util.matching.Regex diff --git a/modules/integration/src/test/scala/scala/cli/integration/PublishTestDefinitions.scala b/modules/integration/src/test/scala/scala/cli/integration/PublishTestDefinitions.scala index 7754c94025..eabfce5b14 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/PublishTestDefinitions.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/PublishTestDefinitions.scala @@ -6,7 +6,7 @@ import java.io.File import java.nio.file.Paths import java.util.zip.ZipFile -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.Properties abstract class PublishTestDefinitions extends ScalaCliSuite with TestScalaVersionArgs { diff --git a/modules/integration/src/test/scala/scala/cli/integration/RunScalacCompatTestDefinitions.scala b/modules/integration/src/test/scala/scala/cli/integration/RunScalacCompatTestDefinitions.scala index 0d07245781..bc07bf9bfc 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/RunScalacCompatTestDefinitions.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/RunScalacCompatTestDefinitions.scala @@ -4,7 +4,7 @@ import com.eed3si9n.expecty.Expecty.expect import java.io.File -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.Properties /** For the `compile` counterpart, refer to [[CompileScalacCompatTestDefinitions]] */ diff --git a/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala b/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala index 2b28052df6..d02c1a5ab9 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala @@ -7,7 +7,7 @@ import java.nio.charset.Charset import scala.cli.integration.util.DockerServer import scala.io.Codec -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.Properties abstract class RunTestDefinitions diff --git a/modules/integration/src/test/scala/scala/cli/integration/ScriptWrapperTestDefinitions.scala b/modules/integration/src/test/scala/scala/cli/integration/ScriptWrapperTestDefinitions.scala index efb9a1f0ed..d14a0c7ffc 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/ScriptWrapperTestDefinitions.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/ScriptWrapperTestDefinitions.scala @@ -1,11 +1,11 @@ package scala.cli.integration -import ch.epfl.scala.bsp4j as b +import ch.epfl.scala.{bsp4j => b} import com.eed3si9n.expecty.Expecty.expect import scala.async.Async.{async, await} import scala.concurrent.ExecutionContext -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ trait ScriptWrapperTestDefinitions extends ScalaCliSuite { _: BspTestDefinitions => private def appWrapperSnippet(wrapperName: String) = s"object $wrapperName extends App {" diff --git a/modules/integration/src/test/scala/scala/cli/integration/TestUtil.scala b/modules/integration/src/test/scala/scala/cli/integration/TestUtil.scala index d212018107..da0d3d5078 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/TestUtil.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/TestUtil.scala @@ -8,7 +8,7 @@ import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.{ExecutorService, Executors, ScheduledExecutorService, ThreadFactory} import java.util.{Locale, UUID} -import scala.Console.* +import scala.Console._ import scala.annotation.tailrec import scala.concurrent.duration.{Duration, DurationInt, FiniteDuration} import scala.concurrent.{Await, ExecutionContext, Future} diff --git a/modules/integration/src/test/scala/scala/cli/integration/util/DockerServer.scala b/modules/integration/src/test/scala/scala/cli/integration/util/DockerServer.scala index b531a4257a..3b348271ca 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/util/DockerServer.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/util/DockerServer.scala @@ -5,7 +5,7 @@ package scala.cli.integration.util import com.spotify.docker.client.DefaultDockerClient import com.spotify.docker.client.messages.{ContainerConfig, HostConfig, PortBinding} -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.Try final case class DockerServer( diff --git a/modules/options/src/main/scala/scala/build/Artifacts.scala b/modules/options/src/main/scala/scala/build/Artifacts.scala index 66daa72d50..52ff56c11c 100644 --- a/modules/options/src/main/scala/scala/build/Artifacts.scala +++ b/modules/options/src/main/scala/scala/build/Artifacts.scala @@ -5,13 +5,13 @@ import coursier.core.{Classifier, Module, ModuleName, Organization, Repository, import coursier.error.ResolutionError import coursier.util.Task import coursier.{Dependency => CsDependency, Fetch, Resolution, core => csCore, util => csUtil} -import dependency.* +import dependency._ import java.net.URL -import scala.build.CoursierUtils.* +import scala.build.CoursierUtils._ import scala.build.EitherCps.{either, value} -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.errors.{ BuildException, CompositeBuildException, @@ -20,8 +20,8 @@ import scala.build.errors.{ ToolkitVersionError } import scala.build.internal.Constants -import scala.build.internal.Constants.* -import scala.build.internal.CsLoggerUtil.* +import scala.build.internal.Constants._ +import scala.build.internal.CsLoggerUtil._ import scala.build.internal.Util.{PositionedScalaDependencyOps, ScalaModuleOps} import scala.build.internals.ConsoleUtils.ScalaCliConsole.warnPrefix import scala.collection.mutable diff --git a/modules/options/src/main/scala/scala/build/CoursierUtils.scala b/modules/options/src/main/scala/scala/build/CoursierUtils.scala index 078bff7719..99e9ac44ec 100644 --- a/modules/options/src/main/scala/scala/build/CoursierUtils.scala +++ b/modules/options/src/main/scala/scala/build/CoursierUtils.scala @@ -5,7 +5,7 @@ import coursier.parse.{DependencyParser, ModuleParser} import dependency.{DependencyLike, NameAttributes} import scala.build.internal.Constants -import scala.quoted.* +import scala.quoted._ def noArgs(args: Expr[Seq[Any]])(using Quotes): Unit = {} // TODO diff --git a/modules/options/src/main/scala/scala/build/TemporaryInMemoryRepository.scala b/modules/options/src/main/scala/scala/build/TemporaryInMemoryRepository.scala index d169a4f208..bce1ba3af1 100644 --- a/modules/options/src/main/scala/scala/build/TemporaryInMemoryRepository.scala +++ b/modules/options/src/main/scala/scala/build/TemporaryInMemoryRepository.scala @@ -1,7 +1,7 @@ package scala.build import coursier.cache.{ConnectionBuilder, FileCache} -import coursier.core.* +import coursier.core._ import coursier.util.{Artifact, EitherT, Monad} import java.io.{File, FileNotFoundException, IOException} diff --git a/modules/options/src/main/scala/scala/build/actionable/ActionableDependencyHandler.scala b/modules/options/src/main/scala/scala/build/actionable/ActionableDependencyHandler.scala index 33e400e1fb..e486f71807 100644 --- a/modules/options/src/main/scala/scala/build/actionable/ActionableDependencyHandler.scala +++ b/modules/options/src/main/scala/scala/build/actionable/ActionableDependencyHandler.scala @@ -1,15 +1,14 @@ package scala.build.actionable - import coursier.Versions import coursier.core.{Latest, Version} import coursier.parse.RepositoryParser -import dependency.* +import dependency._ import scala.build.EitherCps.{either, value} -import scala.build.actionable.ActionableDiagnostic.* +import scala.build.actionable.ActionableDiagnostic._ import scala.build.errors.{BuildException, RepositoryFormatError, Severity} import scala.build.internal.Constants -import scala.build.internal.Util.* +import scala.build.internal.Util._ import scala.build.options.BuildOptions import scala.build.options.ScalaVersionUtil.versions import scala.build.{Logger, Positioned} diff --git a/modules/options/src/main/scala/scala/build/actionable/ActionableDiagnostic.scala b/modules/options/src/main/scala/scala/build/actionable/ActionableDiagnostic.scala index d751a0a443..13d05cef62 100644 --- a/modules/options/src/main/scala/scala/build/actionable/ActionableDiagnostic.scala +++ b/modules/options/src/main/scala/scala/build/actionable/ActionableDiagnostic.scala @@ -1,5 +1,4 @@ package scala.build.actionable - import dependency._ import scala.build.Position diff --git a/modules/options/src/main/scala/scala/build/actionable/ActionableHandler.scala b/modules/options/src/main/scala/scala/build/actionable/ActionableHandler.scala index 5d227f9f1e..fa64babf98 100644 --- a/modules/options/src/main/scala/scala/build/actionable/ActionableHandler.scala +++ b/modules/options/src/main/scala/scala/build/actionable/ActionableHandler.scala @@ -1,7 +1,7 @@ package scala.build.actionable import scala.build.Logger -import scala.build.Ops.* +import scala.build.Ops._ import scala.build.errors.{BuildException, CompositeBuildException, Diagnostic} import scala.build.options.BuildOptions diff --git a/modules/options/src/main/scala/scala/build/info/BuildInfo.scala b/modules/options/src/main/scala/scala/build/info/BuildInfo.scala index a282ce0197..80f9f28d85 100644 --- a/modules/options/src/main/scala/scala/build/info/BuildInfo.scala +++ b/modules/options/src/main/scala/scala/build/info/BuildInfo.scala @@ -4,7 +4,7 @@ import scala.build.EitherCps.{either, value} import scala.build.errors.{BuildException, BuildInfoGenerationError} import scala.build.info.BuildInfo.escapeBackslashes import scala.build.internal.Constants -import scala.build.options.* +import scala.build.options._ final case class BuildInfo( projectVersion: Option[String] = None, diff --git a/modules/options/src/main/scala/scala/build/info/ScopedBuildInfo.scala b/modules/options/src/main/scala/scala/build/info/ScopedBuildInfo.scala index 78e777ddc7..4227b110e0 100644 --- a/modules/options/src/main/scala/scala/build/info/ScopedBuildInfo.scala +++ b/modules/options/src/main/scala/scala/build/info/ScopedBuildInfo.scala @@ -113,7 +113,7 @@ object ScopedBuildInfo { ) } - private val charSet = StandardCharsets.UTF_8 + StandardCharsets.UTF_8 implicit val monoid: ConfigMonoid[ScopedBuildInfo] = ConfigMonoid.derive } diff --git a/modules/options/src/main/scala/scala/build/options/BuildOptions.scala b/modules/options/src/main/scala/scala/build/options/BuildOptions.scala index 66181732c1..2b88b7bcd8 100644 --- a/modules/options/src/main/scala/scala/build/options/BuildOptions.scala +++ b/modules/options/src/main/scala/scala/build/options/BuildOptions.scala @@ -1,11 +1,10 @@ package scala.build.options - -import com.github.plokhotnyuk.jsoniter_scala.core.* +import com.github.plokhotnyuk.jsoniter_scala.core._ import coursier.cache.{ArchiveCache, FileCache, UnArchiver} import coursier.core.{Repository, Version} import coursier.parse.RepositoryParser import coursier.util.{Artifact, Task} -import dependency.* +import dependency._ import java.io.File import java.math.BigInteger @@ -14,11 +13,11 @@ import java.security.MessageDigest import scala.build.EitherCps.{either, value} import scala.build.actionable.{ActionableDiagnostic, ActionablePreprocessor} -import scala.build.errors.* +import scala.build.errors._ import scala.build.interactive.Interactive -import scala.build.interactive.Interactive.* -import scala.build.internal.Constants.* -import scala.build.internal.CsLoggerUtil.* +import scala.build.interactive.Interactive._ +import scala.build.internal.Constants._ +import scala.build.internal.CsLoggerUtil._ import scala.build.internal.Regexes.scala3NightlyNicknameRegex import scala.build.internal.{Constants, OsLibc, StableScalaVersion, Util} import scala.build.internals.EnvVar @@ -27,7 +26,7 @@ import scala.build.options.validation.BuildOptionsRule import scala.build.{Artifacts, Logger, Os, Position, Positioned} import scala.collection.immutable.Seq import scala.concurrent.Await -import scala.concurrent.duration.* +import scala.concurrent.duration._ import scala.util.Properties import scala.util.control.NonFatal diff --git a/modules/options/src/main/scala/scala/build/options/ComputeVersion.scala b/modules/options/src/main/scala/scala/build/options/ComputeVersion.scala index 41f96b3eb3..14818ab8b7 100644 --- a/modules/options/src/main/scala/scala/build/options/ComputeVersion.scala +++ b/modules/options/src/main/scala/scala/build/options/ComputeVersion.scala @@ -1,14 +1,14 @@ package scala.build.options -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import org.eclipse.jgit.api.Git import org.eclipse.jgit.lib.{Constants, Ref} import scala.build.errors.{BuildException, MalformedInputError} import scala.build.{Position, Positioned} import scala.io.Codec -import scala.jdk.CollectionConverters.* +import scala.jdk.CollectionConverters._ import scala.util.{Success, Try, Using} sealed abstract class ComputeVersion extends Product with Serializable { @@ -133,8 +133,7 @@ object ComputeVersion { extends BuildException(message, positions) } - private lazy val commandCodec: JsonValueCodec[List[String]] = - JsonCodecMaker.make + JsonCodecMaker.make def parse(input: Positioned[String]): Either[BuildException, ComputeVersion] = if (input.value == "git" || input.value == "git:tag") diff --git a/modules/options/src/main/scala/scala/build/options/ConfigMonoid.scala b/modules/options/src/main/scala/scala/build/options/ConfigMonoid.scala index be27619365..bab5f2ca82 100644 --- a/modules/options/src/main/scala/scala/build/options/ConfigMonoid.scala +++ b/modules/options/src/main/scala/scala/build/options/ConfigMonoid.scala @@ -1,7 +1,7 @@ package scala.build.options -import scala.compiletime.* -import scala.deriving.* +import scala.compiletime._ +import scala.deriving._ trait ConfigMonoid[T]: def zero: T diff --git a/modules/options/src/main/scala/scala/build/options/HasHashData.scala b/modules/options/src/main/scala/scala/build/options/HasHashData.scala index a8d2852231..040043c0ce 100644 --- a/modules/options/src/main/scala/scala/build/options/HasHashData.scala +++ b/modules/options/src/main/scala/scala/build/options/HasHashData.scala @@ -1,7 +1,7 @@ package scala.build.options -import scala.compiletime.* -import scala.deriving.* +import scala.compiletime._ +import scala.deriving._ trait HasHashData[T]: def add(prefix: String, t: T, update: String => Unit): Unit diff --git a/modules/options/src/main/scala/scala/build/options/ScalaVersionUtil.scala b/modules/options/src/main/scala/scala/build/options/ScalaVersionUtil.scala index 6db86c0955..771d079727 100644 --- a/modules/options/src/main/scala/scala/build/options/ScalaVersionUtil.scala +++ b/modules/options/src/main/scala/scala/build/options/ScalaVersionUtil.scala @@ -1,15 +1,15 @@ package scala.build.options -import com.github.plokhotnyuk.jsoniter_scala.core.* -import com.github.plokhotnyuk.jsoniter_scala.macros.* +import com.github.plokhotnyuk.jsoniter_scala.core._ +import com.github.plokhotnyuk.jsoniter_scala.macros._ import coursier.Versions import coursier.cache.{ArtifactError, FileCache} -import coursier.core.{Module, Repository, Version, Versions as CoreVersions} +import coursier.core.{Module, Repository, Version, Versions => CoreVersions} import coursier.util.{Artifact, Task} import java.io.File -import scala.build.CoursierUtils.* +import scala.build.CoursierUtils._ import scala.build.EitherCps.{either, value} import scala.build.errors.{ BuildException, diff --git a/modules/options/src/main/scala/scala/build/options/Scope.scala b/modules/options/src/main/scala/scala/build/options/Scope.scala index 7cd221acda..845ae14f67 100644 --- a/modules/options/src/main/scala/scala/build/options/Scope.scala +++ b/modules/options/src/main/scala/scala/build/options/Scope.scala @@ -1,5 +1,4 @@ package scala.build.options - import scala.build.options.BuildRequirements sealed abstract class Scope(val name: String, private val index: Int) extends Product diff --git a/modules/options/src/main/scala/scala/build/options/ScriptOptions.scala b/modules/options/src/main/scala/scala/build/options/ScriptOptions.scala index 1f18949d78..7e36dca7a3 100644 --- a/modules/options/src/main/scala/scala/build/options/ScriptOptions.scala +++ b/modules/options/src/main/scala/scala/build/options/ScriptOptions.scala @@ -1,5 +1,4 @@ package scala.build.options - import scala.build.internal.CodeWrapper final case class ScriptOptions(