-
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
make llvm::is_ci_llvm_modified
logic more precise
#131305
Conversation
rustbot has assigned @albertlarsan68. Use |
This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. |
The new logic looks good, but I don't understand how it fixes the issue. What specifically has changed which would cause it to work properly now? |
rust/src/bootstrap/src/core/config/tests.rs Lines 22 to 27 in 690332a
The test above supposed to skip when there is a change in the LLVM submodule in CI. However, as reported in #131303, it isn't behaving as expected. I suspect this is related to the |
I will test it with try build later today/tomorrow. @rustbot author |
These two variables should be indeed set unconditionally for all CI jobs. So I suspect that the erorr might have been in this logic instead. |
Probably, will debug that and fix it. |
It didn't happen in CI; maybe it was something else or the first attempt already fixed it. Either way, I made the function even better. @rustbot ready |
Tested and it's fixed #131448 (comment) issue in #131455. |
.args(["diff-index", "--quiet", &commit]) | ||
.arg("--") | ||
.args([ | ||
config.src.join("src/llvm-project"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please unify these three files with the same filelist used in detect_llvm_sha
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's no longer necessary.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This PR modifies If appropriate, please update |
Signed-off-by: onur-ozkan <work@onurozkan.dev>
assert_eq!(parse_llvm("rust.channel = \"dev\""), if_unchanged); | ||
assert!(parse_llvm("rust.channel = \"stable\"")); | ||
assert_eq!(parse_llvm("build.build = \"x86_64-unknown-linux-gnu\""), if_unchanged); | ||
assert_eq!( | ||
parse_llvm( | ||
"llvm.assertions = true \r\n build.build = \"x86_64-unknown-linux-gnu\" \r\n llvm.download-ci-llvm = \"if-unchanged\"" | ||
), | ||
if_unchanged | ||
); | ||
assert!(!parse_llvm( | ||
"llvm.assertions = true \r\n build.build = \"aarch64-apple-darwin\" \r\n llvm.download-ci-llvm = \"if-unchanged\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return false; | ||
} | ||
|
||
let llvm_sha = detect_llvm_sha(config, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is wrong, and this code (which was in a previous commit) should be used instead.
Or at the very least, we should change the documentation of get_closest_merge_commit
. Because detect_llvm_sha
uses get_closest_merge_commit
, which is supposed to return the latest upstream merge commit (that modified LLVM). In that case, it can by definition never return HEAD
on CI (because HEAD
is definitely not upstream).
However, we know that currently get_closest_merge_commit
is bugged and probably just returns HEAD
on CI, so we should probably first resolve #131358 before continuing with this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR unblocks LLVM update PRs and it doesn't do anything other than improving current logic. I don't think #131358 should block this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's fix the download_ci_llvm
test for now to unblock the update PRs. But the logic is still wrong, #131358 should hopefully fix it later.
@bors r+ |
Rollup of 3 pull requests Successful merges: - rust-lang#131305 (make `llvm::is_ci_llvm_modified` logic more precise) - rust-lang#131524 (compiletest: Remove the magic hacks for finding output with `lto=thin`) - rust-lang#131525 (compiletest: Simplify the choice of `--emit` mode for assembly tests) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131305 - onur-ozkan:131303, r=Kobzol make `llvm::is_ci_llvm_modified` logic more precise Fixes rust-lang#131303.
@bors retry r- |
Fixes #131303.