I thought Cargo did a simple SemVer check and then imported both if there was a conflict
My understanding was NP is when you test and rebuild the graph over and over which doesn't need to happen if you isolate or fail
I thought Cargo did a simple SemVer check and then imported both if there was a conflict
My understanding was NP is when you test and rebuild the graph over and over which doesn't need to happen if you isolate or fail
> I thought Cargo did a simple SemVer check and then imported both if there was a conflict
Not quite, Cargo only allows multiple versions of a package when they are semver incompatible (i.e. have different major versions).
If you allow multiple versions of a package you get some quite gnarly errors if you try to share values between them. The rationale of allowing semver incompatible versions is that they should be incompatible anyway.
Cargo has an interesting proposal on private and public dependencies that allows you to say multiple versions are only allowed when they aren't visible from the same part of the dependency graph https://rust-lang.github.io/rfcs/3516-public-private-depende...