Skip to content

Don't pass --features from target.'cfg(...)'.dependencies to dependencies #9199

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

Closed
JAicewizard opened this issue Feb 23, 2021 · 2 comments
Closed
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@JAicewizard
Copy link

Exactly like #4664, but for different target.'cfg(...)'.dependencies dependencies.
This came up when looking at build times in the druid crate after enabling tracing. Almost all of the increase was a wasm-only dependency which enabled all features for tracing-subscribercausing 24 extra crates to get build.

I hope this isnt a lot of work since its already been implemented once, but I never know.
I also think this should be enough information since its the same issue as an already fixed issue, but if you need more details feel free to ask.

@JAicewizard JAicewizard added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Feb 23, 2021
@ehuss
Copy link
Contributor

ehuss commented Feb 23, 2021

@JAicewizard Have you tried the new feature resolver? It should hit stable in the next release, and there is documentation about how to use it here. It should avoid enabling features for any target dependency that is not being used.

@JAicewizard
Copy link
Author

Ah yes, I read it was stabilized so I assumed it would also be enabled by default.
Using that does indeed fix the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants