lilypond-user
[Top][All Lists]
Advanced

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

Re: Obscure error message from 2.25.0


From: Jean Abou Samra
Subject: Re: Obscure error message from 2.25.0
Date: Sun, 15 Jan 2023 20:30:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

Le 15/01/2023 à 20:20, Graham King a écrit :
I've just run convert-ly on a 600+ line file and its \include files, from 
2.19.40 to 2.25.0.  Nothing seemed to change apart from the \version statement, 
but on trying to compile the file, I get:

Processing `/tmp/....ly'
Parsing...ERROR: In procedure %resolve-variable:
Unbound variable: %
Exited with return code 1.

Does this point to an obvious problem?



You probably tried to use LilyPond comment syntax in a Scheme function.
Scheme comments start with ';' not '%'.

With Guile 1, as used in LilyPond 2.22, it happens that

#(define (func)
   % a bunch of unbound variables
   'x)

#(display (func))


"works" and prints "x". This is weird. The function body has several
expressions: %, a, ..., 'x, where all the ones before 'x are references
to variables called '%', 'a', ... In Scheme, the expressions before the
last one in a function body are evaluated only for their side effects, the
result is discarded. It seems that Guile 1 somehow detects that a
simple variable can't have a side effect and removes it, even
though it would trigger an error if it were evaluated.

We're on Guile 2 now, and it doesn't have this obscure behavior.

Best,
Jean

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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