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

Feature request: recipe for migrating to Java 21 #305

Closed
matsev opened this issue Sep 26, 2023 · 5 comments
Closed

Feature request: recipe for migrating to Java 21 #305

matsev opened this issue Sep 26, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@matsev
Copy link

matsev commented Sep 26, 2023

What problem are you trying to solve?

Recipe for automated migration to Java 21

Describe the solution you'd like

A recipe that automates Java migration from version 17 to 21, c.f. existing Java migration recipies

Have you considered any alternatives or workarounds?

No

Additional context

Are you interested in contributing this feature to OpenRewrite?

Not at the moment

@matsev matsev added the enhancement New feature or request label Sep 26, 2023
@timtebeek
Copy link
Contributor

hi @matsev ; thanks for logging this request here! As you saw we already had two PRs related to Java 21

We're right now waiting for this issue & Gradle 8.4 before we're (easily) actually able to continue work on Java 21:

Are there any particular migration recipes for Java 21 that you're looking forward to? It might make sense to log those as separate issues with links to the JEPs / release notes, as that makes it easier pick those up and close an issue.

We'd also need to add a Java 21 specific parser, similar to the Java 8, 11 and 17 parsers in OpenRewrite/rewrite. That way you're not stuck on Java 21 without OpenRewrite support. Also best tracked as a separate issue I suppose.

@matsev
Copy link
Author

matsev commented Sep 26, 2023

@timtebeek Thanks for your reply. Sequenced collection was the first thing that crossed my mind, but after looking at the Java 21 release notes I decided to create another ticket for JEP 441: Pattern Matching for switch (and possibly also for the related JEP 440: Record Patterns), please see #306

@timtebeek
Copy link
Contributor

Thanks a lot! Helps to have them targeted to a particular use case, and thanks for the detail in reporting

@timtebeek
Copy link
Contributor

Now using gradle 8.4 here and in rewrite core, for Java 21 support; one step closer.

@timtebeek
Copy link
Contributor

We now have a decent first set of recipes to migrate to Java 21:
https://docs.openrewrite.org/recipes/java/migrate/upgradetojava21

Closing this issue in favor of individual issues for further migration recipes.

@github-project-automation github-project-automation bot moved this from Recipes Wanted to Done in OpenRewrite Nov 18, 2023
@timtebeek timtebeek self-assigned this Nov 18, 2023
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
Archived in project
Development

No branches or pull requests

2 participants