Open nixxquality opened 5 years ago
a PR was just merged to drop the time output by default. The fix for color-coding needs to be brought in the eunit formatter library so that it can detect whether the shell supports color or not. Rebar3 does so, but not the eunit formatter it installs by default
I think this is a bug in Erlang that I haven't been able to pin down. It uses some hackery to interact with the Windows terminal, but nowadays that is not required (and actually broken). You can see this by running in a Git bash, configured to use conhost instead of the msys terminal. When executing ./rebar3 eunit
the output will be garbled, even though conhost nowadays (on Windows 10) supports VT100 escapes, as Erlang seems to inject some broken characters. However, piping the output as ./rebar3 eunit | cat
works.
We do some general detection to know if stuff requires to be output or not. It's possible that we properly realize that piping to cat
won't support color but not for the rest. Otherwise, as you said, if it's supposed to support VT100 escapes and somehow can't then we have a weird problem where we might have to disable more color than we would otherwise :/
Oh no, piping through cat
doesn't block the colours, they show in that case properly.
Oh okay, yeah there's something weird then.
Environment
This problem seems to happen in every rebar3 project I try.
Current behaviour
I am running
rebar3 eunit
in a PowerShell terminal inside VS Code, but it happens even when running in a flat cmd.exe. Here it is running with DEBUG=1:Expected behaviour
None of the output from eunit seems to be handled properly, as all the tests are listed as taking 0.000 seconds. The output is also garbled up with those broken color codes (at least, that's what I assume they are).