Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Output is terrible on windows #86

Closed
kjeremy opened this issue Oct 16, 2019 · 16 comments
Closed

Output is terrible on windows #86

kjeremy opened this issue Oct 16, 2019 · 16 comments

Comments

@kjeremy
Copy link

kjeremy commented Oct 16, 2019

This is what it looks like on rust-analyzer.

                                         �[1;37mProject: �[0mrust-analyzer
�[37m             `  :y.`yy`.y:  `�[0m            �[1;37mHEAD: �[0m0cce2bc (master, origin/master, origin/staging)
�[37m         -``MNsNMMNNNNMMNsNM``-�[0m          �[1;37mVersion: �[0mguide-2019-01
�[37m      ` -MMNMMMMNNm``NNNMMMMNMM- `�[0m       �[1;37mCreated: �[0m1 year, 10 months ago
�[37m     `NNNMMMdo:` `+md/  `:odMMMNNN`�[0m      �[1;37mLanguages: �[0mRust (96.38 %) TypeScript (3.57 %) JavaScript (0.04 %)
�[37m   -ssNMMNo.                .oNMMNss-�[0m               Shell (0.01 %)
�[37m   `mMM�[0m�[91mMMNmmmmmmmmmmmmmmmdy+`�[0m�[37m `sMMMm`�[0m    �[1;37mAuthors: �[0m40% Aleksey Kladov 2128
�[37m `mMMM�[0m�[91mMMMMMMMMMMMMMMMMMMMMMMN/�[0m�[37m  hMMMMm`�[0m  �[1;37m         �[0m25% bors[bot] 1313
�[37m -oMN-:Ny:�[0m�[91mmMMMMMm    oNMMMMMm�[0m�[37m oN::MMo-�[0m   �[1;37m         �[0m5% Florian Diebold 296
�[37m.yMMMhhh+ �[0m�[91mdMMMMMd:::::+mMMMMN/�[0m�[37m odyhMMMy.�[0m �[1;37mLast change: �[0m4 hours ago
�[37m-sNMMy    �[0m�[91mdMMMMMMMMMMMMMMMMs`�[0m�[37m    `yMMNs-�[0m �[1;37mRepo: �[0mhttps://github.com/rust-analyzer/rust-analyzer.git
�[37m-sNMMy    �[0m�[91mdMMMMMNyyyydMMMMMMy�[0m�[37m   .odMMNs-�[0m �[1;37mCommits: �[0m5227
�[37m.yMMMm   �[0m�[91mdMMMMMh     +MMMMMM+�[0m�[37m  sMMMMMy.�[0m  �[1;37mLines of code: �[0m61872
�[37m -oMMM�[0m�[91mMMMMMMMMMMMMMM+  mMMMMMMMMMM�[0m�[37mMMMo-�[0m  �[1;37mSize: �[0m18.96 MiB (889 files)
�[37m `mMMM�[0m�[91mMMMMMMMMMMMMMM+  :NMMMMMMMMM�[0m�[37mMMMm`�[0m  �[1;37mLicense: �[0mApache License 2.0
�[37m   `mMMMm               `-:o+:/mMMMm`�[0m
�[37m   -ssNMMMyomo            smohMMMNss-�[0m
�[37m     `NNNMs+mN/-`      `-/Nd/yMNNN`�[0m
�[37m      ` -MMNMMMMMNmmmmNMMMMMNMM- `�[0m
�[37m         -``MNsNMMNMMNMMNsNM``-�[0m
�[37m            `  :y.`yy`.y:  `�[0m
@spenserblack
Copy link
Collaborator

Looks like this might be fixed by updating colored to 1.8, which includes support for the Windows build target.

@kjeremy
Copy link
Author

kjeremy commented Oct 16, 2019

That did not fix it locally. I can run with NO_COLOR=1 in my environment and that at least gets readable output.

@spenserblack
Copy link
Collaborator

Which version of Windows is this? Just ran it on W10 (without updating crate) and it works. This is probably related to colored-rs/colored#59.

@kjeremy
Copy link
Author

kjeremy commented Oct 16, 2019

1809 Build 17763.805

@kjeremy
Copy link
Author

kjeremy commented Oct 16, 2019

The examples from the colored repo work

@kjeremy
Copy link
Author

kjeremy commented Oct 16, 2019

Even on tag v1.6.1 so it might not be a colored thing specifically.

@o2sh o2sh closed this as completed in ad64f9c Oct 16, 2019
@o2sh o2sh reopened this Oct 16, 2019
@kjeremy
Copy link
Author

kjeremy commented Oct 16, 2019

Great that fixed it!

@kjeremy kjeremy closed this as completed Oct 16, 2019
@o2sh
Copy link
Owner

o2sh commented Oct 16, 2019

@kjeremy can you give it another try? I've just pushed an update in the light of @spenserblack remarks.

@o2sh o2sh reopened this Oct 16, 2019
@o2sh
Copy link
Owner

o2sh commented Oct 16, 2019

I'm confused, did my commit fixed it ?

@kjeremy
Copy link
Author

kjeremy commented Oct 16, 2019

Yes your commit fixed it :)

@spenserblack
Copy link
Collaborator

Great that fixed it!

🎉
Not sure why it worked on my W10 machine before the commit (older version, too) 🤔

@kjeremy kjeremy closed this as completed Oct 16, 2019
@o2sh
Copy link
Owner

o2sh commented Oct 16, 2019

Did you run the .exe or just via cargo run ?

Anyway, I'm not sure my commit is the best way to handle this issue.
I didn't use control::set_virtual_terminal(bool)

========================

Thanks again for the help @spenserblack .

I added you as a Collaborator of the repo. You can merge pull requests when you feel like it's of enough quality and commit to the repo directly 👍

@o2sh o2sh reopened this Oct 16, 2019
@o2sh o2sh closed this as completed Oct 16, 2019
@o2sh o2sh reopened this Oct 26, 2019
@o2sh
Copy link
Owner

o2sh commented Oct 26, 2019

The output is broken again 😢

image

@spenserblack
Copy link
Collaborator

😱
I didn't really have a chance to test it on Windows (since the colors worked before the fix for me for some reason, still not sure why).
Did I perhaps reverse the logic here when getting it to compile on Linux?

@kipters
Copy link

kipters commented Oct 28, 2019

Did you test on both the old conhost.exe console and the new Windows Terminal? Maybe there's a difference there

spenserblack added a commit that referenced this issue Oct 28, 2019
@spenserblack
Copy link
Collaborator

Just pushed up a new commit which should fix the issue. Was able to replicate behavior on my Windows machine.

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

No branches or pull requests

4 participants