[asdf-devel] Detecting non-defsystem dependencies

Faré fahree at gmail.com
Wed Nov 6 20:12:42 UTC 2013


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.

PS: it looks like GCL 2.6 is mostly dead, and GCL 2.7 will support
*load-pathname* correctly, and soon ASDF 3 — so maybe we can use
*load-pathname* instead of (uiop:load-pathname).

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Your "solution" to avoid a few free riders in one industry is making everyone
a free rider of a nationwide joint monopoly on all industries?



More information about the asdf-devel mailing list