Re: [PATCH] Proposal: implement feature-dependent-op
Christophe Rhodes <[email protected]>
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
Richard M Kreuter <[email protected]> writes: > Christophe Rhodes <[email protected]> writes: > >> It's probably undocumented, but you can actually do this at the >> moment: >> :in-order-to ((load-op (feature :ppc) (feature :darwin)) >> (compile-op (feature :ppc) (feature :darwin))) >> in a component's dependencies. > > The functionality I propose makes the traverse prune components > depending on features. OK, but is this something that should be encouraged? I mean, I can see why you wouldn't want to compile-op something that you don't have the feature for, but you probably still want to tarball-op it. > The ":in-order-to ((... (feature ...)))" > notation expresses a different modality: the absence of the feature > makes TRAVERSE signal an error. > > CL-USER> (find :f1 *features*) > NIL > CL-USER> (defsystem my-sys-2 > :pathname "." > :components ((:file "file1" > :in-order-to ((compile-op (feature :f1)))))) > #<SYSTEM "my-sys-2" {507C8891}> > CL-USER> (asdf:oos 'asdf:compile-op 'my-sys-2) > component :F1 not found, required by #<CL-SOURCE-FILE "file1" {50CCBE61}> > [Condition of type MISSING-DEPENDENCY] Right, though there are the probably also-undocumented features :if-component-dep-fails :ignore/:try-next which let you write conditionally-compiled code while still considering the component part of the system. > The interface to the desired functionality could be provided by adding > syntax to :in-order-to, I guess. I suppose I'm asking why you desire this functionality, then. Cheers, Christophe ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV