Bug 21266 – Improve TTY and color detection in build.d

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-09-20T06:30:32Z
Last change time
2024-12-13T19:11:41Z
Keywords
TestSuite
Assigned to
No Owner
Creator
Seb
Moved to GitHub: dmd#19792 →

Comments

Comment #0 by greeenify — 2020-09-20T06:30:32Z
tl;dr: currently build.d always uses -color=on, but this doesn't work on all CIs (e.g. not DAutoTest) The problem is that some CIs do support these coloring sequences and build.d used to be called via the Makefiles, but I presume people still wanted to have colored log output locally. Anyhow, the detection code is here: https://github.com/dlang/dmd/blob/10288e524535a51a061750e118c0144d64d93550/src/build.d#L158-L160 Probably a good idea to stop catering for the makefiles and add a similar TTY detection like DMD's (see below) and detect/hard-code the CIs which support color-coding https://github.com/dlang/dmd/blob/10288e524535a51a061750e118c0144d64d93550/src/dmd/console.d#L63 https://github.com/dlang/dmd/blob/10288e524535a51a061750e118c0144d64d93550/src/dmd/console.d#L197
Comment #1 by robert.schadek — 2024-12-13T19:11:41Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19792 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB