Christopher Heckman <christopher.heck...@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