From: Robert G. <rpg...@si...> - 2008-12-30 15:50:42
|
Christophe Rhodes wrote: > Robert Goldman <rpg...@si...> writes: > >> E.M. Baringer's Arnesi library has an ASDF clean-op in its src/asdf.lisp >> file (thanks to fe[nl]ix on #lisp for the pointer). Is there any reason >> this operation could not be imported into the core ASDF distribution? >> Cleaning out old FASLs seems like a very nice thing to have. > > The usual argument against is that clean-op is philosophically wrong: > the output-files of which operation should it clean? > > I'm no longer sure that that argument holds water: the operation > itself can know, by virtue of referring to the operation it's cleaning > up for. Something like > > (defclass clean-op (operation) > ((clean-for :initarg :clean-for)) > (:default-initargs :clean-for (make-instance 'load-op))) > > Now (asdf:oos 'asdf:clean-op ...) will do the right thing, and those > with special requirements can additionally do things like > (asdf:oos 'asdf:clean-op ... :clean-for (make-instance 'test-op)) > or similar. > > This probably isn't going to be a straightforward import of Marco's > code (though maybe it is, I don't know); on the other hand, if this > functionality were available in this form I would be happy. > > Best, > > Christophe > This sounds like the right approach, and I will see if I can figure out how to modify Marco's code accordingly. One question, though --- why should the :clean-for operation default to load-op instead of compile-op? That was the one that seemed like the obvious choice to me. Best, r |