Re: Add CLEAN-OP to ASDF?

Robert Goldman <[email protected]> Tue, 30 Dec 2008 09:55:24 -0600
Newsgroups gmane.lisp.cclan.general
Message-ID <[email protected]>
Christophe Rhodes wrote:
> Robert Goldman <[email protected]> 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
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> cclan-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cclan-list
> 

I should have reread Marco's code more carefully before responding.  His
clean-op already takes a :for-op initarg that does what Christophe
suggests here.  I didn't give him sufficient credit.

But the default is compile-op, not load-op.

I'm going to start by splicing the clean-op into my local copy of asdf,
and will propose a patch if testing proves successful.

Oh, yes, and I have written to Marco to ask if inserting his code would
be acceptable, and under what circumstances.  In particular, Arnesi was
released under the Open Source license, whereas ASDF is released under
MIT/X license terms, and Marco asks for his copyright notice to be
preserved.

Best,
R

------------------------------------------------------------------------------