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

Adopt CategoryTree for determining Recipe categorization #3

Open
sambsnyd opened this issue Jul 1, 2021 · 2 comments
Open

Adopt CategoryTree for determining Recipe categorization #3

sambsnyd opened this issue Jul 1, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@sambsnyd
Copy link
Member

sambsnyd commented Jul 1, 2021

rewrite-core now has a CategoryTree class that can make hierarchies of categories and recipes:
https://github.com/openrewrite/rewrite/blob/master/rewrite-core/src/main/java/org/openrewrite/config/CategoryTree.java

This project should adopt this approach as

  • It will help with consistency with the saas
  • It supports recipes in no category, such as RenameFile, which this project currently doesn't know how to support
  • No need to duplicate the logic here now that it is available in rewrite-core
@sambsnyd sambsnyd added the enhancement New feature or request label Jul 1, 2021
@timtebeek timtebeek added the documentation Improvements or additions to documentation label Jul 18, 2023
@timtebeek
Copy link
Contributor

Came up briefly in this Slack thread:

Is there a way to do reverse loop up, i.e. given a recipe can I find out what different composite recipes is that recipe part of? Why I am asking this.. I am running the composite recipe (UpgradeSpringBoot_3_0) for migrating to springboot 3.0. Based on the results I am not sure if its including recipes for a) migrating to spring framework 3.0 and b) migrating HandlerInterceptorAdapter. (edited)

Might be worthwhile as part of this effort to also point out recipes not included into any composite recipes, such that it's easier to spot which can only be run as a one-off recipe run. Could help surface recipes that were added, but not included before.

@timtebeek
Copy link
Contributor

Came up once again on Slack

I learned that recipes are "nested" in other recipes. Would it be possible not to list containment, but also contained-in on moderne? For instance, https://docs.openrewrite.org/recipes/java/migrate/lang/stringformatted should list that it is contained in UpgradeToJava17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants