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

Bumping beta compiler can require nuking build/ to unstuck x #125804

Closed
jieyouxu opened this issue May 31, 2024 · 2 comments
Closed

Bumping beta compiler can require nuking build/ to unstuck x #125804

jieyouxu opened this issue May 31, 2024 · 2 comments
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

@jieyouxu
Copy link
Member

Hi, I've noticed that when the beta compiler is bumped, I can't run any x commands because build cache contains artifacts compiled by the previous beta compiler and thus build_helper (and anything that depends on it) fails to build.

gh-jieyouxu@dev-desktop-eu-1:~/rust$ ./x clean
Building bootstrap
   Compiling build_helper v0.1.0 (/home/gh-jieyouxu/rust/src/tools/build_helper)
error[E0514]: found crate `serde_derive` compiled by an incompatible version of rustc
 --> /home/gh-jieyouxu/rust/src/tools/build_helper/src/metrics.rs:1:5
  |
1 | use serde_derive::{Deserialize, Serialize};
  |     ^^^^^^^^^^^^
  |
  = note: the following crate versions were found:
          crate `serde_derive` compiled by rustc 1.79.0-beta.6 (66eb3e404 2024-05-23): /home/gh-jieyouxu/rust/build/bootstrap/debug/deps/libserde_derive-f63fc2b61cc4af2f.so
  = help: please recompile that crate using this compiler (rustc 1.79.0-beta.7 (d9e85b56e 2024-05-25)) (consider running `cargo clean` first)

It's easy to fix, I just rm -rf build/, but maybe we can automate invalidating the build cache if the beta compiler version that is used to build the build cache doesn't match with the beta compiler version that is used in the current x invocation?

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

Duplicated with #125578

@jieyouxu
Copy link
Member Author

Somehow I didn't find that, thanks!

@jieyouxu jieyouxu closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
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

No branches or pull requests

3 participants