-
Notifications
You must be signed in to change notification settings - Fork 41
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
Gradle (8.4, JDK 21) rewrite tasks hang indefinitely #234
Comments
Hi @mmoayyed , good seeing you here! As far as I'm aware you're certainly one of the earlier ones trying out OpenRewrite on Java 21. Not quite sure that's supported yet; we're tracking support with some small blockers in Would running on Java 17 for now be an option? And does that give any different results? Note that you're also able to compose and run recipes quickly through the Moderne platform; That way you should be able to quickly explore what changes a collection of recipes would make: Hope that helps you iterate quicker, such that you're able to get up and running before distributing your own recipes. |
Thank you very much for the details and the screenshot. Much appreciated. ATM, running on JDK 17 is no longer an option as the codebase/project I am primarily working on does require JDK 21. I will nonetheless give this a try once more with the Moderne platform and see if I may get better results. Is there anything I can do to help out regarding JDK 21 support? Something to test, etc? |
Glad to hear I could help in some way; we expect any recipes that you compose or develop to work on Java 21 just as well, once we have parser support there, so you should already be able to develop recipes and try those on any Java 8 - 17 projects. There's nothing related to Java 21 to test yet, but you can follow along to openrewrite/rewrite-migrate-java#305 to get updates as we work. Thanks for the offer to help! Really good to have feedback as we work. :) |
Quick note to let you know we've added a Java 21 specific parser to https://github.com/openrewrite/rewrite/tree/main/rewrite-java-21 ; Haven't tried it out on projects through the plugins yet, but there's progress towards support. |
Very nice. Thank you for the update. |
Checking back in with some fresh perspective (for myself). It turns out Gradle 8.4 does not yet running on Java 21 itself; it does support building projects that themselves use Java 21 through toolchains; but Gradle itself needs to be launched with Java < 20. Are you already using toolchains in your project? java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
} Once Gradle 8.5 becomes available you should be able to use the Java 21 to run Gradle itself as well. I believe there's a 8.5 RC out that you can try to see if that resolves your issues. Do let us know if that means this issue can be closed! |
Thank you. ATM I am running with Gradle 8.5 RC4 and OpenRewrite |
Ah perfect, thanks for confirming! Good to know there's no issues coming up to 8.5 :) |
What version of OpenRewrite are you using?
I am using:
Gradle Plugin: 6.3.18
Gradle: 8.4
JDK: 21
MacOS Ventura 13.5.2
How are you running OpenRewrite?
Configuration:
Recipe:
What is the smallest, simplest way to reproduce the problem?
What did you expect to see?
The gradle.properties file changes its version to 6.6.12
What is the full stack trace of any errors you encountered?
Build hangs with (Gradle debug logs):
Tried this with all different versions of Gradle 8.4, from RC1 to proper GA.
Are you interested in contributing a fix to OpenRewrite?
With a bit of guidance, certainly.
The text was updated successfully, but these errors were encountered: