[m-dev.] how much of a message should be colored?

Julien Fischer jfischer at opturion.com
Sat May 18 01:31:26 AEST 2024


On Thu, 16 May 2024, Zoltan Somogyi wrote:

> 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.

With the current wording you may just end up coloring the word
"no" here and that's not really going to stand out.

> 2. The converse: change all diagnostics that are now like line 23
> to be like line 53.

I have no objections to the second option ...

> 3. Change neither set of diagnostics, and live with the difference.

... nor indeed, leaving things as they are now.

Julien.


More information about the developers mailing list