[m-rev.] for post-commit review: allow some colors to be left unspecified

Peter Wang novalazy at gmail.com
Fri Jun 7 14:48:41 AEST 2024


On Thu, 06 Jun 2024 21:40:43 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> For review by Peter. I have tested this by temporarily removing
> one of the colors from the value set for MERCURY_COLOR_SCHEME
> by tools/bootcheck, and it works.
> 
> The informational message we now generate for a missing color
> is now ignored. What I intend to do with it is as follows.
> 
> - When we get such a message, we record it in a mutable in write_error_spec.m.
> 
> - When write_error_spec.m writes out any error_spec, it records that fact in
>   another mutable.
> 
> - The compiler invokes maybe_print_delayed_error_messages when it is
>   about to exit. It usually prints the message about specifying -E to get
>   verbose errors. It would now also print the informational message
>   about colors left unspecified if (a) such a message exists, and (b)
>   some error_spec *was* printed.
> 
> This would add the informational message to the output of a
> compiler invocation only when that output could have been affected
> by the color being left unspecified.

Sounds reasonable to me.

The diff looks fine.

Peter


More information about the reviews mailing list