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

Attempt not to run boot upgrade 1.x -> 2.x for projects on 2.x already #543

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

BoykoAlex
Copy link
Contributor

Fixes #542

Used preconditions if spring-core is 4.x then we can upgrade to boot 2.x

- org.openrewrite.java.dependencies.DependencyInsight:
groupIdPattern: org.springframework
artifactIdPattern: spring-core
version: 4.x
recipeList:
Copy link
Collaborator

@nmck257 nmck257 Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to move this precondition to a narrower subrecipe -- right now, it's fully halting the "chain" of each upgrade recipe calling the previous, It also means that recipes such as SpringBoot2BestPractices are no longer run for projects starting on newer Spring versions, which is perhaps unexpected and I'd say undesirable.

Maybe I move the precondition to MigrateHibernateConstraintsToJavax? Any concerns @BoykoAlex ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that still makes the unit test that I've added to pass. Perhaps we can narrow down the check as well to jakarta.validation-api transient dependency presence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

jakarta.validation-api dependency added while upgrading Spring Petclinic example
3 participants