[m-rev.] for review: Conditionally enable color diagnostics by default.
Peter Wang
novalazy at gmail.com
Tue Jun 25 18:18:57 AEST 2024
On Tue, 25 Jun 2024 17:43:56 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>
> Maybe what we need is a single central manager process that manages
> the massaging of the parallel output process so that it appears serial to users,
> and, as you say, communicates with its child processes using IPC kinds of channels,
> not the filesystem. This wouldn't even need to be done by writing out human readable
> terms; it could done by serializing terms to *binary* data. There would be no problem
> with different processes having two different definitions of the type of the term
> being passed along, because all the worker processes would be forked off the
> manager process, and would thus have identical code.
>
> Such a system would be very useful to mmc --make for another reason:
> the central manager process would be the natural repository of the already-checked
> parse trees of .intN and .*opt files.
Yes, that could be useful. But a lot of work.
> >> My position is
> >>
> >> - color should be turned on by default for all invocations,
> >> because even if a diagnostic goes to a file, a human will probably look at it;
> >>
> >> - if you want diagnostics to be processed by a tool that does not know
> >> about color escape sequences, then either generate those diagnostics
> >> with the --no-color-diagnostics flag or its envvar equivalent, or filter out
> >> those escape sequences.
> >>
> >> I think that position is considerably simpler and more understandable
> >> than yours. Anyone arranging for machine processing of diagnostics
> >> is already taking an explicit step to command this; requiring the addition
> >> of an option seems to me to be just a small imposition.
> >
> > All right then.
>
> Sorry, but I have no idea what you mean by that.
I meant that we can drop my patch, and keep the current behaviour.
I do think some users might find it surprising, as most other tools will
check if the output is a terminal before enabling color automatically.
We can always revisit the decision if necessary.
Peter
More information about the reviews
mailing list