Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upNew semantics for `--features` flag #5353
Conversation
rust-highfive
assigned
alexcrichton
Apr 13, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ Nice! |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Apr 13, 2018
This comment has been minimized.
This comment has been minimized.
|
|
bors
merged commit 8d0b31b
into
rust-lang:master
Apr 13, 2018
matklad
deleted the
matklad:features
branch
Apr 13, 2018
matklad
added a commit
to matklad/rust
that referenced
this pull request
Apr 13, 2018
bors
added a commit
to rust-lang/rust
that referenced
this pull request
Apr 14, 2018
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Apr 14, 2018
This was referenced Apr 16, 2018
alexcrichton
added a commit
to alexcrichton/cargo
that referenced
this pull request
May 21, 2018
alexcrichton
referenced this pull request
May 21, 2018
Merged
Copy `--all-features` request to all workspace members #5556
bors
added a commit
that referenced
this pull request
May 24, 2018
bors
added a commit
that referenced
this pull request
May 24, 2018
alexcrichton
added a commit
to alexcrichton/cargo
that referenced
this pull request
May 24, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
matklad commentedApr 13, 2018
Historically, feature-related flags like
--all-features,--no-default-featuresand--featuresoperated on the currentpackage. That is,
cargo --package foo --feature featwould activatefeatfor the package at the current working directory, and not for thefoopackage.-Z package-featuresflag implements the more obvioussemantics for this combination of flags. This changes behavior, and that
is why we want to start with an unstable opt-in. The changes are:
--featureflag affects the selected package. It is an error tospecify
--featurewith more than a single-p, or with-poutsideworkspace (the latter could work in theory, but would be hard to
implement).
--all-featuresand--no-default-featuresaffect all selectedpackages, and not the one at cwd.
The package in
cwdis not implicitly enabled when doing featureselection. That is,
cargo build -Z package-features -p foocouldselect less features for various packages than
cargo build -p foo.r? @alexcrichton