lilypond-user
[Top][All Lists]
Advanced

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

Re: Identify included files


From: David Kastrup
Subject: Re: Identify included files
Date: Sat, 16 May 2020 23:31:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

"Fr. Samuel Springuel" <address@hidden> writes:

>> On 15 May, 2020, at 5:04 PM, David Kastrup <address@hidden> wrote:
>> 
>> "Fr. Samuel Springuel" <address@hidden> writes:
>> 
>>> Before I start writing a script to do this, is there an existing tool
>>> which will identify all the `\include` files that a LilyPond file
>>> depends on?  Even better, one that will work in a recursive fashion?
>> 
>> You can use a file like
>> 
>> ...
>> and call it with
>> 
>> lilypond --init parse-only.ly actual-file-name.ly 2> /dev/null
>> 
>> and it should be pretty fast.  Of course the file list includes
>> parse-only.ly...
>> 
>> 
>> -- 
>> David Kastrup
>
> Very nice.  I’ve tested the various options and this seems to be the
> best option.  While I haven’t tested with a really big file, this
> option appeared to be independent of file size while the option I came
> up with isn’t.
>
> Is there any chance that something like this could be introduced into 
> LilyPond core?

The problem is that there are quite a few things in there that make no
overwhelming sense for the task you want to solve.  In order to allow
for "snappy" init files doing specific tasks like this version of
parse-only.ly does, one should likely move some of its content to
declarations-init.ly or elsewhere.  At the current point of time, the
ability to set up different init files is not really something one can
cleanly put to good use.

So generally I'd be wary expecting this to continue working forever, but
hopefully if it stops working, the necessary changes should make for a
cleaner solution then.

-- 
David Kastrup



reply via email to

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