-
Notifications
You must be signed in to change notification settings - Fork 39
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
Upgrade OpenRewrite 3.2.0 -> 3.3.0 #1557
base: master
Are you sure you want to change the base?
Conversation
Suggested commit message:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that this upgrade is incompatible with JDK 23:
Caused by: org.openrewrite.java.JavaParsingException: Failed to convert for the following cursor stack:--- BEGIN PATH ---
JCCompilationUnit(sourceFile = Test.java)
--- END PATH ---
... 88 more
Caused by: java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.DCTree$DCDocComment com.sun.tools.javac.tree.DocCommentTable.getCommentTree(com.sun.tools.javac.tree.JCTree)'
at org.openrewrite.java.isolated.ReloadableJava17ParserVisitor.convert(ReloadableJava17ParserVisitor.java:1744)
... 86 more
I tested JDK 17, 21, 22 and 23 builds locally: only the JDK 23 build fails. CC @timtebeek.
Thanks for the headsup! No idea what might have changed there: I didn't spot or do any relevant changes I think. :/ |
I don't think we're planning a release soon, so no rush! I had a quick look myself; @knutwannheden @MBoegers I'm a bit surprised to see that the BOM diff is empty, but if this recent change is part of the new release, that could explain the issue. 👀 |
Hi @Stephan202 the empty bom looks strange, at the first glace and thanks for the upfront investigation. I plan to look into the issue monday morning CEST, if we are blocking any urgent release let me know and I see what can be done over the weekend. Does that work for you? |
@MBoegers thanks for the rapid response, but please don't spend your weekend on this; we have no release plans. 🙏 Have a great weekend! |
3bd2741
to
cc03c3c
Compare
O boy, I already know what's going on. Java 23 has a different return type from getCommentTree than Java 21. We fixed this by reflection in the Java 21+ parser to support both. I removed this reflection piece from the Java 17 parser a couple of days ago, as I did not see a need for it there. But as you guys are using the Java 17 parser for all Java version, this started to break. I just merged back the reflection code in the Java 17 parser: openrewrite/rewrite#5089. We just need a new release to make it work again 🙂. |
89c2530
to
49a71c1
Compare
Thanks all! So if I understand the above correctly then adding rewrite-java-21 would also fix this issue. Going into 24 & 25 a similar change will be required, as the Java parser versions are likely to diverge more and more. |
It would, but that would require that we stop support for building with Java 17. (Which in turn means we either introduce toolchains support to still test against Java 17, or just drop Java 17 runtime support.) @rickie I raised a similar question here. By far the easiest thing to do is to just drop Java 17 support... |
49a71c1
to
cfd926b
Compare
Looks good. No mutations were possible for these changes. |
Good question @Stephan202. It does feel a bit fast to bump the JDK 17 runtime support 🤔. I can see how it benefits us as maintainers and Picnic to bump it. Especially the fact that we can then write Java 21 specific rules (not sure if everything would still work nicely with our OpenRewrite integration). The other option would be to defer the upgrade from JOOQ (or apply the fix) and wait on a new release from OpenRewrite with the fix for this build. Let's sync on it together offline. |
cfd926b
to
92dd817
Compare
Looks good. No mutations were possible for these changes. |
3 similar comments
Looks good. No mutations were possible for these changes. |
Looks good. No mutations were possible for these changes. |
Looks good. No mutations were possible for these changes. |
92dd817
to
f6c2746
Compare
Looks good. No mutations were possible for these changes. |
3 similar comments
Looks good. No mutations were possible for these changes. |
Looks good. No mutations were possible for these changes. |
Looks good. No mutations were possible for these changes. |
Looks good. No mutations were possible for these changes. |
2 similar comments
Looks good. No mutations were possible for these changes. |
Looks good. No mutations were possible for these changes. |
|
Looks good. No mutations were possible for these changes. |
1 similar comment
Looks good. No mutations were possible for these changes. |
This PR contains the following updates:
3.2.0
->3.3.0
Release Notes
openrewrite/rewrite-recipe-bom (OpenRewrite)
v3.3.0
: 3.3.0Compare Source
What's Changed
Full Changelog: https://docs.openrewrite.org/changelog/8-47-1-Release