[asdf-devel] How should ASDF return cached system definition information

Robert P. Goldman rpgoldman at sift.info
Sat Feb 22 00:49:32 UTC 2014


Faré wrote:
>> This resolve-dependency-spec returns the actual system objects for depended on systems, doesn't it?  Hence the possible side effects.
>>
> Yes.
>
>> I was thinking of the much simpler expedient of traversing the dependency s-expressions and using COERCE-NAME on all the system names.  That gives us something that is canonical, but that functions when there are missing systems (e.g., this system weakly-depends-on <that>, but <that> isn't present), and is computed without side-effects.
>>
>> I just felt like fixing this in ASDF would be better than requiring the caller to do it.
>>
> You could do that in the common case, I suppose, but the user would
> still have to call resolve-dependency-spec in the general case, since
> the protocol is extensible. Making it appear like the name has been
> resolved when it hasn't been is probably a lure that will invite
> people to do the wrong thing and get bitten — more efforts for
> negative return on investment.

Hmmmm....
The thing I don't like is to have some large number of half-baked bits of code that all do some buggy bit of tree recursion to make sure that they recognize that

:depends-on (foo) ; foo in some package
:depends-on ("foo") ; string
:depends-on (:foo) 

are all the same thing.  Failing to do that for the caller seems like we are providing a bad API.

I figured since "foo" is the internal form, (list "foo") should be the return for all three of the above cases.

If you call resolve-dependency-spec on

:weakly-depends-on (:blort)

when blort isn't present, don't we get a bad result that foils the intent of using system-weakly-depends-on as an introspection tool?

Thanks,
r




More information about the asdf-devel mailing list