bootstrap: Switch download-rustc back on by default for profile = library#154243
bootstrap: Switch download-rustc back on by default for profile = library#154243jyn514 wants to merge 3 commits intorust-lang:mainfrom
profile = library#154243Conversation
|
r? @clubby789 rustbot has assigned @clubby789. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
acdf88b to
b7aca74
Compare
This comment has been minimized.
This comment has been minimized.
|
I'm not sure if we should propagate download-rustc in its current state, tbh. It has been hacky even before the stage0 redesign, and since then I have zero confidence that it works correctly, I expect that there are many issues with it, and I don't think we have the bandwidth at the moment to deal with them. Of course, some people are using download-rustc today and if it works for them, then that's fine. But enabling it by default when we know it's broken does not seem right. I think that long-term the best solution is to rip out download-rustc completely and reimplement it in a maintainable way. |
Example output:
```
$ x b compiler
Building bootstrap
Finished `dev` profile [unoptimized] target(s) in 0.02s
NOTE: detected 3 modifications that could affect a build of rustc
- src/bootstrap/src/core/config/config.rs
- src/bootstrap/src/core/download.rs
- src/build_helper/src/git.rs
skipping rustc download due to `download-rustc = 'if-unchanged'`
Building stage1 compiler artifacts (stage0 -> stage1, aarch64-apple-darwin)
Finished `release` profile [optimized] target(s) in 0.72s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Build completed successfully in 0:00:05
```
Anything that can change there can also be changed in bootstrap.toml. We have a separate check to make sure that the local config is compatable with CI's config.
This was turned off because `x test --set rust.download-rustc=true --stage=1 library/std` has been broken for years. The workaround is simple and it's to remove `test-stage = 1` from the `library` profile defaults.
b7aca74 to
0dde8fd
Compare
|
I wish you had brought this up a couple years ago when I proposed the stage 0 redesign :/ what would you consider to be a "more maintainable way"? |
|
If it helps, I'm happy to use my work time to maintain download-rustc so that the burden isn't falling on you and the rest of the bootstrap team. |
I only really learned how But of course I also understand that for some users Now about the implementation. It is essentially implemented in a way where there are tens (I think last time I counted around 30?) of All this existed before the stage 0 redesign, but in a sense it was a bit better, both because of the previous staging logic, but mainly because we did not yet go through a major change of bootstrap for which the implementation was not prepared 😆 Onur did a heroic effort to make it work with the redesign, but it was essentially impossible to keep it working after we were making further changes to bootstrap. When I was systematically going over all steps last year to clean things up after the redesign, there were a few situations where things were only "working" because of two bugs that were cancelling each other out. I think that kind of sums the state it is in 😆 We were also seeing various bugs around The way I imagine it would be implemented is ideally by being centralized in a single place in bootstrap, so that we don't need a special case for I started working on this redesign last year, but then I realized that there is another issue with download-rustc 😆 Which is that it is actually quite heavily intertwined with the implementation of I also wrote about this last year on Zulip. |
…vements, r=Kobzol,jieyouxu bootstrap: minor improvements to download-rustc Split out from rust-lang#154243.
…vements, r=Kobzol,jieyouxu bootstrap: minor improvements to download-rustc Split out from rust-lang#154243.
|
☔ The latest upstream changes (presumably #154958) made this pull request unmergeable. Please resolve the merge conflicts. |
…r=Kobzol,jieyouxu bootstrap: minor improvements to download-rustc Split out from rust-lang/rust#154243.
See #142505 for context. There are actually three changes here, I left detailed commit messages.