You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just updated Rust at work, and now rustc has no colors in the console (Cargo still does). I'm using Windows 7 64-bit with Rust MSVC 32-bit. I tried 1.29 stable and it worked, but 1.30 stable and the latest nightly don't work. I have tried both cmd.exe and PowerShell and both look the same. This is a big regression in usability, so I'll probably downgrade back to a working version.
--color=always does not seem to have an effect. It is passing --color=always to rustc, but for some reason rustc is not returning content with ANSI codes. If you run rustc manually on the command line, the colors seem to work.
Thanks for the report @jminer! I think this'll get fixed by #55788
@kennytm I think we only tested msys shells earlier, right? I think we're hitting this branch of termcolor which I guess means that this is succeeding somehow. It's not entirely clear to me why that's all somehow not failing but I'm pretty sure that asking for AlwaysAnsi will do the trick
Hm ok, that's worrisome! If #55788 doesn't do the trick I can try to investigate later, but it'll be quite awhile before I have a windows computer to test on again
When this gets fixed, is there a possibility of adding some sort of UI test for this? This would be helpful for ensuring colors continue to work, when implementing #59346
termcolor-1.0.5 was released containing the fix.
I thought I'd update Cargo.lock and PR the change, but I've built rustc with termcolor-1.0.5. and I still can't see the rustc color output when run by cargo. So either I did something wrong when updating/rebuilding rustc, or BurntSushi/termcolor#10 didn't fix the issue...
@moxian it should work, but there is a bug in Cargo where colors are not working correctly, so that's why I have not updated things here, yet. I filed kennytm/fwdansi#1 but I have not heard back from @kennytm, yet.
Activity
ehuss commentedon Nov 8, 2018
I can confirm this happens on Windows 8, and can confirm it is caused by rust-lang/cargo#5862.
cc @kennytm, @alexcrichton
kennytm commentedon Nov 8, 2018
Will
cargo run --color=alwaysenable the colors?ehuss commentedon Nov 8, 2018
--color=alwaysdoes not seem to have an effect. It is passing--color=alwaysto rustc, but for some reason rustc is not returning content with ANSI codes. If you runrustcmanually on the command line, the colors seem to work.rustc: Request ansi colors if stderr isn't a tty
alexcrichton commentedon Nov 8, 2018
Thanks for the report @jminer! I think this'll get fixed by #55788
@kennytm I think we only tested msys shells earlier, right? I think we're hitting this branch of
termcolorwhich I guess means that this is succeeding somehow. It's not entirely clear to me why that's all somehow not failing but I'm pretty sure that asking forAlwaysAnsiwill do the trickkennytm commentedon Nov 8, 2018
@alexcrichton previously i did have tested on cmd.exe, but i haven't followed the recent changes which might have broken it
alexcrichton commentedon Nov 8, 2018
Hm ok, that's worrisome! If #55788 doesn't do the trick I can try to investigate later, but it'll be quite awhile before I have a windows computer to test on again
Rollup merge of rust-lang#55788 - alexcrichton:wincolors, r=petrochenkov
Rollup merge of rust-lang#55788 - alexcrichton:wincolors, r=petrochenkov
alexcrichton commentedon Nov 12, 2018
For posterity there was some discussion of why this isn't actually fixed on nightly right now, and @kennytm has a PR to
termcolorwhich should fix thisMSxDOS commentedon Jun 4, 2019
Any chance this is getting fixed in the nearest future?
mati865 commentedon Jun 4, 2019
@MSxDOS I pinged
termcolorauthor and he is reviewing PR mentioned above so this should get fixed on nightly soon.kennytm commentedon Jun 4, 2019
Nah we still need to go through the package release and update Cargo.lock processes 🙃
phansch commentedon Jun 4, 2019
When this gets fixed, is there a possibility of adding some sort of UI test for this? This would be helpful for ensuring colors continue to work, when implementing #59346
moxian commentedon Jun 22, 2019
termcolor-1.0.5was released containing the fix.I thought I'd update Cargo.lock and PR the change, but I've built rustc with termcolor-1.0.5. and I still can't see the rustc color output when run by cargo. So either I did something wrong when updating/rebuilding rustc, or BurntSushi/termcolor#10 didn't fix the issue...
ehuss commentedon Jun 22, 2019
@moxian it should work, but there is a bug in Cargo where colors are not working correctly, so that's why I have not updated things here, yet. I filed kennytm/fwdansi#1 but I have not heard back from @kennytm, yet.
ehuss commentedon Jul 31, 2020
This should be fixed on the latest nightly (2020-07-31) via rust-lang/cargo#8540 and #74923.