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

Stabilise disable minification #56359

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@GuillaumeGomez
Member

GuillaumeGomez commented Nov 29, 2018

Fixes #54819.
Reopening of #54827.

r? @QuietMisdreavus

@ollie27

This comment has been minimized.

Contributor

ollie27 commented Dec 2, 2018

What is the use case for this option? Surely if people want to see the none minified versions they can just look at rustdoc's source code.

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Dec 2, 2018

Well, rustdoc messes with JS content by adding stuff in it. So it's not that simple to get a view of what's really generated unless you disable the minification.

@QuietMisdreavus

This comment has been minimized.

Member

QuietMisdreavus commented Dec 3, 2018

Rustdoc also minifies any user-supplied themes as well as the search index. It also adds an extra line to storage.js with the resource suffix, before minifying that.

This is a debugging flag that @GuillaumeGomez uses personally, and the original PR for this was among a handful of no-comment stabilization PRs that he started at the same time, alongside threads for --themes and --resource-suffix.

It looks like you've added docs since the original PR, but i'm not aware of any tests in this repo for the minifier functionality. (How much is the minifier crate itself tested? That could offer a stand-in for testing the functionality of this feature, though not the flag.) I still think it would be good to have a run-make-fulldeps test that passes this flag to generate docs for a demo crate (probably an empty crate, but it could have anything), then makes sure that rustdoc.css and main.js have the same file contents as their original files in the repo.

Regardless, we should hold an FCP before merging this, since it's a feature stabilization.

@GuillaumeGomez

This comment has been minimized.

Member

GuillaumeGomez commented Dec 4, 2018

Testing is complicated directly on rustdoc since everytime there is an update, we'll have to update the minification tests as well. I added tests (maybe not enough?) in the minifier crate directly. I'll let you judge if there are enough, and if not, I'll add even more! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment