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

rustbuild: Copy crate doc files fewer times #64613

Merged
merged 1 commit into from Sep 20, 2019

Conversation

@alexcrichton
Copy link
Member

commented Sep 19, 2019

Previously when building documentation for the standard library we'd
copy all the files 5 times, and these files include libcore/libstd docs
which are huge! This commit instead only copies the files after rustdoc
has been run for each crate, reducing the number of redundant copies
we're making.

Previously when building documentation for the standard library we'd
copy all the files 5 times, and these files include libcore/libstd docs
which are huge! This commit instead only copies the files after rustdoc
has been run for each crate, reducing the number of redundant copies
we're making.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Sep 19, 2019

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2019

Copy link
Member

left a comment

r=me presuming this has been tested; it seems fine but rustdoc can be picky about ordering and such

};
for krate in &["alloc", "core", "std", "proc_macro", "test"] {
run_cargo_rustdoc_for(krate);
}
builder.cp_r(&my_out, &out);

This comment has been minimized.

Copy link
@Mark-Simulacrum

Mark-Simulacrum Sep 19, 2019

Member

Can we avoid this copy entirely by instead symlinking rustdoc's outdir to out (the final location)?

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Sep 19, 2019

Author Member

I haven't strictly tested the symlink, but I wanted to land some easy wins first and start investigating deeper wins later. I believe symlinks won't work because everything attempts to preserve symlinks, and rust-installer wants to actually archive the symlink, which would cause invalid tarballs since we wouldn't actually distribute docs.

I'm working on rust-installer now though so I'll try to plumb this through eventually, ideally I don't want to have to copy documentation anywhere.

@alexcrichton

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2019

@bors: r=Mark-Simulacrum

@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 19, 2019

📌 Commit d7f6474 has been approved by Mark-Simulacrum

Centril added a commit to Centril/rust that referenced this pull request Sep 19, 2019
…k-Simulacrum

rustbuild: Copy crate doc files fewer times

Previously when building documentation for the standard library we'd
copy all the files 5 times, and these files include libcore/libstd docs
which are huge! This commit instead only copies the files after rustdoc
has been run for each crate, reducing the number of redundant copies
we're making.
bors added a commit that referenced this pull request Sep 19, 2019
Rollup of 6 pull requests

Successful merges:

 - #63448 (fix Miri discriminant handling)
 - #64592 (Point at original span when emitting unreachable lint)
 - #64601 (Fix backticks in documentation)
 - #64606 (Remove unnecessary `mut` in doc example)
 - #64611 (rustbuild: Don't package libstd twice)
 - #64613 (rustbuild: Copy crate doc files fewer times)

Failed merges:

r? @ghost
bors added a commit that referenced this pull request Sep 19, 2019
Rollup of 6 pull requests

Successful merges:

 - #63448 (fix Miri discriminant handling)
 - #64592 (Point at original span when emitting unreachable lint)
 - #64601 (Fix backticks in documentation)
 - #64606 (Remove unnecessary `mut` in doc example)
 - #64611 (rustbuild: Don't package libstd twice)
 - #64613 (rustbuild: Copy crate doc files fewer times)

Failed merges:

r? @ghost
@bors bors merged commit d7f6474 into rust-lang:master Sep 20, 2019
4 checks passed
4 checks passed
pr Build #20190919.36 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
@alexcrichton alexcrichton deleted the alexcrichton:less-doc-copies branch Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.