On 16 Apr 2023, at 09:59, Michael Dietz <michael.di...@mailbox.org> wrote:
> > Hi Lilypond users, > > I had an issue with a file which repeatedly crashed my computer. It took all > memory. The error is clearly on the user’s side: I had this line in a file > (let’s say) choir.ly: > > \include choir.ly > > So LilyPond recursively included this file over and over again until the RAM > was full. > > That leads me to my question: Could lilypond catch this user error and (a) > know that it included it already and skip over the \include command the > second time or (b) warn the user and stop compiling the file (or any other > reasonable approach) to help the user? > > Cheers, > Michael > I’m not able to experiment with this at the moment, but this article (albeit relating to “C”) about include guards looks as if it might be useful: https://en.wikipedia.org/wiki/Include_guard Michael