Skip to content

x check bootstrap doesn't work #143385

Closed
Closed

Description

@Kobzol

x check bootstrap (which essentially does cd src/bootstrap && cargo check --all-targets doesn't compile. Probably there are some issues with test/non-test code when all targets are compiled together.

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 Jul 3, 2025
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 3, 2025
  3. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 3, 2025
  4. Shunpoco commented on Oct 31, 2025

    @Shunpoco
    Contributor

    @Kobzol Does this issue still exist?
    I tried ./x check bootstrap on the current head of master but it succeeded.

    I also tried it on the commit c720f49c46ec3e70bbc2bbb3e0dd1fe7fc0a47f2, the auto merge commit of your PR #143048. I got some errors:

    error[E0433]: failed to resolve: you might be missing crate `core`
     --> src/bootstrap/src/bin/../utils/tests/mod.rs:8:12
      |
    8 | use crate::core::builder::Builder;
      |            ^^^^
      |            |
      |            you might be missing crate `core`
      |            help: try using `std` instead of `core`: `std`
    
    error[E0433]: failed to resolve: you might be missing crate `core`
     --> src/bootstrap/src/bin/../utils/tests/mod.rs:9:12
      |
    9 | use crate::core::config::DryRun;
      |            ^^^^
      |            |
      |            you might be missing crate `core`
      |            help: try using `std` instead of `core`: `std`
    
    error[E0433]: failed to resolve: unresolved import
      --> src/bootstrap/src/bin/../utils/tests/mod.rs:10:12
       |
    10 | use crate::utils::helpers::get_host_target;
       |            ^^^^^
       |            |
       |            unresolved import
       |            help: a similar path exists: `clap_complete::generator::utils`
    
    error[E0432]: unresolved imports `crate::Build`, `crate::Config`, `crate::Flags`, `crate::t`
      --> src/bootstrap/src/bin/../utils/tests/mod.rs:11:13
       |
    11 | use crate::{Build, Config, Flags, t};
       |             ^^^^^  ^^^^^^  ^^^^^  ^ no `t` in the root
       |             |      |       |
       |             |      |       no `Flags` in the root
       |             |      no `Config` in the root
       |             no `Build` in the root
       |
       = help: consider importing one of these items instead:
               bootstrap::Build
               bootstrap::Subcommand::Build
               cc::Build
       = help: consider importing one of these structs instead:
               bootstrap::Config
               cmake::Config
       = help: consider importing this struct instead:
               bootstrap::Flags
    
    error: unused import: `Path`
     --> src/bootstrap/src/bin/../utils/tests/mod.rs:3:17
      |
    3 | use std::path::{Path, PathBuf};
      |                 ^^^^
      |
      = note: `-D unused-imports` implied by `-D warnings`
      = help: to override `-D warnings` add `#[allow(unused_imports)]`
    
    error: unused import: `std::thread`
     --> src/bootstrap/src/bin/../utils/tests/mod.rs:4:5
      |
    4 | use std::thread;
      |     ^^^^^^^^^^^
    
    Some errors have detailed explanations: E0432, E0433.
    For more information about an error, try `rustc --explain E0432`.
    error: could not compile `bootstrap` (bin "rustdoc" test) due to 6 previous errors
    warning: build failed, waiting for other jobs to finish...
    error: could not compile `bootstrap` (bin "rustc" test) due to 6 previous errors
    Build completed unsuccessfully in 0:01:58

    So was the issue somehow solved?

  5. Kobzol commented on Nov 1, 2025

    @Kobzol
    MemberAuthor

    It was indeed, and we now even check it on CI, so it shouldn't regress again. Thanks for noticing!

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

Metadata

Metadata

Assignees

No one assigned

    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