Skip to content

Conversation

@ehuss
Copy link
Contributor

@ehuss ehuss commented Mar 16, 2021

#8997 had an unintended regression where -p foo --feature foo/feat syntax where foo is an optional non-member fails with an error that foo did not match any packages. The issue is that the member/feature selection routine needed to slot this into the features for the package in the current working directory (it was incorrectly treating foo as a workspace member).

V2 outright does not allow specifying features for non-workspace members.

Fixes #9265

@rust-highfive
Copy link

r? @Eh2406

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 16, 2021
@ehuss
Copy link
Contributor Author

ehuss commented Mar 16, 2021

I wanted to spend some time to more properly fix #3629 with some warnings, but it will take me a little longer to do that, and I wanted to post this to address the regression. Should we try to get this into beta?

@alexcrichton
Copy link
Member

@bors: r+

Yeah agreed this should be safe to backport, thanks for this!

@bors
Copy link
Contributor

bors commented Mar 16, 2021

📌 Commit 6b320cb has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 16, 2021
@bors
Copy link
Contributor

bors commented Mar 16, 2021

⌛ Testing commit 6b320cb with merge 841179e...

@bors
Copy link
Contributor

bors commented Mar 16, 2021

☀️ Test successful - checks-actions
Approved by: alexcrichton
Pushing 841179e to master...

@bors bors merged commit 841179e into rust-lang:master Mar 16, 2021
ehuss pushed a commit to ehuss/cargo that referenced this pull request Mar 16, 2021
Fix --feature pkg/feat for V1 resolver for non-member.

rust-lang#8997 had an unintended regression where `-p foo --feature foo/feat` syntax where `foo` is an **optional non-member** fails with an error that `foo` did not match any packages.  The issue is that the member/feature selection routine needed to slot this into the features for the package in the current working directory (it was incorrectly treating `foo` as a workspace member).

V2 outright does not allow specifying features for non-workspace members.

Fixes rust-lang#9265
@ehuss ehuss mentioned this pull request Mar 16, 2021
bors added a commit that referenced this pull request Mar 16, 2021
[beta] 1.51 backports

Backports of:

* #9275: Fix --feature pkg/feat for V1 resolver for non-member
* #9276: Fix doc duplicate removal of root units.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Mar 17, 2021
Update cargo

8 commits in 32da9eaa5de5be241cf8096ca6b749a157194f77..90691f2bfe9a50291a98983b1ed2feab51d5ca55
2021-03-13 01:18:40 +0000 to 2021-03-16 21:36:55 +0000
- Add report if `cargo fix --edition` changes features. (rust-lang/cargo#9268)
- Fix --feature pkg/feat for V1 resolver for non-member. (rust-lang/cargo#9275)
- Fix doc duplicate removal of root units. (rust-lang/cargo#9276)
- Add CLI help text for patch-in-config (rust-lang/cargo#9271)
- Document `-Zpatch-in-config` (rust-lang/cargo#9270)
- Support [patch] in .cargo/config files (rust-lang/cargo#9204)
- Add `--future-incompat-report` support to `cargo test` (rust-lang/cargo#9264)
- 🍱 Crop favicon (rust-lang/cargo#9262)
@ehuss ehuss modified the milestones: 1.52.0, 1.51.0 Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo test --features dep/feat does not imply --features dep in beta

5 participants