Open lolbinarycat opened 1 week ago
apparently this existed before in the form of --disable-minification
, but was removed without discussion in https://github.com/rust-lang/rust/pull/101702, however, the corrosponding config.toml option build.docs-minification
was not removed, instead being silently ignored.
silently ignoring removed options is not a good solution, especially when not all of the documentation has been updated to reflect the removal.
the rationale for removal is that is that it would allow the contents of the file to change without the filename hash changing, but this is easily addressed by just adding nominify
after the hash if minification is disabled.
I don't mind putting back the option but you'll need to have a good use-case for it (implementing the option so it doesn't go against why it was removed originally shouldn't be too complicated).
usecase is i don't want to do hacky and fallible symlink stuff just to get accurate line number reporting.
alternative is making a robust symlink override as part of bootstrap, but that seem like a lot more work than just reinstituting the option
the line to change would be in
write_shared.rs:154
:cx.shared.fs.write(filename, f.minified())
this should use
f.bytes
instead off.minified()
if the--no-minify
flag is specified.this flag would mostly be useful for debugging rustdoc itself, allowing js and css errors to accurately report line numbers.