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

Only consider specified configurations for UpgradeTransitiveDependencies created constraints #4233

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Only consider specified configurations for UpgradeTransitiveDependencies created constraints #4233

merged 1 commit into from
Jun 7, 2024

Conversation

Jenson3210
Copy link
Contributor

What's changed?

In this version, the recipe will by default consider all transitive configurations to be adding constraints.
One can limit this behaviour by specifying constraints that need to be considered.
Eg. in the light of vulnerability patching, a recipe runner might only be interested in running against runtime jars.
That would be feasible by specifying both default runtime available configurations(implementation, runtimeOnly) + any manually added transitive ones.

Anything in particular you'd like reviewers to focus on?

This change will only have impact if a configurations list was specified. We reintroduce/combine earlier behaviour by checking for the extendsFrom + must be transitive.
Added some test cases to further explain expectations/behaviour.

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

See #4230 for a blacklist approach

Any additional context

Our preference goes towards a whitelist approach as that list is afaik better maintainable for wide usage of plugins, custom configurations...

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

…yVersion created constraints if these are mentioned.
@sambsnyd sambsnyd merged commit da30d7e into openrewrite:main Jun 7, 2024
1 check passed
@sambsnyd
Copy link
Member

sambsnyd commented Jun 7, 2024

Thanks @Jenson3210 I've merged this and closed the alternative blacklist proposal
#4230

@Jenson3210 Jenson3210 deleted the ignore_configurations_for_constraints_whitelist branch June 9, 2024 21:59
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.

2 participants