Skip to content

Print to stderr consistently in bootstrap #96712

@jyn514

Description

@jyn514
Member

Bootstrap is unfortunately quite inconsistent about which it uses currently :(

$ rg -g '!build.rs' println src/bootstrap/ | grep -v eprintln | wc -l
88
$ rg eprintln src/bootstrap/ | wc -l
60

stderr probably makes more sense? but I don't know when someone would look at just stdout or just stderr; having a hard time imagining use cases.

cc @bjorn3

Originally posted by @jyn514 in #96687 (comment)

Activity

bjorn3

bjorn3 commented on May 4, 2022

@bjorn3
Member

For example ./x.py test >test_log.txt would show warnings on the terminal as stderr is not redirected but put the results of all tests in test_log.txt. Not that I can recall every doing something like that, but it could be useful I guess.

jyn514

jyn514 commented on May 4, 2022

@jyn514
MemberAuthor

Sure, seems fine. Let's use eprintln consistently then.

@rustbot label +E-easy +A-rustbuild

added
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
on May 4, 2022
raiyansayeed

raiyansayeed commented on May 5, 2022

@raiyansayeed
Contributor

@rustbot claim

changed the title [-]Decide whether to print to stdout or stderr in bootstrap[/-] [+]Print to stderr consistently in bootstrap[/+] on May 5, 2022
lionellloh

lionellloh commented on May 25, 2022

@lionellloh
Contributor

@raiyansayeed are you still working on this?

raiyansayeed

raiyansayeed commented on May 25, 2022

@raiyansayeed
Contributor

Hey yes I'm still working on it, have most of it implemented I think. I just haven't gotten the time to review my code / push, although I think I should be able to do it by the end of this week.

added a commit that references this issue on May 27, 2022
1174dba
jyn514

jyn514 commented on Jun 20, 2022

@jyn514
MemberAuthor

Looks like this was done in #97411, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @bjorn3@jyn514@raiyansayeed@lionellloh@rustbot

      Issue actions

        Print to stderr consistently in bootstrap · Issue #96712 · rust-lang/rust