bug-lilypond
[Top][All Lists]
Advanced

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

Cyclical/mutual includes not detected


From: Olexa Bilaniuk
Subject: Cyclical/mutual includes not detected
Date: Fri, 29 Apr 2011 18:51:23 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

> I'm not top posting.

While typesetting a large project, I accidentally included in my "utilities"
file a file that included those same utilities, which resulted in Lilypond
quickly eating up all my memory. Distilled to the bare minimum, this is what
triggers this bug:

******************************

% In file Test.ly:
  % WARNING: DO NOT COMPILE
  \version "2.13.60"
  
  \include "Test2.ly"
% End file Test.ly

******************************

% In file Test2.ly:
  % WARNING: DO NOT COMPILE
  \version "2.13.60"
  
  \include "Test.ly"
% End file Test2.ly

******************************

I admit that to a certain extent it is the user's responsibility to check for
these sorts of failings, but in the interest of safety there should be a check
for mutual/cyclical includes. For example, GCC refuses to process includes
deeper than I believe 127 levels (An example of setting a hard limit), and
another way to do this would be to build a dependency graph and test whether it
is acyclic or not.


Olexa Bilaniuk




reply via email to

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