Bug 20788 – Difference between colored and non colored output
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-04-30T04:47:36Z
Last change time
2021-01-02T15:07:29Z
Keywords
pull
Assigned to
No Owner
Creator
Andre
Comments
Comment #0 by andre — 2020-04-30T04:47:36Z
The dmd output text is different depending whether color output is on or off.
Sample:
void main()
{
int i;
e = 3;
}
Color on:
sample.d(4): Error: undefined identifier e
Color off:
sample.d(4): Error: undefined identifier `e`
This is an issue if you want to use the dmd output for dustmite.
Color is on by default and very often I forgot, that I cannot just
use the output of dub (dmd) but have to disable colored output.
The dmd output text should be the same, independent whether color is
on or off.
Comment #1 by razvan.nitu1305 — 2020-05-08T07:28:12Z
The output is the same, it just looks different in the terminal. If you redirect stderr to a file, regardless of the option of color (on/off) you will have the same output. It's just that when color is on, the backquotes are not displayed, instead the selected words are higlighted. I will close as invalid, but please reopen if you have a use case that is hindered by this.
Comment #2 by andre — 2020-05-08T08:51:50Z
The issue is not about me, I know the behavior, but every other user will be very likely hit by this behavior and will think dustmite does not work.
It is not a display issue. If you copy the output into the clipboard also the necessary ticks are missing. Every user will learn by hard (wasting some time), he/she has to disable color outout if the output should be used for dustmite search.
Comment #3 by ag0aep6g — 2020-05-08T09:28:26Z
(In reply to RazvanN from comment #1)
> The output is the same, it just looks different in the terminal. If you
> redirect stderr to a file, regardless of the option of color (on/off) you
> will have the same output. It's just that when color is on, the backquotes
> are not displayed, instead the selected words are higlighted.
The output is not the same. You say it yourself: The backticks are missing in the colored output.
> I will close
> as invalid, but please reopen if you have a use case that is hindered by
> this.
Reopening. Andre has stated his use case: Copying from the terminal, pasting into a dustmite command. I think that's a valid concern, but it might not be deemed important enough to warrant a change. In that case, I suggest closing as WONTFIX instead of INVALID.
Comment #4 by dlang-bot — 2020-05-08T09:29:00Z
@aG0aep6G created dlang/dmd pull request #11110 "fix issue 20788 - Difference between colored and non colored output" fixing this issue:
- fix issue 20788 - Difference between colored and non colored output
https://github.com/dlang/dmd/pull/11110
Comment #5 by dlang-bot — 2021-01-02T15:07:29Z
dlang/dmd pull request #11110 "fix issue 20788 - Difference between colored and non colored output" was merged into master:
- 359824bf497ba8e07bd358b12a46b39201fea428 by aG0aep6G:
fix issue 20788 - Difference between colored and non colored output
- 9dde9c3190952526fca713b0bc0e4e25afeaa45e by aG0aep6G:
fixup! fix issue 20788 - Difference between colored and non colored output
https://github.com/dlang/dmd/pull/11110