Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt-core to 3.8.4-RC4 #4217

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ ceef92f5d6f3d4066564d41b5165351df7cb5fbb
# Format more code
39e36746ce8b5a254e0c276bc3cdbff9842d1224


# Scala Steward: Reformat with scalafmt 3.8.4-RC4
42da0290415356156cd7b0541cc129128dbfe013
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.8.4-RC1"
version = "3.8.4-RC4"

align.openParenCallSite = false
align.preset = none
Expand Down
2 changes: 0 additions & 2 deletions ci/shared.mill
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package build.ci



def downloadTestRepo(label: String, commit: String, dest: os.Path) = {
os.unzip.stream(requests.get.stream(s"https://github.com/$label/archive/$commit.zip"), dest)
dest
Expand Down
2 changes: 1 addition & 1 deletion contrib/package.mill
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ object `package` extends RootModule {
def testArgs = Task {
super.testArgs() ++
Seq(
s"-DMILL_SCOVERAGE2_VERSION=${build.Deps.scalacScoverage2Plugin.dep.version}",
s"-DMILL_SCOVERAGE2_VERSION=${build.Deps.scalacScoverage2Plugin.dep.version}"
)
}

Expand Down
40 changes: 24 additions & 16 deletions dist/package.mill
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import $file.ci.upload

import scala.util.Using

trait InstallModule extends build.MillPublishJavaModule{
trait InstallModule extends build.MillPublishJavaModule {
// All modules that we want to aggregate as part of this `dev` assembly.
// Excluding itself, and the `dist` module that uses it
lazy val allPublishModules = build.millInternal.modules.collect {
Expand All @@ -18,7 +18,7 @@ trait InstallModule extends build.MillPublishJavaModule{

def jar: T[PathRef]

def executable = Task{
def executable = Task {
Task.traverse(allPublishModules)(m => m.publishLocalCached)()
jar()
}
Expand All @@ -40,7 +40,9 @@ trait InstallModule extends build.MillPublishJavaModule{

def installLocalCache() = Task.Command {
val path = installLocalTask(
Task.Anon((os.home / ".cache" / "mill" / "download" / (build.millVersion() + batExt)).toString())
Task.Anon(
(os.home / ".cache" / "mill" / "download" / (build.millVersion() + batExt)).toString()
)
)()
Task.log.outputStream.println(path.toString())
PathRef(path)
Expand All @@ -51,12 +53,14 @@ trait InstallModule extends build.MillPublishJavaModule{
if (os.exists(targetFile))
Task.log.info(s"Overwriting existing local Mill binary at ${targetFile}")
os.copy.over(executable().path, targetFile, createFolders = true)
Task.log.info(s"Published ${build.dist.allPublishModules.size} modules and installed ${targetFile}")
Task.log.info(
s"Published ${build.dist.allPublishModules.size} modules and installed ${targetFile}"
)
targetFile
}
}

object `package` extends RootModule with InstallModule {
object `package` extends RootModule with InstallModule {

/**
* Version of [[dist]] meant for local integration testing within the Mill
Expand Down Expand Up @@ -212,11 +216,11 @@ object `package` extends RootModule with InstallModule {
}
}
def launcherScript(
shellJvmArgs: Seq[String],
cmdJvmArgs: Seq[String],
shellClassPath: Agg[String],
cmdClassPath: Agg[String]
) = {
shellJvmArgs: Seq[String],
cmdJvmArgs: Seq[String],
shellClassPath: Agg[String],
cmdClassPath: Agg[String]
) = {

val millMainClass = "mill.runner.client.MillClientMain"

Expand Down Expand Up @@ -264,7 +268,12 @@ object `package` extends RootModule with InstallModule {
def millBootstrap = Task.Source(Task.workspace / "mill")
def millBootstrapBat = Task.Source(Task.workspace / "mill.bat")

def prepareBootstrapLauncher(bootstrap: os.Path, dest: os.Path, buildVersion: String, fileName: String) = {
def prepareBootstrapLauncher(
bootstrap: os.Path,
dest: os.Path,
buildVersion: String,
fileName: String
) = {
val outputPath = dest / fileName
val millBootstrapGrepPrefix = "(\n *DEFAULT_MILL_VERSION=)"

Expand All @@ -288,7 +297,7 @@ object `package` extends RootModule with InstallModule {
prepareBootstrapLauncher(millBootstrapBat().path, Task.dest, build.millVersion(), "mill.bat")
}

def examplePathsWithArtifactName:Task[Seq[(os.Path,String)]] = Task.Anon{
def examplePathsWithArtifactName: Task[Seq[(os.Path, String)]] = Task.Anon {
for {
exampleMod <- build.example.exampleModules
path = exampleMod.millSourcePath
Expand All @@ -299,9 +308,8 @@ object `package` extends RootModule with InstallModule {
}
}


def exampleZips: T[Seq[PathRef]] = Task {
examplePathsWithArtifactName().map{ case (examplePath, exampleStr) =>
examplePathsWithArtifactName().map { case (examplePath, exampleStr) =>
os.copy(examplePath, Task.dest / exampleStr, createFolders = true)
os.write(Task.dest / exampleStr / ".mill-version", build.millLastTag())
os.copy(bootstrapLauncher().path, Task.dest / exampleStr / "mill")
Expand Down Expand Up @@ -350,14 +358,14 @@ object `package` extends RootModule with InstallModule {
}

object native extends mill.scalalib.NativeImageModule with InstallModule {
def artifactOsSuffix = T{
def artifactOsSuffix = T {
val osName = System.getProperty("os.name").toLowerCase
if (osName.contains("mac")) "mac"
else if (osName.contains("windows")) "windows"
else "linux"
}

def artifactCpuSuffix = T{ System.getProperty("os.arch") }
def artifactCpuSuffix = T { System.getProperty("os.arch") }
def artifactName = s"${super.artifactName()}-${artifactOsSuffix()}-${artifactCpuSuffix()}"

def mainClass = Some("mill.runner.client.MillClientMain")
Expand Down
Loading
Loading