[asdf-devel] Detecting non-defsystem dependencies
xach at xach.com
Thu Nov 7 14:05:59 UTC 2013
Faré <fahree at gmail.com> writes:
> On Wed, Nov 6, 2013 at 2:48 PM, Zach Beane <xach at xach.com> wrote:
>> Robert Goldman <rpgoldman at sift.net> writes:
>>> Zach Beane wrote:
>>>> Some system files look like this:
>>>> ;;;; myproject.asd
>>>> (asdf:load-system "some-prerequisite")
>>>> (defsystem "myproject" ...)
>>>> Can you recommend a good way to detect that system "myproject" depends
>>>> on system "some-prerequisite"? Are there any hooks or other features of
>>>> ASDF that might make it straightforward?
>>> I don't believe that this can actually be computable. There's no way
>>> to ask ASDF what would happen when it loads an asd file, nor really
>>> could there be.
>> I don't care about knowing in advance; I mean more instrumenting the
>> ASDF process somehow to detect what *has* happened after the fact. I've
>> already done this in a hacky way by adding methods to internal functions
>> and (ab)using *macroexpand-hook*. I'm looking for nicer, possibly even
>> supported/encouraged ways.
> You could open a bug against ASDF if you feel there should be support
> for it builtin.
> A "userspace" implementation of that can currently be done by having a
> hook :before asdf:operate, that pushes the current operation to a list
> associated to the (uiop:load-pathname) when said file is a .asd.
Hmm. If I have a setup like this:
(asdf:defsystem "a" ...)
What will be the load pathname associated with the load operation of
"c" when loading "a"?
More information about the asdf-devel