-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Allow configuring rustdoc --disable-minification
in config.toml
#83059
Allow configuring rustdoc --disable-minification
in config.toml
#83059
Conversation
This way, you can debug rustdoc's JavaScript and CSS file with normal F12 Dev Tools and you'll have useful line numbers to work with.
(rust-highfive has picked a reviewer for you, use r? to override) |
Would it maybe be more useful to include a source map instead? Then it would always work, and we wouldn't have to keep adding more options to rustdoc. |
Oh wait, this is changing bootstrap, not rustdoc. Why does rustdoc even have a |
It looks like it's still unstable - what do you think about removing it in favor of unconditionally minifying and generating a source map? |
I use |
I don't understand - if you use disable-minification often, why wouldn't you find source maps useful? They do the same thing, but source maps can be included unconditionally instead of having to change the build process. |
Hum, that's actually a good point. Let's go for source maps then! |
The big downside is that source map generation is something you need to implement, and the Adding an option to turn off minification took a few minutes, and can be merged right now, and if it has a bug, it'll fail by minifying or not minifying the code when you expect, which will be obvious. |
Given that this already exists, I'm ok with adding an option for this to bootstrap (although @Mark-Simulacrum may want you to just use |
disable-minification
option for rustdocrustdoc --disable-minification
in config.toml
I think adding an option like this PR does is fine. I think it's reasonable to expose developer-only options via config.toml. @bors r+ rollup |
📌 Commit fdb3e82 has been approved by |
@bors r- |
@bors r+ rollup |
📌 Commit 095b6d2 has been approved by |
Rollup of 6 pull requests Successful merges: - rust-lang#82984 (Simplify ast block lowering) - rust-lang#83012 (Update Clippy) - rust-lang#83020 (Emit the enum range assumption if the range only contains one element) - rust-lang#83037 (Support merge_functions option in NewPM since LLVM >= 12) - rust-lang#83052 (updated vulnerable deps) - rust-lang#83059 (Allow configuring `rustdoc --disable-minification` in config.toml) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This way, you can debug rustdoc's JavaScript and CSS file with normal F12 Dev Tools and you'll have useful line numbers to work with.