You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In Java 24 and above any rewrite-java module will fail with ClassNoDefFoundError: Type.UnknownType #4768
I'm not yet sure if this is merely the first, or the only adjustment we'll have to make. If it's the only change then we can look to do something similar as we did for Java 23, to support that using our existing Java 21 parser.
If we expect more changes, then it might make sense to fork the Java 21 parser and start a Java 24 parser without these removed type references. The best time to fork the Java 21 parser is likely after we add Lombok & JEP-440 & JEP-441 support there. Getting the timing right ensures there's less work to maintain those forks in parallel as we build out their capabilities. Lombok support is already in our Java 17 parser; these PRs track further additions to our parsers
Is there any estimate when we can expect this fixed? Is there progress being made?
This is blocking migration to Java 24 and I wouldn't expect this from such a high profile and otherwise well-maintained project.
The steps are clear, and likely not very complicated at this point, but it's not been a priority for us just yet. We see most demand moving to "LTS" versions, so 8, 11, 17, 21, 25, and where reasonably possible accommodate intermediate releases. Right now we're considering either starting an early rewrite-java-25 that then also covers Java 24 (more effort), or apply a similar patch as was seen in openrewrite/rewrite-templating#132 to bring Java 24 support to the parser in rewrite-java-21 (easier).
Any help of course would be appreciated; you'll know all to well the challenges of working at a startup/scale up and being pulled in all directions, while also having your own (and customers) priorities to tend to.
The steps are clear, and likely not very complicated at this point, but it's not been a priority for us just yet. We see most demand moving to "LTS" versions, so 8, 11, 17, 21, 25, and where reasonably possible accommodate intermediate releases.
My two cents: the approach that focuses on LTS is misguided. We are library maintainers; like it or not, we are key dependencies for many projects. If we decide to skip supporting certain versions of JDK, we force the wider ecosystem to do the same.
Today, I'm not upgrading to JDK 24, and the cost of upgrade to any future JDK starts accumulating. We've been here before, and some people are still stuck on Java 11, or Java 8 - precisely because of these ever-accumulating upgrade costs.
My opinion is that, unless we (library maintainers) treat every single JDK release seriously, we are all (as Java developers) forever stuck in the vicious cycle of fearing upgrades, therefore not upgrading, and therefore creating even more reasons to fear upgrades.
I see this as a key responsibility of me as a library maintainer, and as something that I owe the ecosystem. As such, I consider this a priority in my work. I understand why others may see it differently - the only thing I can do is try to change people's minds.
Right now we're considering either starting an early rewrite-java-25 that then also covers Java 24 (more effort), or apply a similar patch as was seen in openrewrite/rewrite-templating#132 to bring Java 24 support to the parser in rewrite-java-21 (easier).
Any help of course would be appreciated; you'll know all to well the challenges of working at a startup/scale up and being pulled in all directions, while also having your own (and customers) priorities to tend to.
I hear you, and feel your pain. One other thing I learned at a scale-up: shipped is better than perfect. If you say you have a patch you can apply to rewrite-java-21now, IMO you should do it.
Thanks for understanding and sharing your perspective; I've brought it up for internal discussion again; you'll see progress logged here if we do pick it up, as we try to work in the open where we can, which includes sharing our position and priorities.
Likely relatively straightforward; it helps resolve this immediate issue, with minimal duplication to maintain for now
Start a new rewrite-java-25 early, with current support for Java 24, and an eye toward Java 25 to follow in fall
Somewhat more work, and a new parser to maintain in parallel, but there's less risk of breaking existing parsing for Java 21-23
Either could work, depending on what you're most comfortable with. It'd sure be great to cover Java 24 already, and we'll gladly review any work done towards this.
Activity
timtebeek commentedon Dec 11, 2024
Thanks for referencing those external sources @Col-E ! Really helpful to gauge the adjustments we'll have to make here.
It looks like there's two classes in our Java 21 parser that use that Type.UnknownType; here's the first usages for each file:
rewrite/rewrite-java-21/src/main/java/org/openrewrite/java/isolated/ReloadableJava21TypeSignatureBuilder.java
Lines 42 to 44 in be820fb
rewrite/rewrite-java-21/src/main/java/org/openrewrite/java/isolated/ReloadableJava21TypeMapping.java
Lines 48 to 52 in d625680
I'm not yet sure if this is merely the first, or the only adjustment we'll have to make. If it's the only change then we can look to do something similar as we did for Java 23, to support that using our existing Java 21 parser.
If we expect more changes, then it might make sense to fork the Java 21 parser and start a Java 24 parser without these removed type references. The best time to fork the Java 21 parser is likely after we add Lombok & JEP-440 & JEP-441 support there. Getting the timing right ensures there's less work to maintain those forks in parallel as we build out their capabilities. Lombok support is already in our Java 17 parser; these PRs track further additions to our parsers
There's some additional context also in openrewrite/rewrite-templating#118.
triceo commentedon Apr 15, 2025
Is there any estimate when we can expect this fixed? Is there progress being made?
This is blocking migration to Java 24 and I wouldn't expect this from such a high profile and otherwise well-maintained project.
timtebeek commentedon Apr 15, 2025
Thanks! I'll cross link to the comment I'd posted here earlier.
The steps are clear, and likely not very complicated at this point, but it's not been a priority for us just yet. We see most demand moving to "LTS" versions, so 8, 11, 17, 21, 25, and where reasonably possible accommodate intermediate releases. Right now we're considering either starting an early rewrite-java-25 that then also covers Java 24 (more effort), or apply a similar patch as was seen in openrewrite/rewrite-templating#132 to bring Java 24 support to the parser in rewrite-java-21 (easier).
Any help of course would be appreciated; you'll know all to well the challenges of working at a startup/scale up and being pulled in all directions, while also having your own (and customers) priorities to tend to.
triceo commentedon Apr 15, 2025
My two cents: the approach that focuses on LTS is misguided. We are library maintainers; like it or not, we are key dependencies for many projects. If we decide to skip supporting certain versions of JDK, we force the wider ecosystem to do the same.
Today, I'm not upgrading to JDK 24, and the cost of upgrade to any future JDK starts accumulating. We've been here before, and some people are still stuck on Java 11, or Java 8 - precisely because of these ever-accumulating upgrade costs.
My opinion is that, unless we (library maintainers) treat every single JDK release seriously, we are all (as Java developers) forever stuck in the vicious cycle of fearing upgrades, therefore not upgrading, and therefore creating even more reasons to fear upgrades.
I see this as a key responsibility of me as a library maintainer, and as something that I owe the ecosystem. As such, I consider this a priority in my work. I understand why others may see it differently - the only thing I can do is try to change people's minds.
I hear you, and feel your pain. One other thing I learned at a scale-up: shipped is better than perfect. If you say you have a patch you can apply to
rewrite-java-21now, IMO you should do it.timtebeek commentedon Apr 15, 2025
Thanks for understanding and sharing your perspective; I've brought it up for internal discussion again; you'll see progress logged here if we do pick it up, as we try to work in the open where we can, which includes sharing our position and priorities.
triceo commentedon Apr 15, 2025
Thanks, @timtebeek, much appreciated!
zepfred commentedon Apr 15, 2025
Hey @timtebeek, thanks for the update! I wonder if I could help in any way here. What are your thoughts on supporting JDK 24, like
rewrite-java-24?If you're okay with that, I could assess the complexity and determine if I can provide a patch for it.
timtebeek commentedon Apr 15, 2025
Thanks for the offer to help @zepfred ! We're considering one of (at least) two options:
Either could work, depending on what you're most comfortable with. It'd sure be great to cover Java 24 already, and we'll gladly review any work done towards this.
timtebeek commentedon Apr 19, 2025
Thanks again @zepfred ! This will go out with the new release next week.
zepfred commentedon Apr 19, 2025
Thank you for all your hard work!