[m-rev.] for review: improve error messages for missing foreign values in foreign_enum pragmas

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Jun 7 16:20:48 AEST 2016



On Tue, 7 Jun 2016 11:41:46 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> Currently, if a foreign_enum pragma is missing cases in the constructor -
> foreign value mapping we report that there are some missing foreign values but
> do not list the affected constructors unless --verbose-error-messages is
> enabled.  For cases where there are a small number of missing foreign values
> this is a bit irritating as you need to recompile to find out what they are.
> Change the compiler so the error messsage lists upto the first 10 constructors
> that do not have a foreign value.
> (If --verbose-error-messages is enabled then we list all of them as before.)

I haven't seen the diff; I am just replying to this part of the log message.
Why print only the first 10 constructors without verbose error messages?
First, I think the median number of missing constructors will be less than 10
anyway, but second, when there are more than 10 missing, why wouldn't
the user want to know all of them at once? Wouldn't it be "irritating", as you
say, to fix ten and then be presented with another batch of missing values
to fix on the next compiler invocation?

Zoltan.


More information about the reviews mailing list