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

Don't emit shared files when scraping examples from dependencies in Rustdoc #92146

Merged
merged 1 commit into from
Dec 23, 2021

Conversation

willcrichton
Copy link
Contributor

This PR fixes #91605. The issue is that Context::init gets called when scraping dependencies. By default, just calling init calls into write_shared and build_index which register the scraped crate into a list that later gets used for the Rustdoc sidebar. The fix is to ensure that write_shared is not called when scraping.

r? @jyn514

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 21, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 21, 2021
@jyn514
Copy link
Member

jyn514 commented Dec 21, 2021

This seems kind of hacky ... eventually I'd like to separate actually generating the HTML from creating the Context. But this is reasonable as a short term fix.

r=me if you don't feel like refactoring half of rustdoc 😁

@bors delegate=willcrichton

@bors
Copy link
Contributor

bors commented Dec 21, 2021

✌️ @willcrichton can now approve this pull request

@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 21, 2021
@willcrichton
Copy link
Contributor Author

@bors r=jyn514

@bors
Copy link
Contributor

bors commented Dec 21, 2021

📌 Commit b7de797 has been approved by jyn514

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 21, 2021
@bors
Copy link
Contributor

bors commented Dec 21, 2021

⌛ Testing commit b7de797 with merge 695c53cca37057a9e61db16840932e68adf7acf6...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-mingw-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

failures:

---- process::tests::test_interior_nul_in_arg_is_error stdout ----
thread 'process::tests::test_interior_nul_in_arg_is_error' panicked at 'assertion failed: `(left == right)`
  left: `NotFound`,
 right: `InvalidInput`', library\std\src\process\tests.rs:309:19
---- process::tests::test_interior_nul_in_args_is_error stdout ----
thread 'process::tests::test_interior_nul_in_args_is_error' panicked at 'assertion failed: `(left == right)`
  left: `NotFound`,
  left: `NotFound`,
 right: `InvalidInput`', library\std\src\process\tests.rs:317:19
---- process::tests::test_interior_nul_in_current_dir_is_error stdout ----
thread 'process::tests::test_interior_nul_in_current_dir_is_error' panicked at 'assertion failed: `(left == right)`
  left: `NotFound`,
  left: `NotFound`,
 right: `InvalidInput`', library\std\src\process\tests.rs:325:19
---- sys::windows::process::tests::windows_exe_resolver stdout ----
---- sys::windows::process::tests::windows_exe_resolver stdout ----
thread 'sys::windows::process::tests::windows_exe_resolver' panicked at 'assertion failed: resolve_exe(OsStr::new(\"rustc\"), child_paths).is_ok()', library\std\src\sys\windows\process\tests.rs:174:5

failures:
    process::tests::test_interior_nul_in_arg_is_error
    process::tests::test_interior_nul_in_args_is_error
    process::tests::test_interior_nul_in_args_is_error
    process::tests::test_interior_nul_in_current_dir_is_error
    sys::windows::process::tests::windows_exe_resolver

test result: FAILED. 879 passed; 4 failed; 3 ignored; 0 measured; 0 filtered out; finished in 13.90s

error: test failed, to rerun pass '-p std --lib'


command did not execute successfully: "\\\\?\\D:\\a\\rust\\rust\\build\\x86_64-pc-windows-gnu\\stage0\\bin\\cargo.exe" "test" "--target" "x86_64-pc-windows-gnu" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace profiler compiler-builtins-c" "--manifest-path" "D:\\a\\rust\\rust\\library/test/Cargo.toml" "-p" "std" "--"


Build completed unsuccessfully in 0:52:02
Build completed unsuccessfully in 0:52:02
make: *** [Makefile:80: ci-mingw-subset-1] Error 1

@bors
Copy link
Contributor

bors commented Dec 22, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 22, 2021
@ehuss
Copy link
Contributor

ehuss commented Dec 22, 2021

@bors retry

Windows test_interior_nul issue

@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 Dec 22, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 23, 2021
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#88858 (Allow reverse iteration of lowercase'd/uppercase'd chars)
 - rust-lang#91544 (Fix duplicate derive clone suggestion)
 - rust-lang#92026 (Add some JSDoc comments to rustdoc JS)
 - rust-lang#92117 (kmc-solid: Add `std::sys::solid::fs::File::read_buf`)
 - rust-lang#92139 (Change Backtrace::enabled atomic from SeqCst to Relaxed)
 - rust-lang#92146 (Don't emit shared files when scraping examples from dependencies in Rustdoc)
 - rust-lang#92208 (Quote bat script command line)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 051d91a into rust-lang:master Dec 23, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 23, 2021
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc-scrape-examples creates dead links and suppresses --no-deps
7 participants