Skip to content

x test --tests library/core does more work than it needs to #158299

Closed

Description

@jyn514

Summary

Bootstrap builds rustdoc to run unit tests for core, even though it doesn't need to.

I suspect this is a regression from #153143 (or I guess not really a regression since --tests didn't exist before ...).

Command used

x test --tests library/core

Expected behaviour

Bootstrap builds stage 1 rustc/libtest, then runs unit tests for core.

Actual behaviour

Building bootstrap
Building stage1 compiler artifacts (stage0 -> stage1, aarch64-apple-darwin)
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage1 library artifacts (stage1 -> stage1, aarch64-apple-darwin)
Building stage1 rustdoc_tool_binary (stage0 -> stage1, aarch64-apple-darwin)
Testing stage1 {core} (aarch64-apple-darwin)
     Running tests/lib.rs (build/aarch64-apple-darwin/stage1-std/aarch64-apple-darwin/dist/build/coretests/a88ee02e242ca77e/out/coretests-a88ee02e242ca77e)

Bootstrap configuration (bootstrap.toml)

profile = "compiler"
change-id = 154587

[rust]
deny-warnings = false

Operating system

macOS Tahoe 26.4.1 (25E253)

HEAD

Forked from 4429659

Additional context

Build Log

<log>

Activity

  1. added
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    C-bugCategory: This is a bug.
    on Jun 23, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jun 23, 2026
  3. self-assigned this
    on Jun 27, 2026
  4. Kobzol commented on Jun 29, 2026

    @Kobzol
    Member

    From bootstrap's code it looks like we always build stage 1 rustdoc when we run stage 1 tests, so I don't think that it's a recent regression (though it is something that would regress after the stage0 redesign). This happens here, which is on a different level of granularity than where we select which kinds of tests will run.

  5. added 2 commits that reference this issue on Jun 29, 2026
    5e4eaaa
    1e18b73
  6. added 8 commits that reference this issue on Jun 29, 2026
    ea7ee56
    ccabf4f
    efb1224
    412e6fb
    679e35f
    b1afa86
    912d8f2
    cd1d41e
  7. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jun 30, 2026
  8. added 2 commits that reference this issue on Jun 30, 2026
    2a7da65
    44763f5
  9. added 2 commits that reference this issue on Jul 1, 2026
    d0421a3
    5d42ccb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions