lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond error behaviour


From: David Wright
Subject: Re: Lilypond error behaviour
Date: Sat, 16 Apr 2016 21:29:05 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Please can you quote in a way that's visible in text clients,
not just HTML ones.

On Sat 16 Apr 2016 at 20:42:45 (+1000), Andrew Bernard wrote:
> I have not used any language of complaint, merely observation and puzzlement. 
> It was also not I that mentioned it is a regular source of confusion. Others 
> do seem to think so. As to being the first, I may possibly be the first to 
> write a lilypond compile server where I need to understand clearly the error 
> conditions to get everything working nicely.
> 
> On 16/04/2016, 5:47 PM, "David Kastrup" <address@hidden> wrote:
> 
> Andrew Bernard <address@hidden> writes:
> 
> So gentlemen, since this is a regular source of confusion,
> 
> You are the first to have complained.
> 
> 
> 
> As to lilypond making a best effort at producing output, I have never
> seen this referred to in the NR. That ought to go in somewhere.

Um, the purpose of LP is to produce output (lilypond.org line 1).

> But
> for my preference, a serious syntax error which is just outright
> garbage should in my opinion not produce any output. Other types of
> compilers would stop.

Some compilers might stop. For example, a heavily optimising compiler
would be wasting its time. OTOH a checkout compiler would apply a
fixup and carry on compiling to the end.

If a compiler was producing an executable program as its target, then
it would attempt to produce it, but it would be pointless trying to
run it. But you could examine its output (eg the symbol table); yet
for most people, the compiler listing would be sufficient. OTOH LP's
target is a PDF (ignoring other targets) and most people find as much
diagnostic information there as in the messages emitted on the
console. In order to examine a PDF, you need it to be consistent
enough for PDF readers to render it, and that means LP can't just give
up and stop.

LP can also produce multiple targets. Some may be usable in the
presence of errors elsewhere.

Other errors can be tolerated in the "final" output. For example, I
produce many scores with individual lines for singers, but pianists
prefer two staves which I give them. However, I don't bother to
eliminate all the errors that result, and they understand that.

> 
> As does LilyPond.
> 
> But it does not stop. After the syntax error it still produces the output 
> PDF, and states a 'fatal error' happened. Perhaps it could say that 'a syntax 
> occurred but I overall I was able to carry on regardless in this case’ or 
> something to that effect. I thought the common understanding of fatal error 
> means that the program cannot continue processing because of it. I am only 
> talking about the processing of one file here, as per the submitted MWE, not 
> the processing of more than one file on the command line.

I think a better analogy than compilers writing programs would be
browsers rendering web pages. Can you imagine a WWW where malformed
pages produced a few error messages on the screen and nothing else?
No, we expect the browser to make its best attempt at a partial
rendition. So please leave LP alone and write a better server.
Yes, it might be nice if LP had an indication of severity level,
but my preference would be for improvements in LP's primary goals.

Cheers,
David.



reply via email to

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