-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
bootstrap: consider filtering compiler
in the git log
command for download-rustc
#113250
Comments
i want to do this rather than include
|
note that this implies that the logic we use to pick a commit for LLVM is extremely fragile and only happens to work because all llvm updates are marked |
FWIW, passing ( |
Where exactly are we saving time and bandwidth by not just including all commits? Given that 70% of PRs touch compiler, basically every rebase over master (since you usually rebase over several merges) will contain changes to the compiler, causing the need for new downloads. |
this is a fair point! if the only outcome here is that we add |
FWIW this got changed (#113588). Now it is:
However the new approach still sometimes fails because "commit authored by bors" could be a Miri/clippy bors commit that was moved over via a subtree sync. Really we'd want to check for "commit authored by the bors of this repo"; sadly, bors does not put that information into the commit. (The "that modified src/llvm-project" part does not seem to be effective; at least I have seen the LLVM logic pick up Miri bors commits even though those can never modify src/llvm-project.) |
@onur-ozkan you've changed this logic quite a bit recently... is this still an issue? |
Here rust/src/bootstrap/src/core/config/config.rs Lines 2771 to 2784 in 4b198d6
we only pick the most recent bors commit that modified one of Thanks for the ping. |
Right now, download-rustc picks a commit to download as follows:
rust/src/bootstrap/config.rs
Lines 1921 to 1927 in 85c4ea0
compiler/
since that commit:rust/src/bootstrap/config.rs
Lines 1936 to 1941 in 85c4ea0
This is slightly different than how download-ci-llvm works:
rust/src/bootstrap/llvm.rs
Lines 130 to 144 in 68d458b
This results in some differences in the commit we pick. In particular, download-rustc always chooses the most recent commit authored by bors, even if that commit didn't modify compiler/:
So we download both more and less often than we need to: more often because we always download the latest bors commit, less often because we only consider
compiler/
andlibrary/
, so if someone has modified the way bootstrap builds rustc locally, we won't notice.In #112143 (comment) I tried this changing this approach, but it didn't actually work, because
--author
interacts strangely with-- compiler/
when used with rollups:It would be nice to use the same approach for LLVM and ci-rustc, but we'd have to work around this git limitation somehow. Here is an idea i came up with that may or may not work
note that if we start doing this, we'll need to introduce a
download-ci-rustc-stamp
file (likedownload-ci-llvm-stamp
) in case we change the way we build rustc; otherwise we might download artifacts that wouldn't match the artifacts you'd get if you build locally.The text was updated successfully, but these errors were encountered: