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

Removing a managed dependency that has configuration beyond just GAV #4984

Open
crankydillo opened this issue Feb 4, 2025 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@crankydillo
Copy link
Contributor

crankydillo commented Feb 4, 2025

I can understand there could be some nuance to this. I'd be cautious on removing a dependency if it had any configuration, not just exclusions.

An easy option is to just make the recipe configurable: e.g.:

  1. always remove (behavior before Retain dependencyManagement entries with exclusions #4387)
  2. remove only the version Replace the 'local' managed dependency's version with the new version from the parent.
  3. don't remove (current behavior)
@crankydillo crankydillo added the enhancement New feature or request label Feb 4, 2025
@timtebeek timtebeek moved this to Backlog in OpenRewrite Feb 4, 2025
@crankydillo
Copy link
Contributor Author

I think I suggested 'just remove version' last time, but I don't think that works with dependency management (should test, but that's what I recall:)

@crankydillo
Copy link
Contributor Author

crankydillo commented Feb 5, 2025

@timtebeek I'm really thinking that what we want is 'sync local managed version with parent'. I understand there are trade-offs. No recipe like that already exists, does it?

@timtebeek
Copy link
Contributor

hi @crankydillo ; thanks for having another look at this one! I think indeed option 2 might be best; I'm not aware of any such recipe or visitor right now, but haven't extensively looked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants