Skip to content

Fix ./mill init unpack path #5195

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

Merged
merged 3 commits into from
May 26, 2025
Merged
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
2 changes: 1 addition & 1 deletion .mill-jvm-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
zulu:17.0.14
zulu:17.0.4
15 changes: 8 additions & 7 deletions dist/package.mill
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,15 @@ object `package` extends MillJavaModule with DistModule {
prepareBootstrapLauncher(millBootstrapBat().path, Task.dest, build.millVersion(), "mill.bat")
}

def examplePathsWithArtifactName: Task[Seq[(PathRef, String)]] = Task.Input {
for {
exampleMod <- build.example.exampleModules
path = exampleMod.moduleDir
} yield {
val example = path.subRelativeTo(Task.workspace)
def examplePathsWithArtifactName0: Task[Seq[PathRef]] = Task.Input {
for (exampleMod <- build.example.exampleModules) yield PathRef(exampleMod.moduleDir)
}

def examplePathsWithArtifactName = Task {
for (pr <- examplePathsWithArtifactName0()) yield {
val example = pr.path.subRelativeTo(Task.workspace)
val artifactName = example.segments.mkString("-")
(PathRef(path), artifactName)
(pr, s"${build.dist.artifactFileNamePrefix()}-$artifactName")
}
}

Expand Down
5 changes: 2 additions & 3 deletions libs/init/package.mill
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object `package` extends MillPublishScalaModule {
val data: Seq[(os.SubPath, String)] =
build.dist.examplePathsWithArtifactName().map { case (pathRef, str) =>
val downloadUrl =
s"${build.millDownloadUrl()}/${build.dist.artifactFileNamePrefix()}-$str.zip"
s"${build.millDownloadUrl()}/$str.zip"
val subPath = pathRef.path.subRelativeTo(Task.workspace / "example")
(subPath, downloadUrl)
}
Expand Down Expand Up @@ -118,8 +118,7 @@ object `package` extends MillPublishScalaModule {
)

// An `sbt` plugin is built with Scala 2.12. See https://www.scala-sbt.org/1.x/docs/Plugins.html#Creating+an+auto+plugin.
object models
extends Cross[ModelsModule](Deps.sbtScalaVersion212, Deps.scalaVersion)
object models extends Cross[ModelsModule](Deps.sbtScalaVersion212, Deps.scalaVersion)
trait ModelsModule extends MillPublishCrossScalaModule {
// def moduleDeps = Seq(buildgen.tree())
def mvnDeps = Seq(Deps.upickle)
Expand Down