rust/src/tools
Matthias Krüger 3eac639e1e
Rollup merge of #101702 - jsha:static-files2, r=notriddle,GuillaumeGomez
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: https://github.com/rust-lang/docs.rs/issues/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 #98413
2022-11-05 18:06:05 +01:00
..
build-manifest Give better errors when build-manifest fails 2022-10-01 15:38:27 -05:00
bump-stage0 Upgrade indexmap and thorin-dwp to use hashbrown 0.12 2022-07-17 07:05:58 -07:00
cargo@9286a1beba Update cargo 2022-11-04 23:51:04 +00:00
cargotest Override linker in cargotest on windows 2022-10-23 19:33:03 -05:00
clippy Rollup merge of #103660 - ozkanonur:master, r=jyn514 2022-11-05 11:31:28 +05:30
compiletest Auto merge of #103298 - ferrocene:pa-compile-flags-last, r=jyn514 2022-11-04 22:24:46 +00:00
error_index_generator Fix tooltip display for error codes 2022-09-18 00:32:28 +02:00
expand-yaml-anchors Migrate to 2021 2021-09-20 22:21:42 -04:00
html-checker parallelize HTML checking tool 2022-07-29 23:26:38 -04:00
jsondocck Remove need to give JSON file path 2022-08-18 10:48:06 +02:00
jsondoclint Rustdoc-Json: List impls for primitives 2022-09-26 18:06:48 +01:00
linkchecker Ignore mailto links in linkchecker 2022-08-29 14:42:06 +02:00
lint-docs Add let_underscore lint group to GROUP_DESCRIPTIONS. 2022-06-04 20:12:26 -04:00
lld-wrapper fix lld-wrapper lld flavor detection 2022-09-07 14:51:54 +02:00
miri Rollup merge of #103660 - ozkanonur:master, r=jyn514 2022-11-05 11:31:28 +05:30
miropt-test-tools Detect unused files in src/test/mir-opt and error on them in tidy. 2022-10-31 21:45:41 -07:00
remote-test-client tools/remote-test-{server,client}: Use /data/local/tmp on Android 2022-10-06 13:42:32 -07:00
remote-test-server Show command line arguments 2022-10-12 14:30:06 +02:00
replace-version-placeholder Also replace the version placeholder in rustc_attr 2022-09-02 01:47:01 +02:00
rls Sunset RLS 2022-08-27 21:36:08 -07:00
rust-analyzer ⬆️ rust-analyzer 2022-11-01 11:31:31 +02:00
rust-demangler mangling_v0: Update tests for the rust-demangler tool 2022-01-08 11:39:34 +08:00
rust-installer@300b5ec61e Update submodule rust-installer 2022-07-09 09:49:05 -07:00
rustbook Update mdbook 2022-07-22 11:59:20 -07:00
rustc-workspace-hack update few crates to drop old deps 2022-08-31 23:35:57 +03:00
rustdoc rustdoc: Use unix_sigpipe instead of rustc_driver::set_sigpipe_handler 2022-10-24 20:40:46 +02:00
rustdoc-gui Improve error message when browser-ui-test crashes 2022-08-11 13:20:18 +02:00
rustdoc-js rustdoc: add hash to filename of toolchain files 2022-10-29 12:47:48 -07:00
rustdoc-themes Migrate to 2021 2021-09-20 22:21:42 -04:00
rustfmt Implement -Ztrack-diagnostics 2022-10-19 00:08:20 +02:00
tidy Rollup merge of #103956 - JakobDegen:tidy-bless, r=jyn514 2022-11-05 00:02:05 +01:00
tier-check Migrate to 2021 2021-09-20 22:21:42 -04:00
unicode-table-generator Address feedback from PR #101401 2022-09-04 08:07:53 -07:00
unstable-book-gen unstable-book-gen: use std::fs::write 2022-08-28 00:40:58 +02:00
x fix: better error when python not found in x 2022-08-01 13:33:59 +01:00
cherry-pick.sh Add cherry-pick.sh convenience script. 2021-08-20 11:58:18 +01:00
publish_toolstate.py Remove miri from the submodule list and require it for CI to pass 2022-09-21 15:35:53 +00:00