-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 feature activation based on profiles does not work for cyclical dependency #9245
Comments
Can you say more about why you are trying to define a cyclical dependency like that? It is highly unusual, and I suspect it may not mean what you intend (this adds a duplicate copy of the package). |
As per #2911, the motivation is to enable crate features while running |
Erm, Cargo doesn't generate an error or warning for this bug. |
Yea. I think |
Agreed, as per #3921, this behavior was discussed and the conclusion was to let it go. As for the use cases, it was to enable specific features of the current package during testing. |
To add to this, the same problem occurs when depending on an external crate - in my case I normally depend on crate |
This may be indicative of a bigger bug than previously thought, since the behaviour @sander2 has brought forward is supposed to be defined, but is not followed. This is worth filing another issue over. |
Seems related to #1796 which describes this exact same behavior..? Supposedly fixed here: #7916 <<< Funnily enough, a permutation of the first issue number! Can you test with nightly feature and confirm it works? hmm, that was merged in januaray. So it looks like this is still an issue for circular dependencies involving the local crate. I guess worst case I can split my integration tests into a seperate package. |
@DanielJoyce #7916 will require you to opt in with I am closing in faver of #9518 |
Problem
Does not behave as expected, as running the binary with
-no-default-features
and--release
still activates the feature. To be fair, as far as I know, there is no expected behavior (See: #3921).Steps
cargo run --no-default-features --release
prints both lines, even though the featuretwo
is not supposed to be active.Possible Solution(s)
Notes
Output of
cargo version
:cargo 1.50.0 (f04e7fab7 2021-02-04)
The text was updated successfully, but these errors were encountered: