stack 1.7.0.1 does not color on Windows powershell terminal

40 views
Skip to first unread message

Murat Özsöyler

unread,
Apr 17, 2018, 7:54:18 AM4/17/18
to haskel...@googlegroups.com
I recently upgraded to stack 1.7.0.1. Although it has many advances from previous version I used, there is a minor fault: I does not color the output on Windows powershell terminal  and puts some cryptic color codes instead. CMD terminal does not work as well.

Although I stated this is a minor issue, color takes attention to the errors easily so one doesn't pay extra attention to find them, meaning less stress on eyes in long hours work.

How can I get the colors back again ? :)

Thanks for your help in advance.
--

Saygılarımla,

Murat Özsöyler

Neil Mitchell

unread,
Apr 17, 2018, 9:17:32 AM4/17/18
to Murat Özsöyler, haskell-stack
Hi Murat,

This isn't necessarily even a change in 1.7 - I reported this as far
back as 1.5. You've always been able to get ANSI codes out, and what's
even more sad is that on Windows 10 (where I'm running) it can deal
with the ANSI codes properly. See
https://github.com/commercialhaskell/stack/issues/3526

Thanks, Neil
> --
> You received this message because you are subscribed to the Google Groups
> "haskell-stack" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to haskell-stac...@googlegroups.com.
> To post to this group, send email to haskel...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/haskell-stack/CAFnJcUS8h%3Dv69Kiq-j2R1C-%2BX6cUbE0mZmPLeLSCs8qnE--kKA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Murat Özsöyler

unread,
Apr 17, 2018, 9:48:21 AM4/17/18
to Neil Mitchell, haskell-stack
Hi Neil,

Thank you for the info.

Actually the colors were working before I upgraded to 1.7.0.1. Upgrade was mandatory to me as I use some hpack features not existed in previous version.

In windows stack comes with its own msys2 installation. The colors work on msys2 terminal. But this time the question is whether it will integrate with vscode as I use it for editing. Because msys2 terminal (msys2_shell.cmd actually) does not inherit environment of the invoking process. If I can solve this I shall switch to msys2.

Regards,

Murat Özsöyler



17 Nis 2018 Sal, 16:17 tarihinde, Neil Mitchell <ndmit...@gmail.com> şunu yazdı:
--

Saygılarımla,

Murat Özsöyler

nik...@fpcomplete.com

unread,
Apr 18, 2018, 11:47:25 AM4/18/18
to haskell-stack
Hey Murat,

can you clarify which colour output you mean? The colour output by stack itself, e.g. what `stack build -v` does, or the coloured output as piped from ghc compile error messages?

I've tried the version you mentioned on Windows but my PowerShell seems to print both as expected.

A screenshot would also help, or information on what repo/code you see it on if it is open source.

Niklas

Murat Özsöyler

unread,
Apr 19, 2018, 5:52:51 AM4/19/18
to nik...@fpcomplete.com, haskell-stack
Hi Niklas,

Thank you for your attention.

As I mentioned before I upgraded stack form 1.6.x (I think) to 1.7.0.1 as per Michael Snoyman's suggestion. From then on the output is like this:
image.png
Before no problem were in the color.

The upgrade was mandatory for me to upgrade inner hpack of stack.

Regards,

Murat Özsöyler

18 Nis 2018 Çar, 18:47 tarihinde <nik...@fpcomplete.com> şunu yazdı:
--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stac...@googlegroups.com.
To post to this group, send email to haskel...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

Saygılarımla,

Murat Özsöyler

Murat Özsöyler

unread,
Apr 19, 2018, 6:53:54 AM4/19/18
to nik...@fpcomplete.com, haskell-stack
Strange! Same terminal (VSCode 1.22.2):image.png
Next command:
image.png
Even in the same command it doesn't work and then works later. Something wrong with the stack coloring logic I think.


19 Nis 2018 Per, 12:52 tarihinde, Murat Özsöyler <murat.o...@gmail.com> şunu yazdı:
--

Saygılarımla,

Murat Özsöyler

Emanuel Borsboom

unread,
Apr 19, 2018, 7:35:47 AM4/19/18
to Murat Özsöyler, nik...@fpcomplete.com, haskell-stack
stack-1.6.5 used ansi-terminal-0.7.1.1, while the stack-1.7 release candidates use ansi-terminal-0.8.0.2.  According to the ChangeLog, there have been some changes on Windows.  Perhaps you could try building `stack` with ansi-terminal-0.7.1.1 on Windows and see if that makes a difference?

On Apr 19, 2018, at 3:53 AM, Murat Özsöyler <murat.o...@gmail.com> wrote:

Strange! Same terminal (VSCode 1.22.2):<image.png>
Next command:
<image.png>
Even in the same command it doesn't work and then works later. Something wrong with the stack coloring logic I think.


19 Nis 2018 Per, 12:52 tarihinde, Murat Özsöyler <murat.o...@gmail.com> şunu yazdı:
Hi Niklas,

Thank you for your attention.

As I mentioned before I upgraded stack form 1.6.x (I think) to 1.7.0.1 as per Michael Snoyman's suggestion. From then on the output is like this:

Murat Özsöyler

unread,
Apr 19, 2018, 7:47:25 AM4/19/18
to Emanuel Borsboom, nik...@fpcomplete.com, haskell-stack
Hi Emanule,

Thank you for your response.

I am too busy for now, but I shall try your suggestion as soon as I can.


19 Nis 2018 Per, 14:35 tarihinde, Emanuel Borsboom <ma...@fpcomplete.com> şunu yazdı:
--

Saygılarımla,

Murat Özsöyler

Reply all
Reply to author
Forward
0 new messages