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

Add test for rustdoc-map generation when using sparse registries #11403

Merged
merged 1 commit into from
Nov 29, 2022
Merged

Add test for rustdoc-map generation when using sparse registries #11403

merged 1 commit into from
Nov 29, 2022

Conversation

calebfletcher
Copy link
Contributor

Fixes #11402.

Adds an explicit check for sparse registries when generating the mappings for -Zrustdoc-map, so that the sparse+ qualifier is removed before the comparison.

@rustbot
Copy link
Collaborator

rustbot commented Nov 22, 2022

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @epage (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 22, 2022
@epage
Copy link
Contributor

epage commented Nov 22, 2022

r? @weihanglo

@rustbot rustbot assigned weihanglo and unassigned epage Nov 22, 2022
@calebfletcher
Copy link
Contributor Author

Looks like #11387 could be related, and may fix the underlying issue with the SourceId

@weihanglo
Copy link
Member

Looks like #11387 could be related, and may fix the underlying issue with the SourceId

I am just about to say that 😆. It is still worth adding a test to verify the interaction between -Zrustdoc-map and `-Zsparse-registry, though.

@calebfletcher calebfletcher reopened this Nov 26, 2022
@calebfletcher calebfletcher changed the title Fix rustdoc-map generation when using sparse registries Add test for rustdoc-map generation when using sparse registries Nov 26, 2022
@calebfletcher calebfletcher marked this pull request as draft November 26, 2022 05:59
@calebfletcher
Copy link
Contributor Author

I've changed this pull request to add the requested test, note that the test currently fails but from my testing #11387 does correctly resolve the issue and the test passes with those changes applied. As such, I have marked this PR as a draft and once #11387 lands I will mark it as ready for review again.

@weihanglo
Copy link
Member

@bors try

@bors
Copy link
Collaborator

bors commented Nov 27, 2022

⌛ Trying commit fe479b0 with merge e1648ab...

bors added a commit that referenced this pull request Nov 27, 2022
Add test for rustdoc-map generation when using sparse registries

Fixes #11402.

Adds an explicit check for sparse registries when generating the mappings for `-Zrustdoc-map`, so that the `sparse+` qualifier is removed before the comparison.
@bors
Copy link
Collaborator

bors commented Nov 27, 2022

💥 Test timed out

@calebfletcher
Copy link
Contributor Author

Running the test locally on master after that PR got merged seems to work, so not sure why the CI failed. Have rebased to see if that clears it.

@calebfletcher calebfletcher marked this pull request as ready for review November 29, 2022 09:54
@calebfletcher
Copy link
Contributor Author

@weihanglo looks like all the tests are happy now, so the change in #11387 definitely did fix this issue as well

Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding such a test!

// name (baz) for re-exports. There are many issues in the issue tracker
// for rustdoc re-exports, so I'm not sure, but I think this is maybe a
// rustdoc issue. Alternatively, Cargo could provide mappings for all
// transitive dependencies to fix this.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be, but let's move on first :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah my bad, that was a comment that is in the test that I adapted this from (you can see it in the original test here:

// name (baz) for re-exports. There are many issues in the issue tracker
)

@weihanglo
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 29, 2022

📌 Commit f54cd33 has been approved by weihanglo

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 29, 2022
@bors
Copy link
Collaborator

bors commented Nov 29, 2022

⌛ Testing commit f54cd33 with merge 861110c...

@bors
Copy link
Collaborator

bors commented Nov 29, 2022

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 861110c to master...

@bors bors merged commit 861110c into rust-lang:master Nov 29, 2022
weihanglo added a commit to weihanglo/rust that referenced this pull request Dec 3, 2022
9 commits in e027c4b5d25af2119b1956fac42863b9b3242744..f6e737b1e3386adb89333bf06a01f68a91ac5306
2022-11-25 19:44:46 +0000 to 2022-12-02 20:21:24 +0000
- Refactor generate_targets into separate module (rust-lang/cargo#11445)
- Improve file found in multiple build targets warning (rust-lang/cargo#11299)
- Error when precise without -p flag (rust-lang/cargo#11349)
- Improve strategy for selecting targets to be scraped for examples (rust-lang/cargo#11430)
- Aware of compression ratio for unpack size limit (rust-lang/cargo#11337)
- Add test for rustdoc-map generation when using sparse registries (rust-lang/cargo#11403)
- Add error message when `cargo fix` on an empty repo (rust-lang/cargo#11400)
- Store the sparse+ prefix in the SourceId for sparse registries (rust-lang/cargo#11387)
- Update documentation for -Zrustdoc-scrape-examples in the Cargo Book (rust-lang/cargo#11425)
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 3, 2022
Update cargo

9 commits in e027c4b5d25af2119b1956fac42863b9b3242744..f6e737b1e3386adb89333bf06a01f68a91ac5306
2022-11-25 19:44:46 +0000 to 2022-12-02 20:21:24 +0000
- Refactor generate_targets into separate module (rust-lang/cargo#11445)
- Improve file found in multiple build targets warning (rust-lang/cargo#11299)
- Error when precise without -p flag (rust-lang/cargo#11349)
- Improve strategy for selecting targets to be scraped for examples (rust-lang/cargo#11430)
- Aware of compression ratio for unpack size limit (rust-lang/cargo#11337)
- Add test for rustdoc-map generation when using sparse registries (rust-lang/cargo#11403)
- Add error message when `cargo fix` on an empty repo (rust-lang/cargo#11400)
- Store the sparse+ prefix in the SourceId for sparse registries (rust-lang/cargo#11387)
- Update documentation for -Zrustdoc-scrape-examples in the Cargo Book (rust-lang/cargo#11425)
@ehuss ehuss added this to the 1.67.0 milestone Dec 14, 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.

Rustdoc-map generation fails when using sparse registries
6 participants