-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Enable new behavior of --feature
#5390
Conversation
@bors: r+ |
📌 Commit 038eec5 has been approved by |
Enable new behavior of `--feature` So far, the feedback on https://internals.rust-lang.org/t/help-us-test-the-breaking-bug-fix-to-cargo-features/7317 has been positive, so here's a PR to try this in nightly. Note that the logic is slightly tweak for the case `cargo build -p not-a-workspace-member`: we want not only to resolve all ws members in this case, but to enable all of their features as well! As a sanity check, this seems to be forward compatible with further improvements to features: 1) when we solve the grand bug of features being unified across the whole workspace, `cargo build -p not-a-member` would hopefully just work without additional contortions. 2) we might add a way to specify features per package, like `cargo build -p foo -p bar --features "foo/serde bar/serde"`
☀️ Test successful - status-appveyor, status-travis |
Some noteble changes: * regression fix: rust-lang/cargo#5390 * potentially breaking bug-fix: rust-lang/cargo#5389 * Cargo now caches the result of `rustc -vV`. It checks `rustc` binary mtime and rustup toolchain settings, so it should probably "just work" with rustbuild.
Update Cargo Some noteble changes: * ~~regression fix: rust-lang/cargo#5390 * ~~potentially breaking bug-fix: rust-lang/cargo#5389 * ~~Cargo now caches the result of `rustc -vV`. It checks `rustc` binary mtime and rustup toolchain settings, so it should probably "just work" with rustbuild.~~ potentially breaking bug-fix: rust-lang/cargo#5390
Servo’s build broke, I think because of this, without a prior warning. It’s not clear what the compatibility story is here. |
(PR for that Servo build: servo/servo#20703, already including a build system change.) |
Let's continue discussion at the tracking issue: #5364 (comment) |
So far, the feedback on https://internals.rust-lang.org/t/help-us-test-the-breaking-bug-fix-to-cargo-features/7317 has been positive, so here's a PR to try this in nightly.
Note that the logic is slightly tweak for the case
cargo build -p not-a-workspace-member
: we want not only to resolve all ws members in this case, but to enable all of their features as well!As a sanity check, this seems to be forward compatible with further improvements to features:
cargo build -p not-a-member
would hopefully just work without additional contortions.cargo build -p foo -p bar --features "foo/serde bar/serde"