[m-dev.] how much of a message should be colored?
Zoltan Somogyi
zoltan.somogyi at runbox.com
Thu May 16 19:55:46 AEST 2024
The attached file shows a dilemma I am facing.
It was generated by a compiler containing a not-yet-commited
change I am working on, and it contains two error_specs
that use color to two different extents in different but related contexts.
The error_specs I am talking about are the ones reporting the
errors on line 23 and line 53 of types2.m.
Both errors concern situations in which the compiler
has found one construct, but did not find another construct
whose presence is required by the first construct.
In both cases, the specific id of the first construct is colored
as the subject of the diagnostic, without its general category
(clause on line 23, type decl on line 53) being colored.
The errors for line 53 color both the statement that the
second construct is missing, and its general description.
The error for line 23 color *only* the statement that the
second construct is missing, and *not* its general description.
I think both approaches can be justified, but having them be
different is a bit strange. I can see three main approaches
to resolve the difference:
1. Change all error messages that currently follow the pattern
now used on line 53 to use the approach on line 23.
2. The converse: change all diagnostics that are now like line 23
to be like line 53.
3. Change neither set of diagnostics, and live with the difference.
And of course there is the option of completely replacing
both approaches with something else, though I can't think
of anything better than the options above.
Opinions?
Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: types2.err
Type: application/octet-stream
Size: 2691 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20240516/28db39ad/attachment.obj>
More information about the developers
mailing list