:FEATURE dependency-def
Robert Goldman
rpgoldman at sift.net
Mon May 16 21:56:04 UTC 2016
On 5/16/16 May 16 -4:36 PM, Faré wrote:
> On Mon, May 16, 2016 at 3:35 PM, Robert Goldman <rpgoldman at sift.net> wrote:
>> Is it just me, or is the :FEATURE dependency-def form undocumented in
>> the manual? It is *mentioned* in the grammar, but I don't see it
>> documented -- except for the misleading mention that the :FEATURE
>> *requirement* has been removed from ASDF.
>>
> There were two :FEATURE features. One was braindead and I removed it
> in ASDF3, because it was badly breaking the object model.
Right. I believe that's the one documented as "feature requirement."
Some of this is a problem that arises because we don't have a DEFSYSTEM
*Semantics* section, only a DEFSYSTEM *grammar*.
>
>> 1. if the FEATURE is present, include dependency-def and
>> 2a. If the FEATURE is absent FAIL or
>> 2b. If the FEATURE is absent, quietly succeed.
>>
> 2b. Basically it's a (:when-feature :foocl "foocl-support")
> Maybe it should have been named :when-feature,
> but I believe the name was also from ASDF1, except that that feature
> feature was badly broken and I had to fix it!
OK. I will try to add a subsection about the semantics to the defsystem
grammar page (per my earlier remarks, not ideal, but I'm not ready to
plunge into the end-to-end rewrite and reorg that the manual requires!).
>
>> If the semantics is intended to be the latter -- and that's how I read
>> the relevant code in find-component.lisp -- how does a programmer say
>> "if this feature is not present, my system should not compile"?
>>
> (:feature (:not :foocl) "something_that_fails")
Would it be possible for us to either add something that fails as
(:feature (:not :foocl) :fail)
or perhaps better (the above smells uncomfortably like
:IF-COMPONENT-DEP-FAILS):
(:required-feature <feature-expression>)
"require" is, perhaps unfortunately, a term of art for CL so perhaps
(:must-have-feature <feature-expression>)
would be better....
One more query while I have you on the line:
the grammar still contains this rule:
component-dep-fail-option := :fail | :try-next | :ignore
The LHS of that rule is never referenced, so I propose to cut it.
Thanks for the advice & clarification,
r
More information about the asdf-devel
mailing list