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

Add lists of recipes, cookbook, you name it. #50

Open
gounthar opened this issue Jun 26, 2024 · 1 comment
Open

Add lists of recipes, cookbook, you name it. #50

gounthar opened this issue Jun 26, 2024 · 1 comment
Labels
enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted

Comments

@gounthar
Copy link
Collaborator

gounthar commented Jun 26, 2024

What feature do you want to see added?

While it's convenient to list recipes we want to apply on the command line, this approach may become cumbersome when dealing with numerous recipes (10 or more).

Based on my experience with OpenRewrite 6 months ago, I'd like to propose a more structured approach:

  1. Recipe Catalog:
    Six months ago, I created a list of all the recipes I was interested in.

  2. Context-Specific Recipe Sets:
    Shortly after, I found a need for assembling specific recipes based on:

    • The plugin's current state (e.g., vastly outdated, needing JDK8 migration)
    • The goal we're pursuing
  3. Cookbook Concept:
    We could create a "cookbook" that references predefined recipes. For example, we could have a set of recipes corresponding to the "Improve a Plugin" tutorial.

  4. Command Line Enhancement:
    We should consider adding an option to distinguish between a recipe list and a cookbook list in the command line interface.

What are your thoughts on this approach? Do you see any potential challenges or benefits?

I'm particularly interested in:

  • The feasibility of implementing a cookbook system
  • How this might improve our workflow
  • Any alternative approaches we should consider

Thank you for your input.

Upstream changes

No response

Are you interested in contributing this feature?

No response

@gounthar gounthar added the enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Jun 26, 2024
@jonesbusy
Copy link
Collaborator

I think it's the next "big" feature we need to work on.

Right now the list of recipe on the recipes.yml is quiet flat and some recipes are refined at top level to avoid code duplication.

But some of those recipes like io.jenkins.tools.pluginmodernizer.RemoveExtraMavenProperties are not supposed to be called directly. Because they assume that a bom is present to remove some property. The original remove (https://docs.openrewrite.org/recipes/maven/removeproperty) doesn't check if the property is used on the pom or tree.

So I'm not sure how to expose this "cookbook", if we need some high level concept on top of recipes. Or if using tags on recipes that should be available on top level is enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted
Projects
None yet
Development

No branches or pull requests

2 participants