EmbarkStudios / cargo-deny

❌ Cargo plugin for linting your dependencies 🦀
http://embark.rs
Apache License 2.0
1.62k stars 80 forks source link

Allow to deny multiple-versions except for a list of crates #660

Closed glandium closed 2 months ago

glandium commented 2 months ago

While

[bans]
multiple-versions = "deny"

is very much desirable, it is hard to fulfill completely. The typical example right now would be syn, where many crates are still using version 1.0.

On the other hand, while there is a documented way to deny multiple-versions of a specific crate, there doesn't seem to be the opposite : denying them all except a given crate.

Jake-Shadle commented 2 months ago

https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html#the-skip-field-optional

glandium commented 2 months ago

May I suggest an adjustment to the doc to use the word "multiple", like everything else related to the feature? (likewise for the skip-tree feature).

glandium commented 2 months ago

Actually the expression "duplicated versions" seems out of place. It should be either "duplicated crates" or "multiple versions".