[4837] PoC of options when removing 'redundant' managed dependencies
2 biggest needs. Don't remove if has config other than GAV+exclusion option and synchronize the version as opposed to remove.
Everything is still govered by Comparator.
This does not have impl for synchronize case (which is the big one we need:) But wanted to get something out there. Impl is real procedural, but biggest problem I see is the name. Are we still going to use 'Remove..' if an option is to 'synchronize'. I lean towards just leave it, but I'm a fan of good names.
Checklist
- [in progress:) ] 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
@timtebeek WDYT on this? Is this a good route? I think you could make a case the class name isn't a perfect match with this change. I'm typically pretty picky about having good names, but I'd be willing to run with this.
If you think this is a good option, I'll tidy it up and move it out of draft. If not, let me know. We'll have to do an internal recipe to achieve something similar.
We saw a related bug that might have affected this issue as well; should be fixed in
- https://github.com/openrewrite/rewrite/pull/5375
And another potentially related change in
- https://github.com/openrewrite/rewrite/pull/5529
This PR is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in two weeks. PRs may be reopened when there is renewed interest.