-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Remove check run bootstrap #142499
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
Remove check run bootstrap #142499
Conversation
This PR modifies If appropriate, please update |
This comment has been minimized.
This comment has been minimized.
a750def
to
c9eeeb4
Compare
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.
Nice ❤️ Maybe we don't need run_always()
everywhere, but I'd rather reproduce the old behavior faithfully, we can always optimize dry run later.
@@ -1407,26 +1408,23 @@ impl Config { | |||
git.arg(relative_path); | |||
git | |||
}; | |||
if !self.check_run(&mut update(true)) { | |||
self.check_run(&mut update(false)); | |||
if !update(true).allow_failure().run(self) { |
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.
run_always
"HEAD", | ||
])); | ||
let has_local_modifications = | ||
!submodule_git().allow_failure().args(["diff-index", "--quiet", "HEAD"]).run(self); |
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.
same
if has_local_modifications { | ||
self.check_run(submodule_git().args(["stash", "push"])); | ||
submodule_git().allow_failure().args(["stash", "push"]).run(self); |
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.
same
} | ||
|
||
self.check_run(submodule_git().args(["reset", "-q", "--hard"])); | ||
self.check_run(submodule_git().args(["clean", "-qdfx"])); | ||
submodule_git().allow_failure().args(["reset", "-q", "--hard"]).run(self); |
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.
same
|
||
if has_local_modifications { | ||
self.check_run(submodule_git().args(["stash", "pop"])); |
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.
same
@@ -255,7 +244,7 @@ impl Config { | |||
curl.arg("--retry-all-errors"); | |||
} | |||
curl.arg(url); | |||
if !self.check_run(&mut curl) { | |||
if !curl.run(self) { |
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.
same
@Kobzol , if we look at the implementation of the check_run method, we can see that it skips method execution when a dry run is set and run_always is not specified. By explicitly setting run_always for the commands in this PR, won’t it cause these commands to run even in dry run mode? |
Sorry, I only saw the check_run function, and missed that there is also a method with the same name that does actually check dry_run. You're absolutely right! @bors r+ rollup |
Rollup of 10 pull requests Successful merges: - #133952 (Remove wasm legacy abi) - #134661 (Reduce precedence of expressions that have an outer attr) - #141769 (Move metadata object generation for dylibs to the linker code ) - #141937 (Report never type lints in dependencies) - #142347 (Async drop - fix for StorageLive/StorageDead codegen for pinned future) - #142389 (Apply ABI attributes on return types in `rustc_codegen_cranelift`) - #142470 (Add some missing mailmap entries) - #142481 (Add `f16` inline asm support for LoongArch) - #142499 (Remove check run bootstrap) - #142543 (Suggest adding semicolon in user code rather than macro impl details) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #142499 - Shourya742:2025-06-14-remove-check-run-bootstrap, r=Kobzol Remove check run bootstrap This PR migrates all usage of check_run to new execution context api's. r? `@Kobzol`
This PR migrates all usage of check_run to new execution context api's.
r? @Kobzol