docs.scala-lang icon indicating copy to clipboard operation
docs.scala-lang copied to clipboard

Update docs for `-release` to make it clear it accepts recent Java versions

Open rtyley opened this issue 1 year ago • 0 comments

The old displayed values of 6, 7, 8, 9 are confusing for developers contemplating updating to recent Java versions like 21 - eg :

I was getting an error that -release:21 is not a valid compiler option when I ran the code. Looking at the docs: https://docs.scala-lang.org/overviews/compiler-options/ my understanding is that this is not supported for Java 21.

That's an incorrect understanding from the docs, as newer Java versions definitely are supported by the -release Scala compiler parameter - so it's best to clarify that!

In this case, the developer was getting the error because they were accidentally running with an older Java version (the compiler error could probably be clearer there too).

rtyley avatar Apr 18 '24 10:04 rtyley