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

Conditional features for conditional dependencies #6658

Closed
elinorbgr opened this issue Feb 13, 2019 · 2 comments
Closed

Conditional features for conditional dependencies #6658

elinorbgr opened this issue Feb 13, 2019 · 2 comments
Labels
A-features Area: features — conditional compilation C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@elinorbgr
Copy link

In short, being able to reflect this kind of dependencies of features:

  • if feature foo is enabled, depend on crate krate
    • if additionally feature bar is enabled, depend on krate/bar
  • if feature foo is not enabled, don't depend on krate, even if bar is enabled

I don't see any way to reflect this currently:

  • if bar depends on krate/bar, enabling it will always pull krate, even if foo is not enabled
  • if it doesn't, enabling foo and bar does not pull krate/bar, which in my case would cause a compilation error
@elinorbgr elinorbgr added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Feb 13, 2019
@dwijnand dwijnand changed the title Conditionnal features for conditionnal dependencies Conditional features for conditional dependencies Feb 13, 2019
@ehuss ehuss added the A-features Area: features — conditional compilation label Feb 13, 2019
@Nemo157
Copy link
Member

Nemo157 commented Aug 12, 2019

Duplicate of #3494

@ehuss
Copy link
Contributor

ehuss commented Aug 12, 2019

Yea, looks the same, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-features Area: features — conditional compilation 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

3 participants