Skip to content
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

Fix panic in cargo doc with -Zfeatures=itarget #8777

Merged
merged 1 commit into from
Oct 14, 2020

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Oct 13, 2020

There are some situations where cargo doc -Zfeatures=itarget can panic where an optional shared dependency is part of an inactive target. The issue is that the filtering logic in compute_deps should have been shared with compute_deps_doc. I moved the common filtering into State to try to share the code.

Fixes #8774

@rust-highfive
Copy link

r? @alexcrichton

(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 Oct 13, 2020
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 14, 2020

📌 Commit 7f02a67 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 Oct 14, 2020
@bors
Copy link
Contributor

bors commented Oct 14, 2020

⌛ Testing commit 7f02a67 with merge 40b7793...

@bors
Copy link
Contributor

bors commented Oct 14, 2020

☀️ Test successful - checks-actions
Approved by: alexcrichton
Pushing 40b7793 to master...

@bors bors merged commit 40b7793 into rust-lang:master Oct 14, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 15, 2020
Update cargo

11 commits in 9d1a4863abd9237dbf9d1b74c78632b6a205f6bb..12db56cdedbc2c26a9aa18f994c0188cdcc67df5
2020-10-05 18:29:52 +0000 to 2020-10-14 23:07:45 +0000
- Reinstate CARGO_PRIMARY_PACKAGE (take 2) (rust-lang/cargo#8758)
- Add actionable help message for --features (rust-lang/cargo#8773)
- Fix panic in `cargo doc` with -Zfeatures=itarget (rust-lang/cargo#8777)
- Update git2. (rust-lang/cargo#8778)
- Document RUSTFMT environment variable (rust-lang/cargo#8767)
- Update crossbeam-utils requirement from 0.7 to 0.8 (rust-lang/cargo#8769)
- Update toml dependency (rust-lang/cargo#8772)
- Mark proc-macro crates (rust-lang/cargo#8765)
- cargo-tree: mention special target `all` in CLI help text (rust-lang/cargo#8766)
- Bump to 0.50.0, update changelog (rust-lang/cargo#8764)
- Update deprecated GitHub add-path in workflows. (rust-lang/cargo#8760)
bors added a commit that referenced this pull request Mar 11, 2021
Fix issue with filtering exclusive target dependencies.

#8777 incorrectly changed the filtering logic for dependencies.  Essentially it split `filter(any(A && B && C && D))` into two parts `filter(any(A && B)).filter(any(C && D))` which doesn't have the same meaning. The solution here is to pass a closure so that the conditions are joined again.

Fixes #9216
ehuss pushed a commit to ehuss/cargo that referenced this pull request Mar 12, 2021
Fix issue with filtering exclusive target dependencies.

rust-lang#8777 incorrectly changed the filtering logic for dependencies.  Essentially it split `filter(any(A && B && C && D))` into two parts `filter(any(A && B)).filter(any(C && D))` which doesn't have the same meaning. The solution here is to pass a closure so that the conditions are joined again.

Fixes rust-lang#9216
@ehuss ehuss added this to the 1.49.0 milestone 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.

Panic in cargo doc with -Zfeatures=itarget
4 participants