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

test(features2): test to prevent regressing of optional host deps of dep #11342

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

weihanglo
Copy link
Member

What does this PR try to resolve?

A test to prevent regressing on feature resolve v2 for a project having activated optional host dependencies of a direct dependency, such as

foo v0.1.0
└── serde v0.1.0
    └── serde_derive v0.1.0 (proc-macro) 
           ↑↑↑
           (an activated optional dep)
    [build-dependencies]
    └── serde_build v0.1.0
           ↑↑↑
           (an activated optional dep)

How should we test and review this PR?

  1. Checkout to 810cbad (one commit before the revert PR)
  2. Run the test features2::dep_with_optional_host_deps_activated.
  3. You'll see it fail with a smiliar diff below. It means that it previously failed to include host deps to compile.
    -   Compiling serde_build v0.1.0 (/projects/cargo/target/tmp/cit/t0/foo/serde_build)
    -   Compiling serde_derive v0.1.0 (/projects/cargo/target/tmp/cit/t0/foo/serde_derive)
        Compiling serde v0.1.0 (/projects/cargo/target/tmp/cit/t0/foo/serde)
        Compiling foo v0.1.0 (/projects/cargo/target/tmp/cit/t0/foo)
         Finished dev [..]

@rustbot
Copy link
Collaborator

rustbot commented Nov 6, 2022

r? @ehuss

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 6, 2022
tests/testsuite/features2.rs Outdated Show resolved Hide resolved
tests/testsuite/features2.rs Outdated Show resolved Hide resolved
@weihanglo
Copy link
Member Author

All review comments are addressed. Thanks for the review!

@ehuss
Copy link
Contributor

ehuss commented Nov 7, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Nov 7, 2022

📌 Commit e295a10 has been approved by ehuss

It is now in the queue for this repository.

@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 Nov 7, 2022
@bors
Copy link
Contributor

bors commented Nov 7, 2022

⌛ Testing commit e295a10 with merge 0a979d3...

@bors
Copy link
Contributor

bors commented Nov 7, 2022

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 0a979d3 to master...

@bors bors merged commit 0a979d3 into rust-lang:master Nov 7, 2022
@weihanglo weihanglo deleted the issue/11330-new-test branch November 10, 2022 16:14
Manishearth pushed a commit to Manishearth/rust that referenced this pull request Nov 11, 2022
9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497
2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)
Manishearth added a commit to Manishearth/rust that referenced this pull request Nov 11, 2022
Update cargo

9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497 2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)

r? `@ghost`
Manishearth added a commit to Manishearth/rust that referenced this pull request Nov 11, 2022
Update cargo

9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497 2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)

r? ``@ghost``
Manishearth added a commit to Manishearth/rust that referenced this pull request Nov 11, 2022
Update cargo

9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497 2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)

r? ```@ghost```
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Nov 12, 2022
Update cargo

9 commits in 9286a1beba5b28b115bad67de2ae91fb1c61eb0b..a3dfea71ca0c888a88111086898aa833c291d497 2022-11-04 06:41:49 +0000 to 2022-11-11 03:50:47 +0000
- fix: return non UTF-8 error message (rust-lang/cargo#11321)
- Extract `two_kinds_of_msg_format_err` message to de-duplicate it (rust-lang/cargo#11358)
- Propagate change of artifact bin dep to its parent fingerprint (rust-lang/cargo#11353)
- Fix not a hyperlink warnings (rust-lang/cargo#11357)
- Fix wait-for-publish with sparse registry (rust-lang/cargo#11356)
- Add `rm` alias to configuration docs (rust-lang/cargo#11351)
- Add `registries.crates-io.protocol` docs (rust-lang/cargo#11350)
- test(features2): test to prevent regressing of optional host deps of dep (rust-lang/cargo#11342)
- Bump to 0.68.0, update changelog (rust-lang/cargo#11340)

r? ````@ghost````
@ehuss
Copy link
Contributor

ehuss commented Dec 13, 2022

Linking to issue #11330 where the regression was discovered.

@ehuss ehuss added this to the 1.67.0 milestone Nov 6, 2023
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.

4 participants