[asdf-devel] contradiction in ASDF central-registry default vs code

Robert Goldman rpgoldman at sift.info
Fri Aug 21 16:31:43 UTC 2009


Gary King wrote:
> Hi Robert,
> 
>>
>> I'm inclined to prefer that we rearrange that code block so that the
>> when is pushed upstream, and we simply don't push a NIL onto the
>> *central-registry*.
>>
>> Would that be an acceptable solution?
> 
> 
> I'd rather do it like that too but I don't think it'll work. The trouble
> is the entries are evaluated when searched and ASDF may not know that an
> entry is nil until after it does the evaluation. The entry in question is
> 
>    '(let ((home (sb-ext:posix-getenv "SBCL_HOME")))
>       (when (and home (not (string= home "")))
>         (merge-pathnames "site-systems/" (truename home))))
> 
> and I think that we can't know whether or not this entry is valid until
> after we've put it on the *central-registry*.
> 
> So..., I'm going to set up the iteration so that nil entries are removed
> during the search and leave the SBCL portion as is.
> 
Ah.  I see.  I hadn't read the code in question carefully enough.  I see
now that the forms are evaluated only when the search is done.  This is
necessary so that SBCL can drop these entries onto the list early, and
defer computation of the directories until the image is started.

The clearer case is the following one (which doesn't have the NIL), though:

  (pushnew
   '(merge-pathnames ".sbcl/systems/"
     (user-homedir-pathname))
   *central-registry*)

It's quite obvious here why one wants the computation of
USER-HOMEDIR-PATHNAME to be deferred.

Point taken.




More information about the asdf-devel mailing list