-
Notifications
You must be signed in to change notification settings - Fork 127
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
Platform should be set when non default JVM is used. #2663
Comments
This seems to have been done on purpose and the explanation seems to be this comment: Another curious thing is that running the reproduction yields correct results for me. (although not with the provided jvm as it's not available for my machine I think) |
Platform is actually not only used for compilation, but still it would be better to use the exact java compiler I think. No reason to try and be smarter than what bloop provides |
It's Scala CLI which only uses Bloop for compilation (effectively treating it as a compiler), and then runs the compiled code itself. Which is why the platform config isn't truly relevant from the perspective of Scala CLI (we don't care what's passed to Bloop there, since we run it ourselves with the Java we want). Regardless, made a PR to explicitly set it, I guess it can't hurt to have it consistent. I don't think it changes any behaviour from our perspective, let me know if I turn out to be wrong. |
Ha, I proved myself wrong, it breaks compat with older JVMs, as Bloop tries to pass flags which aren't supported there. |
Version(s)
1.1.1
Describe the bug
Currently, if the user specifies JDK 11 as the JVM to use as in:
The platform section used for Bloop should show that, but it doesn't:
"platform": { "name": "jvm", "config": { "options": [] }, "mainClass": [] },
This means when running the wrong JVM will be used, the one Bloop runs on.
To Reproduce
prints:
Hello java /usr/lib/jvm/graal17!
in my case, since I have graal17.Expected behaviour
Prints:
Hello java <coursier-java-path>!
The text was updated successfully, but these errors were encountered: