Skip to content

bootstrap: doc: document std crates one by one#157143

Open
Fabian-Gruenbichler wants to merge 1 commit into
rust-lang:mainfrom
Fabian-Gruenbichler:mr/std-doc-reproducibility
Open

bootstrap: doc: document std crates one by one#157143
Fabian-Gruenbichler wants to merge 1 commit into
rust-lang:mainfrom
Fabian-Gruenbichler:mr/std-doc-reproducibility

Conversation

@Fabian-Gruenbichler
Copy link
Copy Markdown
Contributor

@Fabian-Gruenbichler Fabian-Gruenbichler commented May 30, 2026

Since switching over from individual, per crate cargo rustdoc invocations to a single cargo doc invocation for all crates, the doc output for Std became racy. Dependencies between library/ workspace crates were handled in a flaky fashion, sometimes being emitted as relative references, sometimes as references to the html root.

This is probably only a workaround, and it should actually be fixed in cargo or rustdoc, but I haven't managed to reproduce this issue outside of the Std doc build via bootstrap.

Closes: #156567

Fixes: 58e18dd

Since switching over from individual, per crate `cargo rustdoc` invocations to
a single `cargo doc` invocation for all crates, the doc output for `Std` became
racy. Dependencies between `library/` workspace crates were handled in a flaky
fashion, sometimes being emitted as relative references, sometimes as
references to the html root.

This is probably only a workaround, and it should actually be fixed in cargo or
rustdoc, but I haven't managed to reproduce this issue outside of the Std doc
build via bootstrap.

Fixes: 58e18dd

Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email>
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels May 30, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 30, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789

@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] serde_derive test:false 3.829
error: unnecessary use of `clone` to create a slice from a reference
   --> src/bootstrap/src/core/build_steps/doc.rs:814:57
    |
814 |         compile::std_cargo(builder, target, &mut cargo, &[krate.clone()]);
    |                                                         ^^^^^^^^^^^^^^^^ help: try: `std::slice::from_ref(&krate)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_ref_to_slice_refs
    = note: `-D clippy::cloned-ref-to-slice-refs` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::cloned_ref_to_slice_refs)]`

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

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doc reproducibility

4 participants