-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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-rustc=if-unchanged logic is too fragile #131658
Comments
Cross ref: #131560 (comment) |
Okay that's more than I expected. The per-dir numbers are hard to interpret since we need the union of multiple folders, and of course there will be overlap between these categories. Also this made me realize we can add |
This seems like a much better approach, I agree. I'm planning to work on that change in a couple of days (but feel free to take it on if you think you can do it sooner). |
AIUI, that's only for
I do like this idea! But I think |
I can't really guarantee that my scripts work properly, but I tried to check how many PRs would be cacheable if we only allowed caching for PRs that touch |
What else are so many PRs changing? Maybe books? |
Yeah, and instead rustc will need
Great to hear we found a solution that we can both agree on. :) I won't have time to work on this.
Why not? The contents of |
I haven't checked the code, but at least the Lines 488 to 494 in 27861c4
|
Given that, in my understanding, the entire goal of this is to make it possible to contribute to the library without having to rebuild all of rustc, that seems odd. |
We could improve that along with the change-detection logic refactor. Also, |
I don't want to have to change my rustc config every time I switch between library and compiler development, which I do regularly. There should be a single config that works for both (as is the case today).
|
Once If the compiler download is only used for what would be the stage0->stage1 bootstrap build, then yes library can be allowed to change and still use the download. If you want to skip the stage1->stage2 compiler build, that does need to consider library, but this could be useful for tools for example. |
Yes that's what I said, isn't it? I can change |
I was trying to refine what I said earlier. Yes, I agree library changes can be allowed in stage0, but not later stages. |
Later stages should very rarely be needed. The only time I ever needed them in the last years is for |
Seems like this is now causing spurious test failures in #132846. See here for context. IMO we should stop using download-rustc=if-unchanged on CI until a more robust system is in place. If we can't even trust that CI tests the actually latest version of the compiler, that's not a great place to be in. |
…ozkan do not trust download-rustc=if-unchanged on CI for now See rust-lang#131658. Once rust-lang#131831 lands this will be unnecessary, for until then, better safe than sorry. r? `@onur-ozkan` Cc `@rust-lang/bootstrap`
…ozkan do not trust download-rustc=if-unchanged on CI for now See rust-lang#131658. Once rust-lang#131831 lands this will be unnecessary, for until then, better safe than sorry. r? `@onur-ozkan` Cc `@rust-lang/bootstrap`
…ozkan do not trust download-rustc=if-unchanged on CI for now See rust-lang#131658. Once rust-lang#131831 lands this will be unnecessary, for until then, better safe than sorry. r? `@onur-ozkan` Cc `@rust-lang/bootstrap`
…ged-logic, r=Mark-Simulacrum extend the "if-unchanged" logic for compiler builds Implements the first item from [this tracking issue](rust-lang#131744). In short, we want to make "if-unchanged" logic to check for changes outside of certain allowed directories, and this PR implements that. See rust-lang#131658 for more context.
Rollup merge of rust-lang#131831 - onur-ozkan:improve-rustc-if-unchanged-logic, r=Mark-Simulacrum extend the "if-unchanged" logic for compiler builds Implements the first item from [this tracking issue](rust-lang#131744). In short, we want to make "if-unchanged" logic to check for changes outside of certain allowed directories, and this PR implements that. See rust-lang#131658 for more context.
We can close this since #131831 is merged. |
See here, which was already the second time that the logic caused trouble in less than a week (first time was fixed here).
I don't think a list of "folders that can influence the build" is maintainable. At the very least it'd have to include
src/bootstrap
since that computes a ton of env vars and flags that influence the build.Judging from some of the comments that are hidden in the huge thread of #122709, one motivation here is to prepare for a planned bootstrap change where rustc is built with the beta
std
. Is that the key motivation? Would be good to get that clarified.I would argue that the way to achieve this goal is to have an allowlist of "folders where changes are okay", not a denylist of "folders where changes lead to redowload". That allowlist would contain
library/
once the bootstrap change is made. For now, it is not clear to me what we can add to the allowlist... maybesrc/doc
andsrc/tools
?src/tools/build-helper
does have the chance to influence the build, but it shouldn't contain any actual logic, so it's "probably fine".The text was updated successfully, but these errors were encountered: