View Issue Details

IDProjectCategoryView StatusLast Update
0037331FPCCompilerpublic2020-10-06 18:00
ReporterAnton Kavalenka Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version3.3.1 
Summary0037331: compiler: Colored error output on capable terminal
Descriptiongcc and llvm-based compilers display errors and notes with color highlighting on capable terminals. Is catches eye in big output.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Anton Kavalenka

2020-07-11 18:28

reporter  

Anton Kavalenka

2020-09-28 16:54

reporter   ~0125930

Proof of concept
comphook.diff (469 bytes)   
Index: compiler/comphook.pas
===================================================================
--- compiler/comphook.pas	(revision 46991)
+++ compiler/comphook.pas	(working copy)
@@ -346,6 +346,8 @@
       hs:='['+hs2+'] '+hs;
     end;
 
+   hs:=SysUtils.StringReplace(hs,'Warning:',#27'[1m'#27'[35mWarning:'#27'[0m',[rfReplaceAll]);
+
   { Display line }
   if (Level<>V_None) and
      ((status.verbosity and (Level and V_LevelMask))=(Level and V_LevelMask)) then
comphook.diff (469 bytes)   

Thaddy de Koning

2020-09-28 17:05

reporter   ~0125931

This is not a compiler, but IDE issue. It may also be a Lazarus IDE issue. In general it is a feature request for the IDE's
Can somebody move it to the appropiate locations? (fp , resp. Lazarus IDE?)

Anton Kavalenka

2020-09-28 18:31

reporter   ~0125934

Last edited: 2020-09-28 18:33

View 2 revisions

No.
Black screenshoot is the GCC compilation in console. clang does the same

Anton Kavalenka

2020-10-06 18:00

reporter   ~0126120

Win10 terminal also supports VT100
https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences

Issue History

Date Modified Username Field Change
2020-07-11 18:28 Anton Kavalenka New Issue
2020-07-11 18:28 Anton Kavalenka File Added: Здымак экрана, 2020-07-11 19-27-22.png
2020-07-11 18:29 Marco van de Voort Severity minor => feature
2020-07-11 18:29 Marco van de Voort FPCTarget => -
2020-09-28 16:54 Anton Kavalenka Note Added: 0125930
2020-09-28 16:54 Anton Kavalenka File Added: Здымак экрана, 2020-09-28 17-51-19.png
2020-09-28 16:54 Anton Kavalenka File Added: comphook.diff
2020-09-28 17:05 Thaddy de Koning Note Added: 0125931
2020-09-28 18:31 Anton Kavalenka Note Added: 0125934
2020-09-28 18:33 Anton Kavalenka Note Edited: 0125934 View Revisions
2020-10-06 18:00 Anton Kavalenka Note Added: 0126120