On 3/17/10 Mar 17 -6:03 PM, Juan Jose Garcia-Ripoll wrote:
On Wed, Mar 17, 2010 at 11:54 PM, Juan Jose Garcia-Ripoll <juanjose.garciaripoll@googlemail.com mailto:juanjose.garciaripoll@googlemail.com> wrote:
Oh, there is nothing with TRAVERSE's output _right now_.
Let me clarify this again:
- The fact that TRAVERSE now adds the same operation for all components
was new. That was my source of confusion. Before this did not happen with LIB-OP and the like. Maybe a straightforrwad solution is just writing
(defun perform ((o bundle-op) (c component)) nil)
so that all components which are not modules get a default PERFORM that does nothing. Is this safe?
I believe that this should work fine; it is effectively what is done for TEST-OP in ASDF, because we can't know what bits of a system are testable.
OTOH, I'm not sure that this is fully /sufficient/ --- I'm not sure what combination of INPUT-FILES, OUTPUT-FILES and OPERATION-DONE-P are also necessary. I'm pretty sure, though, that if you put NIL functions for the former two and a method on the latter that returns T, that should be safe.
- The order and format of TRAVERSE's output is important. Details like
ensuring that the list includes the operated systems and that a system's components appear before the system that owns them, is also important, for this allows us to use TRAVERSE for identifying what files make up a module, using a variant of
(let ((*forcing* t)) (traverse (make-instance 'load-op) some-system))
which lists all components and all systems that should be loaded, sorted in some appropriate order. We rely critically on this, because otherwise I do not know a way to traverse a set of systems "portably" without redoing all of ASDF's logic.
Right. I believe that the constraints on the return are that all of the system's components should appear before the system itself (if they don't, that's a bug). OTOH, there are two hedges I would like to make:
1. The operations can be interleaved arbitrarily. E.g., there's nothing about the problem specification to FORCE a system's components to be operated on IMMEDIATELY before the system object itself. They could be separated and other operations interleaved (e.g., LOAD-OP with COMPILE-OP).
2. Because of NO-OP performs, the sequence from TRAVERSE can be a superset of the actual things that happen. E.g., we emit lots of TEST-OPs when testing some of our systems, most of which do not correspond to actually doing anything. I hope that's not a problem because I think this is pretty unfixable in the current framework.
r