TimonPost / cargo-dependency-inheritor

Utility to inherit dependencies from workspace file if it occurs 'n' or more times throughout the project.
Apache License 2.0
30 stars 1 forks source link

Apply workspace dep replacement to *all* crates when reaching `number` #22

Closed MarijnS95 closed 1 year ago

MarijnS95 commented 1 year ago

Depends on #21

Currently workspace members only get added to workspace_packages once there have been number of members before it with the same dependency, meaning that all those before it have NOT been added to the list (give or take reaching number on another dependency), leading to some Cargo.toml files being skipped even though one or more of their dependencies were added to [workspace.dependencies].

For example, running on our codebase with --number 20 leads to about 17 crates not having glam = "someversion" replaced with glam = { workspace = true }!

TimonPost commented 1 year ago

O wow, nice catch!