Bug 20822 – when building dmd, control characters for the console are included even when the host DC is piped

Status
NEW
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-05-11T22:35:42Z
Last change time
2024-12-13T19:08:36Z
Assigned to
No Owner
Creator
basile-z
Moved to GitHub: dmd#17956 →

Comments

Comment #0 by b2.temp — 2020-05-11T22:35:42Z
just open a console in your terminal, put a typo in a source to get an error (for example line 792 of declaration.d, rename isOverDeclaration -> isOveDeclaration) and $ make -f posix.mak > a.out I get things like > ERROR: dmd/declaration.d(792): Error: no property isOveDeclaration for type dmd.dsymbol.Dsymbol, did you mean dmd.dsymbol.Dsymbol.isOverDeclaration? Not good.
Comment #1 by b2.temp — 2020-05-12T08:25:32Z
confirmed even when forcing no color, e.g $ export DFLAGS="-color=off" && ./build.d > a.out then the error message contains control characters.
Comment #2 by b2.temp — 2020-05-13T10:15:58Z
I've found a dubtful assulmption in build.d https://github.com/dlang/dmd/blob/25e9247535649606e312f9e623be7a68b8d46678/src/build.d#L151-L157 "Since we're ultimately outputting to a TTY," ?????? "auto" should be the default. "auto" detects if the stuff is piped or not.
Comment #3 by robert.schadek — 2024-12-13T19:08:36Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17956 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB