Skip to content

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

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

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

rtyley
Copy link
Contributor

@rtyley rtyley commented Apr 18, 2024

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).

…rsions

The old displayed values of `6, 7, 8, 9` are confusing for developers contemplating updating to recent Java versions like `21` - eg from https://github.com/guardian/mobile-save-for-later/pull/109/files#r1559390842 :

> 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 wrong, as newer Java versions definitely are supported by the `-release` Scala compiler parameter - so it's best to clarify that!
Copy link
Contributor

@som-snytt som-snytt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is OK but likely to be overwritten if someone runs the automation.

@som-snytt som-snytt merged commit 32b50ed into scala:main Feb 22, 2025
1 check passed
@rtyley
Copy link
Contributor Author

rtyley commented Feb 25, 2025

This is OK but likely to be overwritten if someone runs the automation.

Ah, thank you! I didn't realise this file was auto-generated by automation - searching for the filename, I now see a comment that mentions the generateDocsData command:

over in the scala/scala repo, running sbt followed by generateDocsData generates a compiler-options.yml file, and then the web page is generated from that

I guess generateDocsData isn't run as part of the release process for Scala releases - I tried running it, and got quite a big diff on compiler-options.yml.

@som-snytt
Copy link
Contributor

@rtyley yes, it has limitations; I ought to have written "automation" with more sarcasm; but thanks, accurate doc for compiler options is what everyone asks for.

@rtyley
Copy link
Contributor Author

rtyley commented Feb 25, 2025

accurate doc for compiler options is what everyone asks for.

maybe getting generateDocsData to run as part of the release process could be a ScalaCenter Google Summer Of Code project 😄

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

Successfully merging this pull request may close these issues.

2 participants