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

rustbuild: Don't build doc::SharedAssets when building JSON docs. #104887

Merged

Conversation

aDotInTheVoid
Copy link
Member

Previously, running ./x doc library/core/ --json on a plain build would panic bootstrap.

$ ./x doc library/core/ --json
Building rustbuild
    Blocking waiting for file lock on package cache
   Compiling bootstrap v0.0.0 (/home/nixon/dev/rust/rust/src/bootstrap)
    Finished dev [unoptimized] target(s) in 4.47s
thread 'main' panicked at 'fs::write(&version_info, &info) failed with No such file or directory (os error 2) ("/home/nixon/dev/rust/rust/build/x86_64-unknown-linux-gnu/doc/version_info.html")', doc.rs:410:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:04

Becuase the SharedAssets step assumes that the HTML out dir has been created. This isn't true for JSON.

The fix is to not build shared assets when doing a JSON doc build, as it doesn't need them.

r? @jyn514

@rustbot modify labels: +A-rustdoc-json

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. A-rustdoc-json Area: Rustdoc JSON backend labels Nov 25, 2022
@jyn514
Copy link
Member

jyn514 commented Nov 25, 2022

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 25, 2022

📌 Commit 37b0a10 has been approved by jyn514

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 25, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 25, 2022
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#104716 (move 2 candidates into builtin candidate)
 - rust-lang#104760 (Clarify `SyntaxExtensionKind::LegacyDerive`.)
 - rust-lang#104797 (rustc_codegen_ssa: write `.dwp` in a streaming fashion)
 - rust-lang#104835 (Use infcx.partially_normalize_associated_types_in)
 - rust-lang#104853 (Fix typo in miri sysroot)
 - rust-lang#104879 (jsondoclint: Recognise Typedef as valid kind for Type::ResolvedPath)
 - rust-lang#104887 (rustbuild: Don't build doc::SharedAssets when building JSON docs.)
 - rust-lang#104896 (rustdoc: fix broken tooltip CSS)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c72db77 into rust-lang:master Nov 25, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants