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

using symlinks in rustdoc-js tests static.files to bypass minification causes writes through symlinks, minifying orignal files #135345

Open
lolbinarycat opened this issue Jan 10, 2025 · 0 comments · May be fixed by #135353
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Comments

@lolbinarycat
Copy link
Contributor

with the removal of --disable-minification, i was under the impression that the reccommended workflow is to symlink files in the static.files directory to their origin locations.

this workaround works completly fine when used on regular docs, however, it causes serious problems when trying to use it for the static.files in the rustdoc-js dirs.

reproduction steps:

  1. rm -r build/host/test/rustdoc-js
  2. ./x test --stage 1 tests/rustdoc-js/type-parameters.rs (any unit test should work)
  3. ln -f src/librustdoc/html/static/js/search.js build/host/test/rustdoc-js/type-parameters/static.files/search-*.js
  4. ./x test --stage 1 tests/rustdoc-js/type-parameters.rs (again)

this will result in src/librustdoc/html/static/js/search.js becoming minified.

personally i think we should just bring back the --disable-minification option as perma-unstable. that or we should have a canonical implementation of this symlink hack integrated into bootstrap.

@lolbinarycat lolbinarycat added C-bug Category: This is a bug. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jan 10, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 10, 2025
lolbinarycat added a commit to lolbinarycat/rust that referenced this issue Jan 10, 2025
this also makes the rust.docs-minification option work
as advertised in config.toml

nothing fancy this time, this is intended to be perma-unstable.
it's only really here for the benefit of rustdoc devs.

mitegates rust-lang#135345
lolbinarycat added a commit to lolbinarycat/rust that referenced this issue Jan 11, 2025
this also makes the rust.docs-minification option work
as advertised in config.toml

nothing fancy this time, this is intended to be perma-unstable.
it's only really here for the benefit of rustdoc devs.

mitegates rust-lang#135345
lolbinarycat added a commit to lolbinarycat/rust that referenced this issue Jan 11, 2025
this also makes the rust.docs-minification option work
as advertised in config.toml

nothing fancy this time, this is intended to be perma-unstable.
it's only really here for the benefit of rustdoc devs.

mitegates rust-lang#135345
@jieyouxu jieyouxu added A-testsuite Area: The testsuite used to check the correctness of rustc and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 11, 2025
lolbinarycat added a commit to lolbinarycat/rust that referenced this issue Jan 11, 2025
this also makes the rust.docs-minification option work
as advertised in config.toml

nothing fancy this time, this is intended to be perma-unstable.
it's only really here for the benefit of rustdoc devs.

mitegates rust-lang#135345
@fmease fmease linked a pull request Jan 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants