-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add support for rustdoc mergeable cross-crate info parts #16167
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder how this CCI affects scrape-examples workflow on rustdoc side, or it doesn't? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -831,8 +831,13 @@ fn prepare_rustdoc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResu | |
| if build_runner.bcx.gctx.cli_unstable().rustdoc_depinfo { | ||
| // toolchain-shared-resources is required for keeping the shared styling resources | ||
| // invocation-specific is required for keeping the original rustdoc emission | ||
| let mut arg = | ||
| OsString::from("--emit=toolchain-shared-resources,invocation-specific,dep-info="); | ||
| let mut arg = if build_runner.bcx.gctx.cli_unstable().rustdoc_mergeable_info { | ||
| // toolchain resources are written at the end, at the same time as merging | ||
| OsString::from("--emit=invocation-specific,dep-info=") | ||
| } else { | ||
| // if not using mergeable CCI, everything is written every time | ||
| OsString::from("--emit=toolchain-shared-resources,invocation-specific,dep-info=") | ||
|
Comment on lines
+834
to
+839
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another reason we need to stabilize rustdoc's There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I know. I've been working on that, and will try to get it stabilized before trying to get this stabilized. |
||
| }; | ||
| arg.push(rustdoc_dep_info_loc(build_runner, unit)); | ||
| rustdoc.arg(arg); | ||
|
|
||
|
|
@@ -841,6 +846,18 @@ fn prepare_rustdoc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResu | |
| } | ||
|
|
||
| rustdoc.arg("-Zunstable-options"); | ||
| } else if build_runner.bcx.gctx.cli_unstable().rustdoc_mergeable_info { | ||
| // toolchain resources are written at the end, at the same time as merging | ||
| rustdoc.arg("--emit=invocation-specific"); | ||
| rustdoc.arg("-Zunstable-options"); | ||
| } | ||
|
|
||
| if build_runner.bcx.gctx.cli_unstable().rustdoc_mergeable_info { | ||
| // write out mergeable data to be imported | ||
| rustdoc.arg("--merge=none"); | ||
| let mut arg = OsString::from("--parts-out-dir="); | ||
| arg.push(build_runner.files().doc_parts_dir(&unit)); | ||
| rustdoc.arg(arg); | ||
| } | ||
|
|
||
| if let Some(trim_paths) = unit.profile.trim_paths.as_ref() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for creating this draft PR! I didn't know about RFC 3662 until now, so may need more time to catch up.
From my quick skimming through that, it seem prettty aligned with the WIP new build-dir layout in #15010 (one unit per independent directory), as well as the fine-grained locking in #4282.
Not sure if we want to pair them together. It may depend on the timeline of the stabilization of each unstable feature.