Finding depended-upon systems
Robert Goldman
rpgoldman at sift.net
Tue Nov 17 21:23:20 UTC 2015
On 11/17/15 Nov 17 -3:10 PM, Faré wrote:
> On Tue, Nov 17, 2015 at 3:37 PM, Robert Goldman <rpgoldman at sift.net> wrote:
>> This seems like it might be a good FAQ, and we had some correspondence
>> about a related query earlier.
>>
>> (sort (mapcar #'asdf:component-name
>> (mapcar #'cdr
>> (remove-if-not #'(lambda (x) (and (typep
>> (cdr x) 'asdf/system:system) (typep (car x) 'asdf:load-op)))
>> (asdf::traverse
>> (make-instance 'asdf::load-op) (asdf:find-system "hunchentoot") :force
>> :all))))
>> #'string-lessp)
>>
>> This requires knowing a bit about the internals of ASDF and relies on an
>> obsoleted function (TRAVERSE).
>>
>> Maybe we should wrap this up and provide it as part of an ASDF query API?
>>
> I believe that this should work:
> ((lambda (x) (sort (mapcar (lambda (a) (asdf:coerce-name (cdr a)) x 'string<)
> (asdf::required-components :hunchentoot :keep-component 'asdf:system
> :other-systems t))
>
> Actually, it won't work if you have direct dependencies from
> non-system components to systems, but that's strongly frowned upon and
> should probably be prevented by some future ASDF.
>
> —♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
> I'd rather write programs that write programs than write programs — Dick Sites
>
There was some discussion about this in connection with finding what
needed to be recompiled. Is the latter even a query that ASDF can
answer? In old ASDF we computed the plan first, and only after that did
we decide whether the operations needed performing.
More information about the asdf-devel
mailing list