cargo add
should check public transitive dependencies when auto-picking a version
#13038
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-add
S-accepted
Status: Issue or feature is accepted, and has a team member available to help mentor or review
Z-public-dependency
Nightly: public-dependency
Problem
When adding a new dependency that is meant to interact with another one (ie its a public transitive dependency), you need the versions aligned.
Proposed Solution
When
cargo add foo
auto-selects the version requirement, we shouldn't just check other dependency tables to see if the dependency is present but we should first check public transitive dependencies of the table we are editing.We also should check the public dependencies of the package being added to see if there is a better match
ie in the ideal case we would allow either of the following
How well it works in practice, it will be seen.
Notes
No response
The text was updated successfully, but these errors were encountered: