On 5 May 2020, at 12:05, Marco Antoniotti wrote:
At a certain point I needed (I still do) the function SYSTEM-INPUT-FILES. I think Fare send me a simple implementation that worked on the ASDF version of that time (long ago, I guess). The function is the following.
(defun system-input-files (system)
(multiple-value-bind (i o)
(while-collecting (i o)
(loop for (op . comp)
in (plan-actions
(traverse-sub-actions 'load-op (find-system system)))
do (map () #'i (input-files op comp))
(map () #'o (output-files op comp))))
(remove-if #'(lambda (f) (member f o :test 'pathname-equal))
(remove-duplicates i :from-end t :test 'pathname-equal))))
So what you need here is the full set of plan actions. You should be able to get this as follows:
(defun system-input-files (system)
(multiple-value-bind (i o)
(while-collecting (i o)
(loop for (op . comp)
in (plan-actions (make-plan nil (make-operation 'load-op) (find-system system)))
do (map () #'i (input-files op comp))
(map () #'o (output-files op comp))))
(remove-if #'(lambda (f) (member f o :test 'pathname-equal))
(remove-duplicates i :from-end t :test 'pathname-equal))))
make-plan
will give you what you need to call plan-actions
on in place of traverse-sub-actions
.