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

Allow Mill to bootstrap its own Java version #3951

Open
lihaoyi opened this issue Nov 13, 2024 · 3 comments
Open

Allow Mill to bootstrap its own Java version #3951

lihaoyi opened this issue Nov 13, 2024 · 3 comments

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Nov 13, 2024

Follow on from #3480, apart from optionally removing the environmental dependency from JavaModules we should optionally remove the environmental dependency from Mill itself. The bootstrap script can download and unpack the respective JVM as necessary during first launch

If we can't rely on Java during the bootstrapping process, then our options are either to use curl from the boostrap script to directly download the JVM, or use curl to download a native-image that uses coursier to download the JVM

@alexarchambault
Copy link
Contributor

FYI the following script downloads and runs a coursier binary from the coursier cache itself (that is, it doesn't put anything in the PATH or installs anything globally). export JAVA_HOME="$(cs java-home --jvm 17) say can then download and unpack a JDK in the coursier cache too.

@alexarchambault
Copy link
Contributor

(The script needs to be updated for ARM64 though)

@lihaoyi
Copy link
Member Author

lihaoyi commented Nov 22, 2024

@alexarchambault that looks like a good start. To use this, we'd need to:

  1. Move the coursier binary downloads to Maven Central
  2. Update the script to support ARM64
  3. Integrate it into ./mill

Would take a bit of work, but seems straightforward

Alternately, if we could get graal native image working on the Mill client, we could make it use Coursier programmatically to bootstrap the JVM. That would reduce the number of moving parts and is probably something we want to do anyway

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

No branches or pull requests

2 participants