Skip to content

Rollup of 4 pull requests #104010

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

Closed
wants to merge 15 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jsha and others added 15 commits October 29, 2022 12:47
All static files used by rustdoc are now stored in static.files/ and
include a hash of their contents. They no longer include the contents of
the --resource-suffix flag. This clarifies caching semantics. Anything
in static.files can use Cache-Control: immutable because any updates
will show up as a new URL.

Invocation-specific files like crates-NN.js, search-index-NN.js,
and sidebar-items-NN.js still get the resource suffix.

The --disable-minification flag is removed because it would vary the
output of static files based on invocation flags. Instead, for
rustdoc development purposes it's preferable to symlink static files
to a non-minified copy for quick iteration.
Co-authored-by: Michael Howell <michael@notriddle.com>
This allows open() to be called from other places in bootstrap (I need
this for Ferrocene), and it simplifies the callers by moving the
"was_invoked_explicitly" check into the function.
…illaumeGomez

rustdoc: add hash to filename of toolchain files

All static files used by rustdoc are now stored in static.files/ and their filenames include a hash of their contents. Their filenames no longer include the contents of the --resource-suffix flag. This clarifies caching semantics. Anything in static.files can use Cache-Control: immutable because any updates will show up as a new URL.

Invocation-specific files like crates-NN.js, search-index-NN.js, and sidebar-items-NN.js still get the resource suffix.

This has a useful side effect: once toolchain files aren't affected by resource suffix, it will become possible for docs.rs to include crate version in the resource suffix. That should fix a caching issue with `/latest/` URLs: rust-lang/docs.rs#1593. My goal is that it should be safe to serve all rustdoc JS, CSS, and fonts with infinite caching headers, even when new versions of a crate are uploaded in the same place as old versions.

The --disable-minification flag is removed because it would vary the output of static files based on invocation flags. Instead, for rustdoc development purposes it's preferable to symlink static files to a non-minified copy for quick iteration.

Example listing:

```
$ cd build/x86_64-unknown-linux-gnu/doc/ && find . | egrep 'js$|css$' | egrep -v 'sidebar-items|implementors' | sort
./crates1.65.0.js
./rust.css
./search-index1.65.0.js
./source-files1.65.0.js
./static.files/ayu-2bfd0af01c176fd5.css
./static.files/dark-95d11b5416841799.css
./static.files/light-c83a97e93a11f15a.css
./static.files/main-efc63f77fb116394.js
./static.files/normalize-76eba96aa4d2e634.css
./static.files/noscript-5bf457055038775c.css
./static.files/rustdoc-7a422337900fa894.css
./static.files/scrape-examples-3dd10048bcead3a4.js
./static.files/search-47f3c289722672cf.js
./static.files/settings-17b08337296ac774.js
./static.files/settings-3f95eacb845293c0.css
./static.files/source-script-215e9db86679192e.js
./static.files/storage-26d846fcae82ff09.js
```

Fixes rust-lang#98413
…on_doc, r=jyn514

Fix json flag in bootstrap doc

Fix the `--json` flag not working with x.py (Closes rust-lang#103816)

While this works I'm not sure about the `should_run` of `JsonStd`, had to change it because https://github.com/rust-lang/rust/blob/ab5a2bc7316012ee9b2a4a4f3821673f2677f3d5/src/bootstrap/builder.rs#L334 would match with JsonStd and remove the paths that Std matched. So I did [this](https://github.com/viandoxdev/rust/blob/ffd4078264c4892b5098d6191e0adfe3564d62ca/src/bootstrap/doc.rs#L526-L534) but that looks more like a hack/workaround than anything. I'm guessing there's something to do with the default condition thing but idk how it works
…, r=jyn514

Move browser opening logic in `Builder`

This allows `open()` to be called from other places in bootstrap (I need this for Ferrocene, as we keep our custom steps in `src/bootstrap/ferrocene`), and it simplifies the callers by moving the `was_invoked_explicitly` check into the function.
Remove an option and choose a behaviour-preserving default instead.

r? `@fee1-dead`
@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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 5, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=4

@bors
Copy link
Collaborator

bors commented Nov 5, 2022

📌 Commit ceb24da has been approved by matthiaskrgr

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

bors commented Nov 5, 2022

⌛ Testing commit ceb24da with merge e85aa1a0392b5a4eed613d7aab3f28108f89a3a8...

@rust-log-analyzer
Copy link
Collaborator

The job dist-i686-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] getopts test:false 0.188
[RUSTC-TIMING] proc_macro test:false 0.960
 Documenting test v0.0.0 (/checkout/library/test)
    Finished release [optimized + debuginfo] target(s) in 1.95s
[TIMING] doc::Std { stage: 2, target: i686-unknown-linux-gnu, format: HTML } -- 58.686
Building stage1 tool error_index_generator (i686-unknown-linux-gnu)
[RUSTC-TIMING] build_script_build test:false 0.407
[RUSTC-TIMING] build_script_build test:false 0.435
[RUSTC-TIMING] unicode_ident test:false 0.097
---
[RUSTC-TIMING] unicode_width test:false 0.067
[RUSTC-TIMING] getopts test:false 0.188
 Documenting test v0.0.0 (/checkout/library/test)
    Finished release [optimized + debuginfo] target(s) in 0.94s
[TIMING] doc::Std { stage: 2, target: i686-unknown-linux-gnu, format: JSON } -- 18.130
thread 'main' panicked at 'could not read dir "/checkout/obj/build/i686-unknown-linux-gnu/json-doc": Os { code: 2, kind: NotFound, message: "No such file or directory" }', lib.rs:1578:25
Build completed unsuccessfully in 0:16:25

@matthiaskrgr matthiaskrgr deleted the rollup-xozzaq4 branch December 22, 2022 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

8 participants