Finding depended-upon systems
Ahmon Dancy
dancy at franz.com
Tue Nov 17 21:32:23 UTC 2015
Robert Goldman <rpgoldman at sift.net> wrote:
>> 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.
I was the one who asked about that and this is what I ended up with:
(defun out-of-date-components (system &key (other-systems t))
"Returns a list of the components of SYSTEM (or its dependent systems,
if OTHER-SYSTEMS is true (which is the default)) which are out-of-date."
(let ((op (make-instance 'asdf/lisp-action:compile-op))
res)
(dolist (c (asdf:required-components system
:force nil :force-not nil :keep-component 'asdf:cl-source-file :keep-operation 'asdf:compile-op
:other-systems other-systems))
(when (eq (asdf/action:compute-action-stamp nil op c) t)
;; Operation timestamp is in the future. This indicates that the operation
;; needs to be performed.
(push c res)))
res))
I would have been nice if I hadn't had to write this myself.
More information about the asdf-devel
mailing list