:FEATURE dependency-def

Didier Verna didier at lrde.epita.fr
Tue May 17 08:18:04 UTC 2016


Robert Goldman <rpgoldman at sift.net> écrivait:

> I stubbed my toe on this absent-mindedly compiling Didier's decLt
> system on Allegro Common Lisp.  That system doesn't, and cannot,
> function on ACL, but ASDF tells us it has compiled successfully.

  Following up to our private conversation on this...

I think there's an error on my part to begin with. The core system of
Declt has an :if-feature :sbcl, which prevents it from being loaded
outside SBCL. This is mostly what's needed, but I hadn't realized that
it /silently/ does so, instead of throwing an error if the feature is
absent.

So the question is: can I declaratively state that a system (or maybe
more generally a component) depends on a feature, so that loading fails
with an error otherwise ? I don't currently see a way.

In fact, it seems to me that the current :depends-on (:feature :this :that)
syntax is a misnomer. Perhaps it would have been more explicit to write
:depends-on (:if-feature :this :that) in order to express that the
conditional actually may fail silently.

Now, what about extending the syntax with: :depends-on (:feature :this)
to actually mean "if :this is not on the features list, fail with an
error"?

-- 
Resistance is futile. You will be jazzimilated.

Lisp, Jazz, Aïkido: http://www.didierverna.info



More information about the asdf-devel mailing list