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

features: allow activated_features_unverified to communicate not-present #8194

Merged
merged 1 commit into from
May 5, 2020

Conversation

sunshowers
Copy link
Contributor

Hi there! :)

I'm currently writing cargo-guppy, a toolkit for analyzing Rust dependency graphs. As part of that I'm writing some tests to compare guppy to cargo (see facebookarchive/cargo-guppy#126), to ensure that it produces the same results for the subset of analyses cargo can do.

While writing tests I found it useful to distinguish between packages that weren't present at all and packages that were activated but with no features. This commit adds that functionality to the _unverified method.

(BTW, of possible interest to @ehuss, I've also found some interesting behavior differences between the v1 and v2 resolvers. Will file issues for them soon!)

I'm currently writing [`cargo-guppy`](https://github.com/facebookincubator/cargo-guppy), a toolkit for analyzing Rust dependency graphs. As part of that I'm writing some tests to compare guppy to `cargo`, to ensure that it produces the same results for the subset of analyses `cargo` can do.

While writing tests I found it useful to distinguish between packages that weren't present at all and packages that were activated but with no features. This commit adds that functionality to the `_unverified` method.
@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 May 2, 2020
@alexcrichton
Copy link
Member

To make sure I understand, is this intended for use when using cargo-as-a-library?

This looks pretty reasonable otherwise to me, but given this was all written recently by @ehuss I'm gonna...

r? @ehuss

@rust-highfive rust-highfive assigned ehuss and unassigned alexcrichton May 4, 2020
@sunshowers
Copy link
Contributor Author

To make sure I understand, is this intended for use when using cargo-as-a-library?

Yeah, I'm using it as a library in tests.

@ehuss
Copy link
Contributor

ehuss commented May 5, 2020

Seems reasonable.
@bors r+

@bors
Copy link
Collaborator

bors commented May 5, 2020

📌 Commit e94face has been approved by ehuss

@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 May 5, 2020
@bors
Copy link
Collaborator

bors commented May 5, 2020

⌛ Testing commit e94face with merge d7966eb...

@bors
Copy link
Collaborator

bors commented May 5, 2020

☀️ Test successful - checks-azure
Approved by: ehuss
Pushing d7966eb to master...

@bors bors merged commit d7966eb into rust-lang:master May 5, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 7, 2020
Update cargo

7 commits in 258c89644c4587273a3ed3ee9522d2640facba43..f534844c25cacc5e004404cea835ac85e35ca3fd
2020-04-30 21:48:21 +0000 to 2020-05-06 14:39:10 +0000
- Avoid testing git-specific error messages (rust-lang/cargo#8212)
- features: allow activated_features_unverified to communicate not-present (rust-lang/cargo#8194)
- Don't force rustc to do codegen for LTO builds (rust-lang/cargo#8192)
- Hint git-fetch-with-cli on git errors (rust-lang/cargo#8166)
- ¬∃x. ¬y => ∀x. y (rust-lang/cargo#8205)
- clippy fixes (rust-lang/cargo#8189)
- Rename bitcode-in-rlib flag to embed-bitcode (rust-lang/cargo#8204)
@ehuss ehuss added this to the 1.45.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.

5 participants