The default for ASDF's *central-registry* in SBCL contains a (let (...) (when ...)) which can and *will* return NIL in some cases (i.e. when an executable SBCL image is run).
On the other hand, sysdef-central-registry-search calls directory-pathname-p on each entry, which assumes that NIL is an invalid entry.
My proposed solution: directory-pathname-p should check that its argument is indeed a pathname designator.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Computerese Irregular Verb Conjugation: I have preferences. You have biases. He/She has prejudices.
Faré wrote:
The default for ASDF's *central-registry* in SBCL contains a (let (...) (when ...)) which can and *will* return NIL in some cases (i.e. when an executable SBCL image is run).
On the other hand, sysdef-central-registry-search calls directory-pathname-p on each entry, which assumes that NIL is an invalid entry.
My proposed solution: directory-pathname-p should check that its argument is indeed a pathname designator.
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?
r
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.
comments? -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter
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.
Hi Faré,
Sounds good. I'll fix it.
On Aug 20, 2009, at 4:43 PM, Faré wrote:
The default for ASDF's *central-registry* in SBCL contains a (let (...) (when ...)) which can and *will* return NIL in some cases (i.e. when an executable SBCL image is run).
On the other hand, sysdef-central-registry-search calls directory-pathname-p on each entry, which assumes that NIL is an invalid entry.
My proposed solution: directory-pathname-p should check that its argument is indeed a pathname designator.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Computerese Irregular Verb Conjugation: I have preferences. You have biases. He/She has prejudices.
asdf-devel mailing list asdf-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel
-- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter