mainmatter / cargo-autoinherit

(Auto)DRY for your Rust dependencies
Apache License 2.0
124 stars 8 forks source link

Feature Idea: Declaration count threshold #16

Open torokati44 opened 5 months ago

torokati44 commented 5 months ago

First of all, thanks for this tool, it's really promising!

I recently ran it on Ruffle, and found that it moved dozens of dependency entries to the workspace Cargo.toml. Which is fine, it's what it says on the tin, after all...

But I don't want to do that - instead, I'd like to make only those dependencies workspace-level ones that are declared in at least 2 or 3 different crates.

Do you think this is something you'd be willing to add as a feature? :blush:

LukeMathWalker commented 5 months ago

Yes, the current philosophy is "move everything to [workspace.dependencies]. We could consider a threshold, but I'd like to have #2 before adding it. That'd allow you to enforce that the threshold is consistently met in CI.