[m-rev.] for review: colour in error messages

Zoltan Somogyi zoltan.somogyi at runbox.com
Sat Apr 27 13:11:08 AEST 2024


On 2024-04-24 22:54 +10:00 AEST, "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>>> Should we have a separate logical colour for "this may be caused by"
>>> messages?
>> 
>> I think so.  More generally, we probably need to go thorugh the expected
>> outputs in tests/invalid and tests/warnings and work out where colour
>> could be useful.
> 
> Agreed, but actually I would first prefer to go through typecheck_errors.m
> and see where I can eliminate unnecessary differences first. That module
> evolved somewhat haphazardly, so there are mechanisms to be helpful
> to the programmer that are implemented only for one kind of error, but not
> other, closely related kinds.

I have now done that review, and found no unnecessary differences.
While doing that, I have also added color to all the error messages
generated in that module where I thought that color could be helpful;
the diff is attached.

That diff bootchecks cleanly with color disabled (as it is by default).
I can bootcheck it with color enabled, and see its effects, but there is
nothing I can do to record "yes, this color output is right" without
an agreement about how we should handle colored output in .err_exp files.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.tcec
Type: application/octet-stream
Size: 311 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20240427/1369e9c7/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.tcec
Type: application/octet-stream
Size: 34387 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20240427/1369e9c7/attachment-0003.obj>


More information about the reviews mailing list