-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
build_helper: try less confusing method names #63196
Conversation
@@ -1527,7 +1527,7 @@ impl Step for RustcGuide { | |||
fn run(self, builder: &Builder<'_>) { | |||
let src = builder.src.join("src/doc/rustc-guide"); | |||
let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook); | |||
try_run_quiet(builder, rustbook_cmd.arg("linkcheck").arg(&src)); | |||
try_run(builder, rustbook_cmd.arg("linkcheck").arg(&src)); |
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 change is based on this thread: I think we actually want to see the output here.
The only other user of try_run_quiet
uses logic of the kind
if builder.config.verbose_tests {
try_run(builder, &mut cmd)
} else {
try_run_quiet(builder, &mut cmd)
}
Most tools just use try_run
.
@bors: r+ Sounds reasonable to me! |
📌 Commit 30f61de has been approved by |
build_helper: try less confusing method names build_helper's `*_silent` methods were likely called that way because they do not print the command being run to stdout. [In the original file this all makes sense](rust-lang@046e687#diff-5c3d6537a43ecae03014e118a7fe3321). But later it also gained `*_suppressed` methods and the difference between `silent` and `suppressed` is far from clear. So rename `run` (which prints the command being run) to `run_verbose`. Then we can call the methods that just run a command and show its output but nothing extra `run` and `try_run`. `run_verbose` (formerly `run`) is unused from what I can tell. Should I remove it? r? @alexcrichton Cc @Mark-Simulacrum Also see rust-lang#63089 (comment).
Rollup of 7 pull requests Successful merges: - #63107 (Added support for armv7-unknown-linux-gnueabi/musleabi) - #63121 (On `format!()` arg count mismatch provide extra info) - #63196 (build_helper: try less confusing method names) - #63206 (remove unsupported test case) - #63208 (Round generator sizes to a multiple of their alignment) - #63212 (Pretty print attributes in `print_arg`) - #63215 (Clarify semantics of mem::zeroed) Failed merges: r? @ghost
☔ The latest upstream changes (presumably #63228) made this pull request unmergeable. Please resolve the merge conflicts. |
build_helper's
*_silent
methods were likely called that way because they do not print the command being run to stdout. In the original file this all makes sense. But later it also gained*_suppressed
methods and the difference betweensilent
andsuppressed
is far from clear.So rename
run
(which prints the command being run) torun_verbose
. Then we can call the methods that just run a command and show its output but nothing extrarun
andtry_run
.run_verbose
(formerlyrun
) is unused from what I can tell. Should I remove it?r? @alexcrichton
Cc @Mark-Simulacrum
Also see #63089 (comment).