Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./x build compiler --stage 0 reports success, but it shouldn't: deleting method used in another crate does not cause compilation to fail #134970

Closed
safinaskar opened this issue Dec 31, 2024 · 1 comment · Fixed by #135023
Assignees
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@safinaskar
Copy link
Contributor

safinaskar commented Dec 31, 2024

./x build compiler --stage 0 reports success, but it shouldn't: deleting method used in another crate does not cause compilation to fail.

Okay, I found bug in ./x. If I delete a method in compiler source code, then ./x build compiler --stage 0 executes successfully. But it shouldn't, because this method is used in another compiler's crate.

Steps to reproduce (on x86_64 Linux):

  • Clone the compiler: git clone --depth=1 https://github.com/rust-lang/rust
  • Run cd rust
  • Run cp config.example.toml config.toml
  • Run ./x build library (this command will execute successfully)
  • Edit file compiler/rustc_ast/src/token.rs: comment function pub fn is_like_plus
  • Run ./x build compiler --stage 0, this command will succeed. But it shouldn't, because is_like_plus is used in another crate!
  • Run ./x build library. This command will correctly fail

I found this bug when attempting to contribute to rustc. So this bug presents minor contributor roadblock, so I mark it so.

I used current HEAD, i. e. aea4e43 .

The bug seems to be related to #134916 .

@rustbot label A-contributor-roadblock T-bootstrap C-bug

@safinaskar safinaskar added the C-bug Category: This is a bug. label Dec 31, 2024
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Dec 31, 2024
@jieyouxu
Copy link
Member

I can reproduce on HEAD, indeed, building it once then deleting a fn that should cause build to fail does not:

[00:06] Joe:rust (fresh *) | ./x build compiler --stage 0
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.01s
Building stage0 library artifacts (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.01s
Building compiler artifacts {rustc_abi} (stage0 -> stage1, x86_64-unknown-linux-gnu)
   Compiling rustc_abi v0.0.0 (/home/joe/repos/rust/compiler/rustc_abi)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.17s
Build completed successfully in 0:00:00

@jieyouxu jieyouxu self-assigned this Dec 31, 2024
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 31, 2024
@bors bors closed this as completed in 6ca6659 Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants