rust-lang / rust-lang/docs.rs

rustdoc referenced `search.js` and `settings.js` not via `static-root-path`

Open
#1,979 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-builds C-bug
Dominant language
Rust
Stars
1.2k
Forks
232
Avg merge
11h 35m
Merged PRs (30d)
60

Description

  • there was a bug in rustdoc where a toolchain specific static asset (search.js) wasn't referenced via static-root-path, but via the path for release (invocation) specific assets. ( introduced in https://github.com/rust-lang/rust/issues/91062 ).
  • this was fixed with https://github.com/rust-lang/rust/pull/101702, so all docs built after that are correct.
  • our LegacySharedResourcesHandler which was a hack for #1181 also worked for this bug, so this was never visible to users.
  • after the rebuild for #1181 was finished we dropped the LegacySharedResourcesHandler with the last piece of the axum migration (#1963).
  • we added a new workaround in #1980 which only handles search.js, and only at the specific location it might be requested.
  • we added another workaround in #1993 to also handle settings.js, same as to #1980
  • to remove the workaround, we need to rebuild the affected releases.
initial issue
  • This was initially reported as "broken search" after #1963 was merged.
  • broken settings were reported in #1992
reported broken releases:
reported via:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the LegacySharedResourcesHandler history and the workarounds in issues #1980 and #1993, then identify the affected releases listed here. Rebuild those releases and verify that rustdoc requests search.js and settings.js through static-root-path without the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, documentation, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.