lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: Fix cascading error messages


From: David Kastrup
Subject: Re: Feature request: Fix cascading error messages
Date: Tue, 29 Mar 2022 01:58:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Christopher Heckman <christopher.heckman@asu.edu> writes:

> I have a request concerning Lilypond that has bothered me for a while,
> but which I haven't seen any one else complain about. It is the
> cascade of error messages you get when you leave out a right-brace or
> some other symbol.
>
> Maybe this could be added as an option to lilypond?
>
> lilypond --cascade-level=N file.ly
>
> which, for any given line, prints the first N error messages, and
> after that a message saying that further error messages have been
> suppressed. A default value for N might be 3 or 4.
>
> What does everyone think?

The problems from followup errors do not magically disappear because
they are not reported.  The only thing that would make sense is better
error recovery (which is pretty hard but can partly be achieved by
inserting "error" productions matching typical error scenarios into the
grammar: that causes a more targeted recovery and is arguably
underutilised in LilyPond's grammar) but not pretending to be fine.

The problem with the followup errors is that there is no way that
LilyPond can actually be sure that they are followup errors.

Good heuristics for error recovery productions in the grammar are tricky
to do, and since they are only relevant for erroneous input, they tend
not to be assigned a high priority.

On the other hand, I found excellent error recovery to be of high
importance when the normal workflow was sucking a stack of punch cards
through the reader and then checking your output shelf hours later for a
stack of line printer paper with the results of your compilation (and
hopefully execution, possibly accompanied by a post mortem dump listing
the COMPASS assembly instructions running into problems).

I rarely find myself working an error log off sequentially these days
rather than just restarting compilation after fixing a limited set of
problems.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]