Skip to content

rust: ship rustdoc again (list it in bootstrap.toml tools) - #887

Closed
bryan-minimal wants to merge 1 commit into
mainfrom
fix/rust-ship-rustdoc
Closed

bryan-minimal wants to merge 1 commit into
mainfrom
fix/rust-ship-rustdoc

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Since #667 (d0b0026, 2026-09-24) the rust package ships no rustdoc. The current world's rust artifact (1b13bbd7…, spec 8cefa3f0…) has cargo cargo-clippy cargo-fmt clippy-driver rust-analyzer rust-gdb rust-lldb rustc rustfmt in usr/bin, and nothing else.

Why: #667 set tools = ["cargo", "clippy", "rustfmt", "rust-analyzer"] in bootstrap.toml (to keep the offline-hostile src step out). In Rust 1.98.1's bootstrap, dist::Rustc::prepare_image copies rustdoc only when build.tools is unset or lists "rustdoc":

// If enabled, copy rustdoc binary
if builder.config.tools.as_ref()
    .is_none_or(|tools| tools.iter().any(|tool| tool == "rustdoc"))

and x.py install compiler/rustc installs exactly that dist image. Before #667 tools was unset, so rustdoc shipped.

Effect: any cargo test that reaches doctests fails with could not execute process `rustdoc` … No such file or directory. Found moving build-servers to minimal main (gominimal/build-servers#373, which holds its pkgs pin at d5e98b3, #667's parent, until this lands).

Fix: add "rustdoc" to the list. Nothing else changes.

Cost: this changes rust's spec hash, so rust and everything built with it rebuild. Worth timing deliberately.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated Rust build tooling configuration to include the documentation tool required for documentation tests. This allows those tests to run as part of the configured build and verification workflows.

#667 set build.tools to drop the offline-hostile `src` step, and the list
left rustdoc out. With `tools` set, dist::Rustc copies the rustdoc binary
only when the list names it, so every rust since d0b0026 ships without
rustdoc and `cargo test` fails on doctests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 15, 2026 20:42
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: gominimal/pkgs/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: be8610a1-9a82-4df3-8b4e-132b298b8ace
📥 Commits

Reviewing files that changed from the base of the PR and between b3016f1 and 72b917f.

📒 Files selected for processing: 1
  • packages/rust/bootstrap.toml

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

📝 Walkthrough

The Rust bootstrap configuration adds rustdoc to the configured tools list. Comments explain why src is omitted and why rustdoc is listed for doctests.

Changes: Rust bootstrap tools

Layer / File(s) Summary
Configured Rust tools
packages/rust/bootstrap.toml
The tools list adds rustdoc. Adjacent comments explain the omission of src and the need for rustdoc to run doctests.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: twitchyliquid64

Merge Risk: ⚪ Minimal · up to 72b91

This change restores rustdoc to the packaged toolset, allowing doctest workflows to find the executable. No remaining merge-blocking risk is established.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: adding rustdoc to bootstrap.toml so Rust ships the rustdoc binary again.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant