-
Notifications
You must be signed in to change notification settings - Fork 13.4k
bootstrap: Build using download-rustc
can modify Cargo.lock
for non compiler/
deps, causing rustc to not be downloaded on next build
#141986
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
Comments
I cannot reproduce this on 792fc2b. |
I think they some had changes on either bootstrap or compiler tree. |
Ok, I've mangaged to figure out why this was happening. I had no changes in bootstrap or compiler, but I had changes in rustdoc's ReproWe start on 61413ae (master at the time of writing), with the same config, and no changes. download-rustc works as expected.
Then we edit
However, doing this build has caused
So now, when we run the build again, it builds rustc locally, instead of downloading it:
So what's the bug.I think not using download-rustc if |
profile = "tools"
no longer downloads rustc for rustdocdownload-rustc
can cause Cargo.lock
to be modified for non compiler/
deps, causing rustc to not be downloaded on subsequent builds.
download-rustc
can cause Cargo.lock
to be modified for non compiler/
deps, causing rustc to not be downloaded on subsequent builds.download-rustc
can modify Cargo.lock
for non compiler/
deps, causing rustc to not be downloaded on next build
@rustbot label A-download-rustc |
The change detection of download-rustc is very simple and straightforward. All it does is check if the git state is dirty for paths not included in this list. As a solution, I just proposed this PR which should fix the issue without having to inspect files in detail. |
Rollup merge of #142232 - onur-ozkan:141986, r=Kobzol add `Cargo.lock` to CI-rustc allowed list for non-CI env Changes to dependencies usually require modifying `Cargo.toml`, which would already invalidate the CI-rustc cache if done in non-allowed paths. On non-CI environment, it should be safe to add `Cargo.lock` to the list of allowed paths as there is no real risk aside from a very rare false positive in cases like minor bumps to non-allowed path dependencies without modifying the `Cargo.toml` files. Fixes #141986
Uh oh!
There was an error while loading. Please reload this page.
EDIT: See #141986 (comment) for the actual problem/reproduction steps
Summary
When using
profile = "tools"
, building rustdoc requires building rustc, instead of usingdownload-rustc
toCommand used
Expected behaviour
I don't build 300 crates of rustc
Actual behaviour
It builds rustc from source, instead of downloading CI artifacts.
Bootstrap configuration (bootstrap.toml)
Operating system
Ubuntu 24.04.1 LTS
HEAD
a124fb3
Additional context
Build Log
The lines
Look sus, as it's says it's extracting to
rustfmt
twice, but I think that that's unrelated.The text was updated successfully, but these errors were encountered: