Open aschofie opened 1 year ago
There is a way to specify the JVM used with --java-home
option and using javaHome
directive.
E.g: //> using javaHome /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
or --java-home /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
However, JVM 17 is mandatory when using Bloop and it will be installed if the one provided has a lower version. You can opt for using scalac instead of Bloop with option server=false. Note that the bsp
command always uses Bloop.
For the version of Scala You can specify a version down to it's patch version e.g. 3.3.0, that way only this version is used always.
At the moment, specifying the JVM arg of corretto:11 will actually download corretto:11.0.19.7.1-- which is fine, but what happens if AWS releases corretto:11.0.19.7.1.1? Will scala-cli check for and download it? If so, it makes scala-cli unsuitable for use in containers, as while I can specify the version in the Dockerfile and make sure it downloads into the image, I cannot be sure a new sub-version will be released and scala-cli will download it on every container instance run. The same for the scala version.
There needs to be a way to specify that scala-cli should not check for any new versions of the JVM or scala-- just make a best-effort to use what is specified and fail if not found.