Re: Circular dependencies - Deadlock

2017-06-21 Thread Johan Vromans
On Thu, 22 Jun 2017 06:39:08 +0200, David Kastrup wrote: > I don't really see this as calling for changes. If you want to create > utility files to be included at most once, you can try working with > guards like it is customary for C/C++ include files. I think we're shifting topic here from re

Re: Circular dependencies - Deadlock

2017-06-21 Thread David Kastrup
Simon Albrecht writes: > On 21.06.2017 22:32, Michael Käppler wrote: >> 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. > > That won’t be Scheme involved there. IIRC \include st

Re: Circular dependencies - Deadlock

2017-06-21 Thread Michael Käppler
Am 21.06.2017 um 23:24 schrieb msk...@ansuz.sooke.bc.ca: On Wed, 21 Jun 2017, caag...@gmail.com wrote: On 06/21/2017 11:10 PM, Johan Vromans wrote: If you have a non-infinite recursive include it will continue. I think that would require solving the Halting Problem first. That's true if it ha

Re: Circular dependencies - Deadlock

2017-06-21 Thread Simon Albrecht
On 21.06.2017 23:24, msk...@ansuz.sooke.bc.ca wrote: my understanding of the proposal was that Lilypond would continue with a warning in any case, not trying to decide whether it's infinite, and let the user deal with shutting it down if in fact it is infinite. I was going to write that not eve

Re: Circular dependencies - Deadlock

2017-06-21 Thread mskala
On Wed, 21 Jun 2017, caag...@gmail.com wrote: > On 06/21/2017 11:10 PM, Johan Vromans wrote: > > If you have a non-infinite recursive include it will continue. > > I think that would require solving the Halting Problem first. That's true if it has to determine whether the recursion is infinite, bu

Re: Circular dependencies - Deadlock

2017-06-21 Thread mskala
On Wed, 21 Jun 2017, Johan Vromans wrote: > Instead of aborting, LP could issue a warning that it detected a circular > include. If it then hangs, you have a clue what is going on. If you have a > non-infinite recursive include it will continue. If it's only a warning (we need not get back into th

Re: Circular dependencies - Deadlock

2017-06-21 Thread caagr98
On 06/21/2017 11:10 PM, Johan Vromans wrote: If you have a non-infinite recursive include it will continue. I think that would require solving the Halting Problem first. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailm

Re: Circular dependencies - Deadlock

2017-06-21 Thread Johan Vromans
On Wed, 21 Jun 2017 15:57:59 -0500 (CDT), msk...@ansuz.sooke.bc.ca wrote: > This may be a problem if there's any possibility of an include being > conditional. Then, someone could write a non-infinite recursive include > deliberately, and be disappointed when Lilypond breaks it. Instead of abort

Re: Circular dependencies - Deadlock

2017-06-21 Thread mskala
On Wed, 21 Jun 2017, Simon Albrecht wrote: > It would be even better, I think, if Lily noticed the circular dependency and > aborted with an informative message instead of just running on forever. This may be a problem if there's any possibility of an include being conditional. Then, someone coul

Re: Circular dependencies - Deadlock

2017-06-21 Thread Simon Albrecht
On 21.06.2017 22:32, Michael Käppler wrote: 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. That won’t be Scheme involved there. IIRC \include statements are resolved even before

Re: Circular dependencies - Deadlock

2017-06-21 Thread Michael Käppler
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 "

Re: Circular dependencies - Deadlock

2017-06-21 Thread Simon Albrecht
On 21.06.2017 22:03, msk...@ansuz.sooke.bc.ca wrote: 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 la

Re: Circular dependencies - Deadlock

2017-06-21 Thread mskala
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" facili

Circular dependencies - Deadlock

2017-06-21 Thread Michael Käppler
Hi all, I searched the bug tracker for the following issue but did not find anything... Consider two files: foo.ily: \version "2.19.59" \include "bar.ly" bar.ly: \version "2.19.59" \include "foo.ily" { c4 d e f } If you try to compile bar.ly the parsing process continues forever, appare