]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #5430 - matklad:bring-old-features-back, r=alexcrichton
authorbors <bors@rust-lang.org>
Sat, 28 Apr 2018 18:02:36 +0000 (18:02 +0000)
committerbors <bors@rust-lang.org>
Sat, 28 Apr 2018 18:02:36 +0000 (18:02 +0000)
Revert "Enable new behavior of `--feature`"

This reverts commit 038eec5cb3bd25a0855b0be6ad2aeba5391c6c6e.

As discussed at https://github.com/rust-lang/cargo/issues/5364, the new behavior unfortunately causes real-life breakage, so we have to revert it.

This is kinda sad, this is a part of the larger issue with feature selection, which, at the moment, has a behavior which I would classify (loosely speaking) as unsound:

* `cargo build -p foo` and `cargo build -p foo -p bar` might produce different artifacts for `foo` ([repro](https://github.com/matklad/workspace-vs-feaures))
* `cargo build -p foo` might produce different artifacts, depending on cwd ([repro](https://github.com/matklad/features-cwd))

The new feature behavior specifically addressed the second point.

It is unclear what we could do with this... One option, instead of flatly erroring out, as the revreted commit does, is to print a warning, but change the set of activated features. It will still be a breaking change, but it at least has  a chance of working by accident.

r? @alexcrichton


Trivial merge