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

Cleanup after native image #4276

Merged
merged 28 commits into from
Jan 10, 2025
Merged

Cleanup after native image #4276

merged 28 commits into from
Jan 10, 2025

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Jan 9, 2025

  • Bootstrap native image JVM using Coursier, rather than just hardcoding java
  • Allow custom JVMs to be used for Mill server by specifying .mill-jvm-version
  • Make sure we use separate download paths for -native and non-native mill executables
  • Tidy up dist/package.mill
  • Remove unnecessary def fix overrides now that .fix on empty modules no longer crashes

@lihaoyi lihaoyi changed the title Bootstrap Mill's own JVM using Coursier Cleanup after native image, bootstrap native image JVM using Coursier Jan 9, 2025
@lihaoyi lihaoyi marked this pull request as ready for review January 9, 2025 13:08
@lihaoyi lihaoyi changed the title Cleanup after native image, bootstrap native image JVM using Coursier Cleanup after native image Jan 9, 2025
return exePath.getAbsolutePath();
}
String javaHome = System.getProperty("java.home");
String jvmId = "temurin:17";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, in Scala CLI (and also maybe in the coursier CLI), there's a check of the version of the local JVM before downloading one. If the version of the local one is high enough, it just uses it rather than downloading a new one.

readme.adoc Outdated
----

ThYou can also use `dist.native.installLocal` for a Graal Native Image executable,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ThYou can also use `dist.native.installLocal` for a Graal Native Image executable,
You can also use `dist.native.installLocal` for a Graal Native Image executable,


def jvmIndex0(): Task[JvmIndex] = {
val coursierCache0 = FileCache[Task]()
.withLogger(coursier.cache.loggers.RefreshLogger.create())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexarchambault for some reason this doesn't seem to be showing any progress logger on the terminal. Not sure why

@lihaoyi lihaoyi merged commit 725ce80 into com-lihaoyi:main Jan 10, 2025
28 checks passed
@lefou lefou added this to the 0.12.6 milestone Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants