Skip to content

Print -Ztime-passes (and misc stats/logs) on stderr, not stdout. #82256

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Feb 18, 2021

I've tried not to change anything that looked similar to rustc --print, where people might use automation, and/or any "bulk" prints, such as dumping an entire Graphviz (dot) graph on stdout.

The reason I want -Ztime-passes to be on stderr like debug logging is I can get a complete (and correctly interleaved) view just by looking at stderr, which is merely a convenience when running rustc/Cargo directly, but even more important when it's nested in a build script, as Cargo will split the build script output into stdout (named output) and stderr.

@rust-highfive
Copy link
Contributor

r? @varkor

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 18, 2021
@jyn514 jyn514 added A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 18, 2021
@varkor
Copy link
Member

varkor commented Feb 18, 2021

Since this was brought up in today's compiler team meeting, I'm assuming there's no need to also cc compiler-team/contributors to make them aware of this change.

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 18, 2021

📌 Commit 6165d1c has been approved by varkor

@bors bors 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 Feb 18, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 18, 2021
Rollup of 10 pull requests

Successful merges:

 - rust-lang#81546 ([libtest] Run the test synchronously when hitting thread limit)
 - rust-lang#82066 (Ensure valid TraitRefs are created for GATs)
 - rust-lang#82112 (const_generics: Dont evaluate array length const when handling yet another error )
 - rust-lang#82194 (In some limited cases, suggest `where` bounds for non-type params)
 - rust-lang#82215 (Replace if-let and while-let with `if let` and `while let`)
 - rust-lang#82218 (Make sure pdbs are copied along with exe and dlls when bootstrapping)
 - rust-lang#82236 (avoid converting types into themselves (clippy::useless_conversion))
 - rust-lang#82246 (Add long explanation for E0549)
 - rust-lang#82248 (Optimize counting digits in line numbers during error reporting)
 - rust-lang#82256 (Print -Ztime-passes (and misc stats/logs) on stderr, not stdout.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit efdcb43 into rust-lang:master Feb 18, 2021
@rustbot rustbot added this to the 1.52.0 milestone Feb 18, 2021
@eddyb eddyb deleted the time-passes-stderr branch February 18, 2021 23:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants