Nick Levine ndl@ravenbrook.com writes:
- Problems with the :feature feature.
It's the "asdf:feature feature", not the ":feature feature".
(asdf:defsystem foo :components ((:file "pkg") (:file "code") (:file "foo" :depends-on ((:feature :frob)))))
If :frob is not on *features*, load-system gives me:
Error: Bad dependency (FEATURE FROB). Dependencies must be (:version <version>), (:feature <feature>), or a name
If :frob is a *feature* I get a different error:
Error: Error component :FROB not found, required by #<CL-SOURCE-FILE "foo" #x8B7A3E6>
Did I misunderstand something?
You'll probably also want :if-component-dep-fails :ignore, if the effect you want is for foo simply not to be loaded if :frob is not present on *features*.
- Suppose I would like some code to run at compile-time / load-time
to determine where the fasls should live (e.g. hypothetically, in a subdirectory named after a timestamp, or according to what patches I have loaded). How do I express this?
With an :around method on asdf:output-files. Note that this typically shouldn't live with any given system definition, but in your own init files or equivalent -- the philosophical point is that asdf the software merely describes the system and (approximately) how to build it, and it's a matter of local or user policy as to where the output files end up.
Best,
Christophe