cargo-deny icon indicating copy to clipboard operation
cargo-deny copied to clipboard

New ban: force using workspace dependencies when more than one crate depends on them

Open jaskij opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. In workspace projects, it's easy for crate dependencies to go out of sync.

Describe the solution you'd like Add a new check which would trigger whenever crates in the workspace depend on the same crate, without using workspace dependencies. Perhaps also disallowing version-related fields (version and rev) in crate level Cargo.toml files.

Describe alternatives you've considered

Currently, I'm using the multiple-versions ban to ensure dependencies don't go out of sync, but it has a much larger reach than required, requiring extra maintenance. To that end, a new configuration for multiple-versions, which only checks direct dependencies of project crates would work well enough.

Additional context nothing to add

jaskij avatar Jul 03 '23 19:07 jaskij