You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use this crate to filter out sources that do not need full software clearing,
so are not interested in the dev or build dependencies.
It is possible to identify these clearly with cargo tree by specifying --edges normal flag (other potentially interesting options: no-build, no-dev, no-proc-macro).
Unfortunately, the flag is not available with cargo metadata as discussed in rust-lang/cargo#10718.
Proposition: add an optional boolean flag --exclude-dev-and-build-deps to cargo vendor filterer (alternative: mimic cargo tree edges options).
If the flag is set, after removing the unwanted platforms and tiers, call cargo tree to get a list of packages required for the application with all features.
Iterate over the packages HashMap and remove all entries not present in the list received from cargo tree.
Expected behavior when running on the crate itself: when the flag is set the once_cell dev package shall be removed -> add a unit test.
By default the flag is not active for backwards compatibility.
Current workaround: manually remove development crates (it is annoying)
Let me know what you think and if you agree that this is a good extension for the current crate, I can send a PR implementing this feature.
The text was updated successfully, but these errors were encountered:
We use this crate to filter out sources that do not need full software clearing,
so are not interested in the dev or build dependencies.
It is possible to identify these clearly with
cargo tree
by specifying--edges normal
flag (other potentially interesting options: no-build, no-dev, no-proc-macro).Unfortunately, the flag is not available with
cargo metadata
as discussed in rust-lang/cargo#10718.Proposition: add an optional boolean flag
--exclude-dev-and-build-deps
to cargo vendor filterer (alternative: mimic cargo tree edges options).If the flag is set, after removing the unwanted platforms and tiers, call
cargo tree
to get a list of packages required for the application with all features.Iterate over the packages HashMap and remove all entries not present in the list received from
cargo tree
.Expected behavior when running on the crate itself: when the flag is set the
once_cell
dev package shall be removed -> add a unit test.By default the flag is not active for backwards compatibility.
Current workaround: manually remove development crates (it is annoying)
Let me know what you think and if you agree that this is a good extension for the current crate, I can send a PR implementing this feature.
The text was updated successfully, but these errors were encountered: