Add a way not to enable features in workspace crates
jyn514 opened this issue · 0 comments
jyn514 commented
This is a direct copy of facebookarchive/cargo-guppy#655; let me know if I should add more details from the discussion there.
I have a workspace that looks like this, where my-crate: feature1 => x/feature2
means "my-crate has a feature named feature1
which enables feature2
in the dependency x
":
bin/my-app: fips => transitive-dep/fips: => boring-sys/fips
When I run cargo hakari generate
, it adds a line to workspace-hack/Cargo.toml
that looks like
transitive-dep = { git = "...", branch = "...", default-features = false, features = ["fips"] }
I think haraki is running cargo tree --all-features
or something like that. I want it not to enable that feature; it only builds on linux machines and some of the people on my team use Mac. I don't see an existing way to do this:
$ cargo hakari generate -h
Generate or update the contents of the workspace-hack crate
USAGE:
cargo-hakari generate [OPTIONS]
OPTIONS:
--color <COLOR> Produce color output [default: auto] [possible values: auto, always,
never]
--diff Print a diff of contents instead of writing them out. Can be combined
with `--quiet`
-h, --help Print help information
-q, --quiet Suppress output
-v, --verbose Produce extra output
Would it be possible to add one?