Subject: Re: bug#54307: [PATCH 0/2] Highlight headings showing what to build/download

From: Liliana Marie Prikler <[email-masked]>
Date: Thu, 10 Mar 2022 11:46:12 +0100

Am Donnerstag, dem 10.03.2022 um 11:19 +0100 schrieb Ludovic Courtès:
> Hi,
> 
> Liliana Marie Prikler <[email-masked]> skribis:
> 
> > Am Mittwoch, dem 09.03.2022 um 11:12 +0100 schrieb Ludovic Courtès:
> > > * guix/colors.scm (highlight/warn): New procedure.
> > > * guix/ui.scm (show-what-to-build): Use 'highlight/warn' when
> > > displaying
> > > what would/will be built.
> > highlight/warn sounds somewhat misleading for this use-case. 
> > Should
> > this be highlight/info instead?
> 
> I agree “warn” is misleading, but I don’t find “info” any clearer. 
> :-)
> 
> Maybe ‘highlight-more’ or something?
Highlight more than what?  Looking at (guix diagnostics) we currently
have merely bold for info, bold magenta for warning and bold red for
error.  On a related note, (guix diagnostics) appears a little over-
engineered; it's mostly there to highlight the diagnostic prefix, but
it would also highlight any other non-whitespace argument... is that
really useful?

Anyway, I would suggest using a less "offensive" colour to indicate how
much is being downloaded/built.  Using red or magenta in this case
would signal an error when that's actually the expected behaviour.  My
personal colouring bias would tend towards cyan or green here, although
green itself is already used to signal success and might not be a good
idea either.

While highlight/info on its own really doesn't make sense, it'd make
more sense if we also defined %warning-color, %info-color, %error-color
in colors and simply used them in diagnostics rather than the other way
round and also defined highlight/warning and highlight/error to
complete the pattern.  Once we figure out what we want to do with the
diagnostics, we could even drop them from the exports if the coloring
procedures can be used in their stead.

Cheers