You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leverage rustdoc's mergeable crate info, so that cargo doc can merge cross-crate information (like the search index, source files index) from separate output directories, run rustdoc in parallel, and avoid (sometimes) unexpected documentation merge.
Unresolved Issues
cargo clean support
It would be a breaking change, as cargo doc already exposes the legacy rustdoc --merge=shared behavior (rustdoc artifacts are additive) it is now additive
Should rustdoc --merge=finalize be modeled in Cargo's "unit of execution" model (a.k.a. build graph)
Currently in Cargo, a unit in the unit graph is tied to a Command execution, for example rustc or rustdoc. rustdoc --merge=finialize is apparently a "unit of execution". However, the current Unit struct is designed for compiler invocation, which have features, rustflags and Cargo target information. If we don't model this invocation in unit of work model, a special rebuild detection mechanism may need to be implemented. It might be worth a refactor if we want to support both this and Support -Zno-link #9019, and perhaps doctest execution in the future.
Ability to turn off cargo doc invocations from being additive
If Cargo provides a flag, say --config doc.merge=on|off, how to deal with that user switching between doc.merge=off and doc.merge=on? Should the pre-existing HTML file be kept or removed?
crate-info JSON file name collision. Same as below
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Summary
RFC: rust-lang/rfcs#3662 (rustdoc focused)
rust-lang/rust issue: rust-lang/rust#130676
Implementation: #16167, #16309
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#rustdoc-mergeable-info
Leverage rustdoc's mergeable crate info, so that
cargo doccan merge cross-crate information (like the search index, source files index) from separate output directories, run rustdoc in parallel, and avoid (sometimes) unexpected documentation merge.Unresolved Issues
cargo cleansupportIt would be a breaking change, asit is now additivecargo docalready exposes the legacyrustdoc --merge=sharedbehavior (rustdoc artifacts are additive)rustdoc --merge=finalizebe modeled in Cargo's "unit of execution" model (a.k.a. build graph)rustdoc --merge=finializeis apparently a "unit of execution". However, the currentUnitstruct is designed for compiler invocation, which havefeatures,rustflagsand Cargo target information. If we don't model this invocation in unit of work model, a special rebuild detection mechanism may need to be implemented. It might be worth a refactor if we want to support both this and Support -Zno-link #9019, and perhaps doctest execution in the future.RUSTDOCFLAGSapply torustdoc --merge=finalizecall?--merge=finalizeinvocation, like--extend-css?Future Extensions
cargo docinvocations from being additive--config doc.merge=on|off, how to deal with that user switching betweendoc.merge=offanddoc.merge=on? Should the pre-existing HTML file be kept or removed?cargo rustdoc --output-format=jsonsometimes doesn't rebuild for different versions of same crate name. #16291About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.