Skip to content
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

Investigate raising the source level to Java 17 #97

Open
agarciadom opened this issue May 30, 2024 · 1 comment
Open

Investigate raising the source level to Java 17 #97

agarciadom opened this issue May 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@agarciadom
Copy link
Contributor

agarciadom commented May 30, 2024

We should try to increase the source level of the codebase to Java 17, to gain access to features like var, text blocks, and other Java 11+ niceties. This must not impact the target level, to avoid affecting users.

@agarciadom agarciadom added the enhancement New feature or request label May 30, 2024
@alfonsodelavega
Copy link
Contributor

I just got bit by trying to set a source level of 17 and a target level of 11 in a maven project. It seems the compiler would not handle that for you (as one would expect given the option to set source and target individually), resulting in the error source release 17 requires target release 17.

JEP 247 elaborates on this, basically recommending to use release instead of source and target. The release option adds a "documented APIs" parameter when used with "modern" java versions (>=9) and sets source and target to the same value. I wonder if by setting the correct value of this extra parameter a correct backwards compilation could be achieved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants