-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Conversation
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. |
r? @weihanglo |
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 |
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. |
@bors try |
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.
💥 Test timed out |
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. |
@weihanglo looks like all the tests are happy now, so the change in #11387 definitely did fix this issue as well |
There was a problem hiding this 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. |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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:
cargo/tests/testsuite/rustdoc_extern_html.rs
Line 262 in f54cd33
// name (baz) for re-exports. There are many issues in the issue tracker |
@bors r+ |
☀️ Test successful - checks-actions |
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)
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)
Fixes #11402.
Adds an explicit check for sparse registries when generating the mappings for
-Zrustdoc-map
, so that thesparse+
qualifier is removed before the comparison.