Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way not to enable features in workspace crates #6

Open
jyn514 opened this issue Sep 23, 2022 · 0 comments
Open

Add a way not to enable features in workspace crates #6

jyn514 opened this issue Sep 23, 2022 · 0 comments

Comments

@jyn514
Copy link

jyn514 commented Sep 23, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant