scala-cli
scala-cli copied to clipboard
`--jvm` option with wrong parameter should help find the right value
Version(s) 1.0.6
Describe the bug
Usability enhancment needed for --jvm param, to allow user to discover and self-correct easily.
To Reproduce Give wrong jvm option, e.g.:
scala-cli --jvm adopt:17
Error: java.lang.Exception: coursier.jvm.JvmCache$JvmNotFoundInIndex: JVM adopt:17 not found in index: JVM adopt not found
For more details, please see '/Users/pprazak/repos/besom/.scala-build/stacktraces/1701076365-7346222702959816796.log'
scala-cli --jvm openjdk:17
Error: java.lang.Exception: coursier.jvm.JvmCache$JvmNotFoundInIndex: JVM openjdk:17 not found in index: JVM openjdk not found
For more details, please see '/Users/pprazak/repos/besom/.scala-build/stacktraces/1701076408-10024759759442678847.log'
Expected behaviour
- user gets an actionable and easy to understand error message, instead of an exception
- user gets a list of supported JVM on their machine/OS combo
- user gets a suggestion what to do to fix the problem successfully
~~AFAIU from this list: https://github.com/shyiko/jabba/blob/master/index.json~~ ~~I assume my MacOS + M1 can only get Azul for some reason.~~
~~The list upstream dependency should be updated to stop aggregating this problem.~~
~~I get the SIGSEGV with --jvm temurin:17 and with --jvm adoptium:17~~
I get the SIGSEGV with
--jvm temurin:17and with--jvm adoptium:17
Unrelated, tied to https://github.com/VirtusLab/scala-cli/issues/2582 (maybe?)
I'm sorry, wrong window, ofc the commend above was meant to be made in the #2582