-
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
Regression from 1.39.0 to 1.40.0: --no-default-features is not allowed in the root of a virtual workspace #7727
Comments
I'm not sure I understand, this seems to be a duplicate of #5364. Is there something else here? |
#5364 is about changed behavior behind a feature flag AFAICT. This is about a change of behavior from 1.39.0 stable to 1.40.0 stable without any feature flags. Things worked on 1.39.0 (albeit with unexpected semantics, as I figured out when I found and read through #5364) and don't work anymore on 1.40.0. |
The change was intentional. |
Alright. It wasn't clear to me from reading the comments on #5364 that this change was intended. I still think the error message should include something like
Should I open a new issue for the error message? |
You can leave this open. If you'd like to add the note, it sounds good to me. Should be a one-line fix here and update the |
I'd like to raise that I think this should still count as a regression. Cargo in a workspace root did accept the flag In contrast to other random flags which were just rejected. A warning when cargo is running in an interactive shell seems more appropriate. |
Problem
In virtual workspaces,
cargo check -p subproject --no-default-features
used to work up until 1.39.0 (although AFAICT now it didn't at all do what I intended) and since 1.40.0 results in:Probably related to #5364.
Notes
On nightly, this can be worked around by adding
-Z package-features
. However, I'm testing on stable and if I understand #5364 correctly, 1.39.0 didn't do the right thing anyway*. So I'll update my CI script tocd
into the subproject directory and run without-p
from there from now on.* AFAICT it probably enabled the default feature since another workspace package required it even though I passed
--no-default-features
. This should really have resulted in a warning...The text was updated successfully, but these errors were encountered: