-
Notifications
You must be signed in to change notification settings - Fork 8
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
Remove bellwether from generated yaml #99
Conversation
Related to issue: openrewrite/rewrite-docs#250
While this would hide the bellwether (good) is would be better to show the configured precondition in the bellwether. So right now what we show is: CurrentAll the issues of the next section + showing internal class bellwether. With this changeNo bellwether (good), type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.boot3.EnableVirtualThreads
displayName: Enable Virtual Threads on Java 21
description: Set `spring.threads.virtual.enabled` to `true` in `application.properties` or `application.yml`.
recipeList:
- org.openrewrite.java.spring.AddSpringProperty IdealAs per the source type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.spring.boot3.EnableVirtualThreads
displayName: Enable Virtual Threads on Java 21
description: Set `spring.threads.virtual.enabled` to `true` in `application.properties` or `application.yml`.
preconditions:
- org.openrewrite.java.search.HasJavaVersion:
version: 21.X
recipeList:
- org.openrewrite.java.spring.AddSpringProperty:
property: spring.threads.virtual.enabled
value: true |
This is an improvement already, but still shows broken config to the user in that recipe list tab. We can still merge this already though, but adding that context. |
Ah I see -- thanks for clarifying again. I'm going to close this PR as it doesn't really do what we want. |
Agh my bad @timtebeek didn't see your follow up comment before closing haha. I'm gonna poke around with it a bit more first and may reopen if I can't find anything. |
After stepping through the debugger, I don't believe we currently have access to be able to output the preconditions or see anything beyond what we currently have. It's possible I missed something, but I couldn't find I think we would need to update rewrite itself and change the RecipeDescriptor class to include a preconditions variable or something. I'll go ahead and reopen this PR as it feels like it's worthwhile to merge in as is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that this is already an improvement that's worth merging.
Related to issue: openrewrite/rewrite-docs#250
You can see there is no bellwether in the yaml recipe list generated: