lilypond-user
[Top][All Lists]
Advanced

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

Re: Re: misleading message and exit code when "program too old"


From: tisimst
Subject: Re: Re: misleading message and exit code when "program too old"
Date: Wed, 11 Nov 2015 14:16:12 -0700 (MST)

Johannes,

On Wed, Nov 11, 2015 at 1:54 PM, Johannes Waldmann [via Lilypond] <[hidden email]> wrote:
Hi,

it's really not a big deal since I have a work-around
(ignore the exit code in my Makefile)

I understand that specifying and checking the version
can be useful. I am just saying that the actual message
and behaviour (exit code) is surprising.

From the compilers I know (say, gcc)
there's a clear difference between:
* a warning (processing continues, exit code 0)
* an error (processing stops, no output, exit code != 0)

Where is the semantics of "\version" documented?
(It's not in the index?
http://www.lilypond.org/doc/v2.18/Documentation/notation/lilypond-index
- It appears in the PDF version
of the notation manual, but without explanation)

Is it something like the following?
"If lilypond version X reads "\version Y" in the input,
then if X < Y, it prints an "error" message and sets exit code to 1,
else it is silent. It will continue processing in both cases."

Why am I doing this - I have a bunch of 2.18 files that still
need to be converted to 2.19, that's why I am using 2.18.

In an ideal world, 2.19 would respect the "2.18"
specification in the file and behave accordingly ... but I guess
that would require a lot of work - basically keep all the
old/buggy behaviour in addition to the new/fixed one.

Since we don't have this, a 2.19 executable
should also warn if it reads a 2.18 file?
Because output could be different - that's the
same reason for the warning as in the other case.

That would give a lot of warnings.
Then they could be turn-on/offable ( -Wversion? )

I've not seen the specifics for how it is supposed to work, but here's what I've observed in actual use:

- If LilyPond version >= compiled file \version, then no warning or error
- If LilyPond version < compiled file \version, then compiler error

One thing to also note is that any \include'd files don't seem to be version checked--only the main file being compiled. I'm not sure why there isn't at least a warning in the first case (where LP version > File version), but it doesn't. So, even if you run 2.18 files through your 2.19 compiler, then you shouldn't see any error about the \version statement. The \version statement mostly serves two purposes:

1. Remind you what compiler version you initially coded it for
2. Makes it possible for convert-ly to upgrade it to newer versions when desired

Best,
Abraham


View this message in context: Re: Re: misleading message and exit code when "program too old"
Sent from the User mailing list archive at Nabble.com.

reply via email to

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