-
Notifications
You must be signed in to change notification settings - Fork 320
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
feat: added check for duplicated dependency #4515
base: main
Are you sure you want to change the base?
feat: added check for duplicated dependency #4515
Conversation
ashakirin
commented
Sep 23, 2024
•
edited by timtebeek
Loading
edited by timtebeek
- Refs: ChangeDependencyGroupIdAndArtifactId can duplicate new dependency #4514
<dependency> | ||
<groupId>jakarta.activation</groupId> | ||
<artifactId>jakarta.activation-api</artifactId> | ||
<version>1.2.1</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if in this case we should remove the old one instead. What are your thoughts on that?
<dependency> | |
<groupId>jakarta.activation</groupId> | |
<artifactId>jakarta.activation-api</artifactId> | |
<version>1.2.1</version> | |
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timtebeek: in theory - yes, on practice: perhaps user has a good reason to keep old dependency in pom, we do not know that. I do not think that it is responsibility of the CahngeDependencyGroupIdAndArtifact to cleanup old unused dependencies. Perhaps separate recipe would be more clean solution for this case.
<dependency> | ||
<groupId>javax.activation</groupId> | ||
<artifactId>javax.activation-api</artifactId> | ||
<version>1.2.0</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here; I think ideally we remove the duplicate, since two managed versions of the same dependency don't make much sense (to me).
<dependency> | |
<groupId>javax.activation</groupId> | |
<artifactId>javax.activation-api</artifactId> | |
<version>1.2.0</version> | |
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it should be responsibility of ChangeDependency recipe? I think it can be a bit confusing for user, if existing dependencies disappearing