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

Allow Java 17 as target bytecode #197

Merged
merged 1 commit into from
Sep 19, 2021
Merged

Allow Java 17 as target bytecode #197

merged 1 commit into from
Sep 19, 2021

Conversation

chiquitinxx
Copy link
Contributor

I don't know if Groovy 3.0.9 is fully or first compatible version with Java 17. I have tested with a Java project and at least Spock tests are running.

@keeganwitt
Copy link
Member

keeganwitt commented Sep 17, 2021

I don't know if Groovy 3.0.9 is fully or first compatible version with Java 17. I have tested with a Java project and at least Spock tests are running.

Thank you for the PR! It looks like 3.0.8 was the first 3.x release. We also have to support when it was added on the 4.x line, which was 4.0.0-alpha-3. Also, it'd be good to update the JavaDoc (it will be used for the Maven site documentation for that parameter).

@keeganwitt
Copy link
Member

keeganwitt commented Sep 19, 2021

Also be aware Groovy 3 doesn't completely support Java >= 16. I guess I missed a conversation somewhere. Paul reiterated this here.

For Groovy 3, JDK 16/17 has full support at the ASM level but only partial with respect to the illegal access errors seen in previous versions.

  • If you have simple scripts, everything may work as per Groovy 4
  • Sometimes you might still get warnings like in earlier JDKs
  • Sometimes where you used to get warnings, the code will no longer work.
  • We may backport some of the Groovy 4 changes to earlier versions, e.g. GROOVY-10137/GROOVY-10138

To give you an idea, last time I ran the test suite of approx 11000 tests around 40 are affected.
Example errors:

  • groovy.lang.MissingMethodException: No signature of method: java.net.URLStreamHandler.parseURL() is applicable for argument types: (URL, String, Integer, Integer) values: [map:, map://local/, 4, 12] // call of protected method
  • groovy.lang.MissingMethodException: No signature of method: Dolly.clone() // call of protected method

A GA release of Groovy 4 I think isn't far away, based on discussions.

@keeganwitt keeganwitt merged commit b3e7e87 into groovy:master Sep 19, 2021
@keeganwitt
Copy link
Member

Since this was already like 90% of the way there, I went ahead and made the final adjustments. Thanks again for the PR!

@chiquitinxx
Copy link
Contributor Author

Thank you for so fast release :)

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.

None yet

3 participants