Finding depended-upon systems
Faré
fahree at gmail.com
Tue Nov 17 21:12:39 UTC 2015
Also, note that this fails to find defsystem-depends-on systems, and,
what is worse, that ASDF will fail to reload them then reload the .asd
files that depend on it when these systems change. See
https://bugs.launchpad.net/asdf/+bug/1500578
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Faith, n:
That quality which enables us to believe what we know to be untrue.
On Tue, Nov 17, 2015 at 4:10 PM, Faré <fahree at gmail.com> 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
More information about the asdf-devel
mailing list