lilypond-user
[Top][All Lists]
Advanced

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

Re: Circular dependencies - Deadlock


From: Michael Käppler
Subject: Re: Circular dependencies - Deadlock
Date: Wed, 21 Jun 2017 22:32:12 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

What would be wrong about just outputting a warning "Trying to include already included file" or something like that and reject
the recursive \include statement?
I came across this when working with a include file collecting cue notes like that:

\include "foo1.ly"
\include "foo2.ly"
\include "foo3.ly"
\addquote "bla1" { \foo1_bla1 }
\addquote "bla2" { \foo2_bla2 }
(...)

I change my code to circumvent the recursive loop but I needed a moment to figure out why LilyPond was hanging.
A warning would be nice.
Honestly I did not try it, but I am quite sure that it would be easy to implement a IFDEF mechanism like in C preprocessing with a few lines of Scheme, however.

All the best,
Michael


Am 21.06.2017 um 22:03 schrieb address@hidden:
On Wed, 21 Jun 2017, Michael Käppler wrote:
foo.ily:
\include "bar.ly"
bar.ly:
\include "foo.ily"
Am I right to consider this a bug?
I don't think so - at least not a bug in Lilypond.  It's just doing what
you told it to do, and most other language parsers that have an "include"
facility will similarly be unable to give a useful result when fed
infinitely recursive include files.  The usual advice to users is not to
write such input.





reply via email to

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