-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Allow mutitple SemVer-compatible version with =
exact requirement
#12787
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
Comments
Cargo strictly follows SemVer. I would recommend remove |
I have a use case for doing this, so what I'm currently forced to do is vendor the package code and rename it to something else. That would have the same issue with dependency bloat, right? |
Could you share more details of your use case? That's a better way to move forward. Changing the behavior requires an RFC, as the comment states. Without knowing the details, as I see it. The author of the package may misuse SemVer. You can also consider |
I'm working on a way to detect breaking changes in dependencies. Patch releases can include behavior changes in APIs, but because they're bugfixes they are considered compatible. What's more, semver is just a pinky promise. In order to write tests for migrating from one minor / patch version to another, I need to include both in a binary and compare results. |
=
=
exact requirement
The cargo team talked about this a bit today. Just to clarify, this isn't a bug and how it is intended to behave. We recognized that there seemed to be some use cases that could benefit from something like this, but we had various concerns, such as:
We didn't have any conclusions at this time. Someone could check my understanding, but this looks like it could be a duplicate of #13594. |
To clarify, this issue is specifically allowing it for direct dependencies, not arbitrary transitive ones. |
Problem
Adding multiple exact (
=
) versions of the same crate which Cargo considers semver compatible will produce a dependency conflict.Is this a technical problem, or is it Cargo thinking it knows better than me because those two versions should be semver compatible?
If it's the latter, I would consider this a bug.
Steps
See above
Possible Solution(s)
No response
Notes
No response
Version
No response
The text was updated successfully, but these errors were encountered: