Skip to content

build_helper: try less confusing method names - #63196

Merged
bors merged 3 commits into
rust-lang:masterfrom
RalfJung:build_helper
Aug 3, 2019
Merged

build_helper: try less confusing method names#63196
bors merged 3 commits into
rust-lang:masterfrom
RalfJung:build_helper

Conversation

@RalfJung

@RalfJungRalfJung commented Aug 1, 2019

Copy link
Copy Markdown
Member

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 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 #63089 (comment).

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 1, 2019
Comment threadsrc/bootstrap/test.rs
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));

@RalfJungRalfJungAug 1, 2019

Copy link
Copy Markdown
MemberAuthor

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.

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

Sounds reasonable to me!

@bors

bors commented Aug 2, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 30f61de has been approved by alexcrichton

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 2, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 2, 2019
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).
@CentrilCentril mentioned this pull request Aug 2, 2019
bors added a commit that referenced this pull request Aug 2, 2019
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
@bors
bors merged commit 30f61de into rust-lang:masterAug 3, 2019
@bors

bors commented Aug 3, 2019

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #63228) made this pull request unmergeable. Please resolve the merge conflicts.

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 3, 2019
@RalfJung
RalfJung deleted the build_helper branch August 5, 2019 16:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@RalfJung@alexcrichton@bors@rust-highfive