Skip to content
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.

output colors broken on beta and nightly #174

Closed
durka opened this issue Jan 27, 2016 · 8 comments
Closed

output colors broken on beta and nightly #174

durka opened this issue Jan 27, 2016 · 8 comments

Comments

@durka
Copy link

durka commented Jan 27, 2016

stable:
stable

beta:
beta

nightly:
nightly

@nrc
Copy link
Member

nrc commented Feb 10, 2016

There have been more than a few changes to diagnostics in rustc, but the colouring on the terminal is still OK. Looking through the playpen source I don't see anywhere obvious this could be going wrong.

@durka
Copy link
Author

durka commented Feb 10, 2016

I was going to try to inspect the color codes that rustc produces, but I can't convince it to show them to me at all:

TERM=xterm rustc foo.rs --color=always 2>&1 | xxd

this produces no color codes in the output, on any release channel. Confusing.

@nrc
Copy link
Member

nrc commented Feb 10, 2016

I wonder if that broke as part of the diagnostics work. Would that cause this breakage? Looks like it might from the source code, but I don't really understand it.

Ah, but I would expect this to work on the release channel, if that were the case.

@durka
Copy link
Author

durka commented Feb 10, 2016

If you look in the network console, it's simply not sending any color codes in the compiler output for beta and nightly. Did something change in how it process $TERM? I seem to remember that libterm was updated.

@durka
Copy link
Author

durka commented Feb 10, 2016

Sorry, it does produce colors on stable, I was wrong before. So something changed such that after 1.6.0 rustc checks for a terminal and can't be convinced to print colors to a non-terminal. This seems like a bug, anyway, since --color=always exists.

@TimNN
Copy link
Contributor

TimNN commented Feb 10, 2016

I'm pretty sure that rust-lang/rust#29999 inadvertently brought this to light since it somehow changed how term::stderr() works: colours will only be used when destination is a Terminal, which is only the case if term::stderr() returns Some(_) (see emitter.rs:686).

@respeccing
Copy link
Contributor

Looks like this got fixed and is no longer and issue.

https://play.rust-lang.org/?gist=2f5920fe579ff82b69b87b94b8727d7f&version=stable&backtrace=0
screenshot_2016-04-03_06-32-50
screenshot_2016-04-03_06-33-00
screenshot_2016-04-03_06-33-08

@alexcrichton
Copy link
Member

Indeed! (I believe this was fixed)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants