@@ -231,7 +231,7 @@ trait DocsTests extends CrossSbtModule with ScalaCliScalafixModule with HasTests
231231object packager extends ScalaModule with Bloop .Module {
232232 def skipBloop = true
233233 def scalaVersion : Target [String ] = Scala .scala213
234- def ivyDeps : Target [Agg [Dep ]] = Agg (
234+ def ivyDeps : Target [Agg [Dep ]] = Agg (
235235 Deps .scalaPackagerCli
236236 )
237237 def mainClass : Target [Option [String ]] = Some (" packager.cli.PackagerCli" )
@@ -263,7 +263,7 @@ object dummy extends Module {
263263 // versions are used in the fmt and repl commands, and ensure Ammonite is available
264264 // for all Scala versions we support.
265265 object amm extends Cross [Amm ](Scala .listMaxAmmoniteScalaVersion)
266- trait Amm extends Cross .Module [String ] with CrossScalaModule with Bloop .Module {
266+ trait Amm extends Cross .Module [String ] with CrossScalaModule with Bloop .Module {
267267 def crossScalaVersion : String = crossValue
268268 def skipBloop = true
269269 def ivyDeps : Target [Agg [Dep ]] = {
@@ -276,27 +276,27 @@ object dummy extends Module {
276276 object scalafmt extends ScalaModule with Bloop .Module {
277277 def skipBloop = true
278278 def scalaVersion : Target [String ] = Scala .defaultInternal
279- def ivyDeps : Target [Agg [Dep ]] = Agg (
279+ def ivyDeps : Target [Agg [Dep ]] = Agg (
280280 Deps .scalafmtCli
281281 )
282282 }
283283 object pythonInterface extends JavaModule with Bloop .Module {
284- def skipBloop = true
284+ def skipBloop = true
285285 def ivyDeps : Target [Agg [Dep ]] = Agg (
286286 Deps .pythonInterface
287287 )
288288 }
289289 object scalaPy extends ScalaModule with Bloop .Module {
290290 def skipBloop = true
291291 def scalaVersion : Target [String ] = Scala .defaultInternal
292- def ivyDeps : Target [Agg [Dep ]] = Agg (
292+ def ivyDeps : Target [Agg [Dep ]] = Agg (
293293 Deps .scalaPy
294294 )
295295 }
296296 object scalafix extends ScalaModule with Bloop .Module {
297297 def skipBloop = true
298298 def scalaVersion : Target [String ] = Scala .defaultInternal
299- def ivyDeps : Target [Agg [Dep ]] = Agg (
299+ def ivyDeps : Target [Agg [Dep ]] = Agg (
300300 Deps .scalafixInterfaces
301301 )
302302 }
@@ -306,7 +306,7 @@ trait BuildMacros extends ScalaCliCrossSbtModule
306306 with ScalaCliPublishModule
307307 with ScalaCliScalafixModule
308308 with HasTests {
309- def crossScalaVersion : String = crossValue
309+ def crossScalaVersion : String = crossValue
310310 def compileIvyDeps : Target [Agg [Dep ]] = Task {
311311 if (crossScalaVersion.startsWith(" 3" )) super .compileIvyDeps()
312312 else super .compileIvyDeps() ++ Agg (Deps .scalaReflect(crossScalaVersion))
@@ -326,7 +326,7 @@ trait BuildMacros extends ScalaCliCrossSbtModule
326326 }
327327
328328 def testNegativeCompilation (): Command [Unit ] = Task .Command {
329- val base = Task .workspace / " modules" / " build-macros" / " src"
329+ val base = Task .workspace / " modules" / " build-macros" / " src"
330330 val negativeTests = Seq (
331331 " MismatchedLeft.scala" -> Seq (
332332 " Found\\ : +EE1" .r,
@@ -338,7 +338,7 @@ trait BuildMacros extends ScalaCliCrossSbtModule
338338 val cpsSource = base / " main" / " scala" / " scala" / " build" / " EitherCps.scala"
339339 assert(os.exists(cpsSource))
340340
341- val sv = scalaVersion()
341+ val sv = scalaVersion()
342342 def compile (extraSources : os.Path * ): CommandResult =
343343 os.proc(" scala-cli" , " compile" , " -S" , sv, cpsSource, extraSources).call(
344344 check = false ,
@@ -434,8 +434,8 @@ trait Core extends ScalaCliCrossSbtModule
434434 }
435435
436436 def constantsFile : Target [PathRef ] = Task (persistent = true ) {
437- val dir = Task .dest / " constants"
438- val dest = dir / " Constants.scala"
437+ val dir = Task .dest / " constants"
438+ val dest = dir / " Constants.scala"
439439 val testRunnerMainClass = `test-runner`(Scala .runnerScala3)
440440 .mainClass()
441441 .getOrElse(sys.error(" No main class defined for test-runner" ))
@@ -579,7 +579,7 @@ trait Directives extends ScalaCliCrossSbtModule
579579 with ScalaCliPublishModule
580580 with HasTests
581581 with ScalaCliScalafixModule {
582- def crossScalaVersion : String = crossValue
582+ def crossScalaVersion : String = crossValue
583583 def moduleDeps : Seq [PublishModule ] = Seq (
584584 options(crossScalaVersion),
585585 core(crossScalaVersion),
@@ -643,7 +643,7 @@ trait Config extends ScalaCliCrossSbtModule
643643 with ScalaCliScalafixModule {
644644 def crossScalaVersion : String = crossValue
645645 def moduleDeps : Seq [PublishModule ] = Seq (`specification-level`(crossScalaVersion))
646- def ivyDeps : Target [Agg [Dep ]] = {
646+ def ivyDeps : Target [Agg [Dep ]] = {
647647 val maybeCollectionCompat =
648648 if (crossScalaVersion.startsWith(" 2.12." )) Seq (Deps .collectionCompat)
649649 else Nil
@@ -668,7 +668,7 @@ trait Config extends ScalaCliCrossSbtModule
668668
669669trait Options extends ScalaCliCrossSbtModule with ScalaCliPublishModule with HasTests
670670 with ScalaCliScalafixModule {
671- def crossScalaVersion : String = crossValue
671+ def crossScalaVersion : String = crossValue
672672 def moduleDeps : Seq [PublishModule ] = Seq (
673673 core(crossScalaVersion)
674674 )
@@ -733,8 +733,8 @@ trait Build extends ScalaCliCrossSbtModule
733733 with ScalaCliPublishModule
734734 with HasTests
735735 with ScalaCliScalafixModule {
736- def crossScalaVersion : String = crossValue
737- def millSourcePath : os.Path = super .millSourcePath / os.up / " build"
736+ def crossScalaVersion : String = crossValue
737+ def millSourcePath : os.Path = super .millSourcePath / os.up / " build"
738738 def moduleDeps : Seq [PublishModule ] = Seq (
739739 options(crossScalaVersion),
740740 directives(crossScalaVersion),
@@ -815,9 +815,9 @@ trait Build extends ScalaCliCrossSbtModule
815815
816816trait SpecificationLevel extends ScalaCliCrossSbtModule
817817 with ScalaCliPublishModule {
818- def crossScalaVersion : String = crossValue
818+ def crossScalaVersion : String = crossValue
819819 def scalacOptions : Target [Seq [String ]] = Task {
820- val isScala213 = crossScalaVersion.startsWith(" 2.13." )
820+ val isScala213 = crossScalaVersion.startsWith(" 2.13." )
821821 val extraOptions =
822822 if (isScala213) Seq (" -Xsource:3" )
823823 else Nil
@@ -897,7 +897,7 @@ trait Cli extends CrossSbtModule with ProtoBuildModule with CliLaunchers
897897 super .generatedSources() ++ Seq (constantsFile(), optionsConstantsFile())
898898
899899 def defaultFilesResources : Target [PathRef ] = Task (persistent = true ) {
900- val dir = Task .dest / " resources"
900+ val dir = Task .dest / " resources"
901901 def transformWorkflow (content : Array [Byte ]): Array [Byte ] =
902902 new String (content, " UTF-8" )
903903 .replaceAll(" ./scala-cli" , " scala-cli" )
@@ -1040,8 +1040,8 @@ trait CliIntegration extends SbtModule with ScalaCliPublishModule with HasTests
10401040 )
10411041
10421042 def constantsFile : Target [PathRef ] = Task (persistent = true ) {
1043- val dir = Task .dest / " constants"
1044- val dest = dir / " Constants.scala"
1043+ val dir = Task .dest / " constants"
1044+ val dest = dir / " Constants.scala"
10451045 val mostlyStaticDockerfile =
10461046 Task .workspace / " .github" / " scripts" / " docker" / " ScalaCliSlimDockerFile"
10471047 assert(
@@ -1203,7 +1203,7 @@ trait CliIntegration extends SbtModule with ScalaCliPublishModule with HasTests
12031203 )
12041204
12051205 private def debugTestArgs (args : Seq [String ]): Seq [String ] = {
1206- val debugReg = " ^--debug$|^--debug:([0-9]+)$" .r
1206+ val debugReg = " ^--debug$|^--debug:([0-9]+)$" .r
12071207 val debugPortOpt = args.find(debugReg.matches).flatMap {
12081208 case debugReg(port) => Option (port).orElse(Some (" 5005" ))
12091209 case _ => None
@@ -1260,20 +1260,20 @@ trait CliIntegration extends SbtModule with ScalaCliPublishModule with HasTests
12601260
12611261trait CliIntegrationDocker extends SbtModule with ScalaCliPublishModule with HasTests {
12621262 def scalaVersion : T [String ] = Scala .scala213
1263- def ivyDeps : T [Agg [Dep ]] = super .ivyDeps() ++ Agg (
1263+ def ivyDeps : T [Agg [Dep ]] = super .ivyDeps() ++ Agg (
12641264 Deps .osLib
12651265 )
12661266}
12671267
12681268trait Runner extends ScalaCliCrossSbtModule
12691269 with ScalaCliPublishModule
12701270 with ScalaCliScalafixLegacyModule {
1271- def crossScalaVersion : String = crossValue
1271+ def crossScalaVersion : String = crossValue
12721272 def scalacOptions : Target [Seq [String ]] = Task {
12731273 super .scalacOptions() ++ Seq (" -release" , " 8" )
12741274 }
12751275 def mainClass : Target [Option [String ]] = Some (" scala.cli.runner.Runner" )
1276- def sources : Target [Seq [PathRef ]] = Task .Sources {
1276+ def sources : Target [Seq [PathRef ]] = Task .Sources {
12771277 val scala3DirNames =
12781278 if (crossScalaVersion.startsWith(" 3." )) {
12791279 val name =
@@ -1291,7 +1291,7 @@ trait Runner extends ScalaCliCrossSbtModule
12911291trait TestRunner extends ScalaCliCrossSbtModule
12921292 with ScalaCliPublishModule
12931293 with ScalaCliScalafixLegacyModule {
1294- def crossScalaVersion : String = crossValue
1294+ def crossScalaVersion : String = crossValue
12951295 def scalacOptions : Target [Seq [String ]] = Task {
12961296 super .scalacOptions() ++ Seq (" -release" , " 8" )
12971297 }
@@ -1306,7 +1306,7 @@ trait TestRunner extends ScalaCliCrossSbtModule
13061306trait TastyLib extends ScalaCliCrossSbtModule
13071307 with ScalaCliPublishModule
13081308 with ScalaCliScalafixLegacyModule {
1309- def crossScalaVersion : String = crossValue
1309+ def crossScalaVersion : String = crossValue
13101310 def constantsFile : Target [PathRef ] = Task (persistent = true ) {
13111311 val dir = Task .dest / " constants"
13121312 val dest = dir / " Constants.scala"
@@ -1364,7 +1364,7 @@ def copyTo(task: mill.main.Tasks[PathRef], dest: String): Command[Unit] = Task.C
13641364def writePackageVersionTo (dest : String ): Command [Unit ] = Task .Command {
13651365 val destPath = os.Path (dest, Task .workspace)
13661366 val rawVersion = cli(Scala .defaultInternal).publishVersion()
1367- val version =
1367+ val version =
13681368 if (rawVersion.contains(" +" )) rawVersion.stripSuffix(" -SNAPSHOT" )
13691369 else rawVersion
13701370 os.write.over(destPath, version)
@@ -1438,7 +1438,7 @@ def copyJvmBootstrappedLauncher(directory: String = "artifacts"): Command[Unit]
14381438def uploadLaunchers (directory : String = " artifacts" ): Command [Unit ] = Task .Command {
14391439 val version = cli(Scala .defaultInternal).publishVersion()
14401440
1441- val path = os.Path (directory, Task .workspace)
1441+ val path = os.Path (directory, Task .workspace)
14421442 val launchers = os.list(path).filter(os.isFile(_)).map { path =>
14431443 path -> path.last
14441444 }
@@ -1561,8 +1561,8 @@ object ci extends Module {
15611561 gitClone(repo, branch, targetDir)
15621562 setupGithubRepo(mainDir)
15631563
1564- val setupScript = os.read(setupScriptPath)
1565- val scalaCliVersionRegex = " const scalaCLIVersion = '.*'" .r
1564+ val setupScript = os.read(setupScriptPath)
1565+ val scalaCliVersionRegex = " const scalaCLIVersion = '.*'" .r
15661566 val updatedSetupScriptPath =
15671567 scalaCliVersionRegex.replaceFirstIn(setupScript, s " const scalaCLIVersion = ' $version' " )
15681568 os.write.over(setupScriptPath, updatedSetupScriptPath)
@@ -1590,14 +1590,14 @@ object ci extends Module {
15901590 gitClone(repo, branch, targetDir)
15911591 setupGithubRepo(scalaCliDir)
15921592
1593- val launcherScript = os.read(standaloneLauncherPath)
1594- val scalaCliVersionRegex = " SCALA_CLI_VERSION=\" .*\" " .r
1593+ val launcherScript = os.read(standaloneLauncherPath)
1594+ val scalaCliVersionRegex = " SCALA_CLI_VERSION=\" .*\" " .r
15951595 val updatedLauncherScript =
15961596 scalaCliVersionRegex.replaceFirstIn(launcherScript, s """ SCALA_CLI_VERSION=" $version" """ )
15971597 os.write.over(standaloneLauncherPath, updatedLauncherScript)
15981598
1599- val launcherWindowsScript = os.read(standaloneWindowsLauncherPath)
1600- val scalaCliWindowsVersionRegex = " SCALA_CLI_VERSION=.*\" " .r
1599+ val launcherWindowsScript = os.read(standaloneWindowsLauncherPath)
1600+ val scalaCliWindowsVersionRegex = " SCALA_CLI_VERSION=.*\" " .r
16011601 val updatedWindowsLauncherScript =
16021602 scalaCliWindowsVersionRegex.replaceFirstIn(
16031603 launcherWindowsScript,
@@ -1744,8 +1744,8 @@ object ci extends Module {
17441744 gitClone(repo, branch, targetDir)
17451745 setupGithubRepo(packagesDir)
17461746
1747- val installationScript = os.read(installationScriptPath)
1748- val scalaCliVersionRegex = " SCALA_CLI_VERSION=\" .*\" " .r
1747+ val installationScript = os.read(installationScriptPath)
1748+ val scalaCliVersionRegex = " SCALA_CLI_VERSION=\" .*\" " .r
17491749 val updatedInstallationScript =
17501750 scalaCliVersionRegex.replaceFirstIn(installationScript, s """ SCALA_CLI_VERSION=" $version" """ )
17511751 os.write.over(installationScriptPath, updatedInstallationScript)
@@ -1923,8 +1923,8 @@ object ci extends Module {
19231923 distName : String = " vc_redist.x64.exe"
19241924 ): Command [Unit ] =
19251925 Task .Command {
1926- def vcVersions = Seq (" 2022" , " 2019" , " 2017" )
1927- def vcEditions = Seq (" Enterprise" , " Community" , " BuildTools" )
1926+ def vcVersions = Seq (" 2022" , " 2019" , " 2017" )
1927+ def vcEditions = Seq (" Enterprise" , " Community" , " BuildTools" )
19281928 def candidateBaseDirs =
19291929 for {
19301930 vsBasePath <- vsBasePaths
@@ -1965,12 +1965,12 @@ object ci extends Module {
19651965
19661966 val vcVersions = Seq (" 2022" , " 2019" , " 2017" )
19671967 val vcEditions = Seq (" Enterprise" , " Community" , " BuildTools" )
1968- val vsDirs = Seq (
1968+ val vsDirs = Seq (
19691969 os.Path (""" C:\Program Files\Microsoft Visual Studio""" ),
19701970 os.Path (""" C:\Program Files (x86)\Microsoft Visual Studio""" )
19711971 )
1972- val fileNamePrefix = " Microsoft_VC" .toLowerCase(Locale .ROOT )
1973- val fileNameSuffix = " _CRT_x64.msm" .toLowerCase(Locale .ROOT )
1972+ val fileNamePrefix = " Microsoft_VC" .toLowerCase(Locale .ROOT )
1973+ val fileNameSuffix = " _CRT_x64.msm" .toLowerCase(Locale .ROOT )
19741974 def candidatesIt : Iterator [os.Path ] =
19751975 for {
19761976 vsDir <- vsDirs.iterator
@@ -2004,7 +2004,7 @@ object ci extends Module {
20042004 os.write.over(dest0, content.getBytes(Charset .defaultCharset()), createFolders = true )
20052005 }
20062006 def setShouldPublish (): Command [Unit ] = publish.setShouldPublish()
2007- def shouldPublish (): Command [Unit ] = Task .Command {
2007+ def shouldPublish (): Command [Unit ] = Task .Command {
20082008 println(publish.shouldPublish())
20092009 }
20102010 def copyJvm (jvm : String = deps.graalVmJvmId, dest : String = " jvm" ): Command [Path ] = Task .Command {
0 commit comments