-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Download a pre-compiled bootstrap from CI #99989
Comments
@rustbot claim |
I'm not sure I agree. According to But it's still bearable I think. Definitely worth the cost of hosting a few binaries. |
@est31 I'd guess probably a good half of those are related to #94829. We should be seeing less churn once that gets closed out. A fair number of the rest are related to #44293, which has also been fixed and won't have more PRs in the future. Bootstrap is definitely changing more than LLVM, but I don't know that it's a great metric to compare to; I think bootstrap is a failiy small download compared to everything else. |
It's also true that we could tune the divide here over time - for example, splitting bootstrap into configuration+ flag parsing and the inner bits which actually run things. Ultimately, the primary goal with downloading it is to reduce the amount of non-Rust code we maintain, and we need a pretty thin shim to parse flags, config, and download bootstrap compiler to proceed from there. But yes, we should make sure the binary is not unexpectedly large on download - hopefully just a few megabytes. |
@dvtkrlbs 👋 it's been a while - are you still planning to work on this? |
FTR if you run the command from above then you get 13 PRs that changed bootstrap in 2023, which gives a 11 days per PR average rate, which is close to the LLVM change rate quoted above. And with serious build time increases proposed, like the 20%+ increase proposed in #108083, this makes more sense than it used to IMO. |
sadly no I am removing myself from the issue. |
…oolchain, r=Mark-Simulacrum Download beta compiler toolchain in bootstrap if it doesn't yet exist Blocker for rust-lang#107812 and rust-lang#99989 See: rust-lang#107812 (comment) r? `@jyn514`
…lchain, r=Mark-Simulacrum Download beta compiler toolchain in bootstrap if it doesn't yet exist Blocker for rust-lang#107812 and rust-lang#99989 See: rust-lang#107812 (comment) r? `@jyn514`
Another proposed PR that causes significant build time increases: #110369 |
@rustbot claim |
unclaiming as i have zero bandwith for this and some time has passed. @jyn514 sorry dude! |
@rustbot claim |
I am reclaiming this issue since I have time to work on it. One question @jyn514 what is the directory structure for the artifacts server? |
Another side note is that it seems we are not generating checksums for the bootstrap artifacts |
yes, this is known and expected, we don't have checksums for download-rustc artifacts either. I ripped out the python code that made verification optional a while back, feel free to add it back.
see |
Hmm it is bootstrap but the problem is the dist server does not seem to have any bootstrap artifacts are they not enabled to be pushed to the static server. Or should I've been looking at the artifacts_server instead of dist_server? |
ah yeah that's probably it - ci-artifacts.rust-lang.org is different than static.rust-lang.org. you can add debugging to src/bootstrap/download.rs to see what it's doing, it uses ci-artifacts for download-rustc. |
i am going to push my local changes which downloads the bootstrap correctly but i cant compreehend the unzip part of the python code which is has couple level of indirections. right now the bootstrap binary ends up in "build\x86_64-pc-windows-msvc\stage0\nightly-x86_64-pc-windows-msvc\bootstrap\bootstrap\bin\bootstrap.exe" and i am not sure if i am supposed to move this to build/bootstrap/debug or make the bootstarp bin dir function also handle git changes |
i think the correct way to handle this is to update |
Sorry for the lack of progress on this. I've been quite busy for a while and couldn't find any time to work on this I am closing this PR in case someone wants to continue feel free to base from my changes. |
Currently, we unconditionally recompile bootstrap on all builds, like libstd. In most cases, this is unnecessary: bootstrap is rarely changed and it's confusing that we have to build a whole rust program before processing
x.py --help
. Additionally, it means that when we add the new shell script entrypoints, we'd have to replicate all of bootstrap.py's logic for finding config.toml and the build directory. If we can download bootstrap through rustup, it will greatly simplify all that logic.Most of this work has already been done in #98483. The work left is to actually download the generated artifact in bootstrap.py.
cc @dvtkrlbs
Mentoring instructions:
download_or_build_bootstrap
function tosrc/bootstrap/bootstrap.py
.git diff-index --quiet HEAD -- src/bootstrap
), then always rebuild it from source.stage0.json
- you may have to modify theStage0Toolchain
python object to load this configuration.Helps with #94829.
The text was updated successfully, but these errors were encountered: