rewrite icon indicating copy to clipboard operation
rewrite copied to clipboard

[4837] PoC of options when removing 'redundant' managed dependencies

Open crankydillo opened this issue 11 months ago • 3 comments

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

crankydillo avatar Feb 11 '25 14:02 crankydillo

@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.

crankydillo avatar Feb 13 '25 13:02 crankydillo

We saw a related bug that might have affected this issue as well; should be fixed in

  • https://github.com/openrewrite/rewrite/pull/5375

timtebeek avatar May 04 '25 12:05 timtebeek

And another potentially related change in

  • https://github.com/openrewrite/rewrite/pull/5529

timtebeek avatar Jun 02 '25 09:06 timtebeek

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.

github-actions[bot] avatar Sep 01 '25 04:09 github-actions[bot]