[asdf-devel] bug in new ASDF
Robert Goldman
rpgoldman at sift.info
Tue Jul 14 13:19:56 UTC 2009
Nikodemus Siivola wrote:
> I haven't really thought about this properly, but why not just:
>
> (defun sysdef-central-registry-search (system)
> (let ((name (coerce-name system)))
> (block nil
> (dolist (dir *central-registry*)
> (let* ((defaults (probe-file (eval dir)))
> (file (when defaults
> (make-pathname
> :defaults defaults :version :newest
> :name name :type "asd" :case :local))))
> (when (and file (probe-file file))
> (return file)))))))
>
> That way, as long as the Lisp and OS agree that the pathname in
> *CENTRAL-REGISTRY* more or less denotes a directory everything should
> just work -- assuming that in sane environments (probe-file
> "/foo/bar") returns something with (:absolute "foo" "bar") in the
> directory component as long as it actually is a directory.
>
> Cheers,
>
> -- Nikodemus
We got led down this rathole by trying to provide more helpful support
to users whose *central-registry* had bad entries in it.
Note, BTW, that what you are proposing runs aground on Allegro, at
least. /Users/rpg/lisp on my machine is a directory, but (probe-file
"/Users/rpg/lisp" does NOT return a pathname with '(:absolute "Users"
"rpg" "lisp"):
ltml(38): (probe-file "/Users/rpg/lisp")
#P"/Users/rpg/lisp"
ltml(39): :i *
A new pathname struct @ #x1017f5d042 = #P"/Users/rpg/lisp"
0 Class --------> #<structure-class pathname>
1 host ---------> The symbol nil
2 device -------> The symbol :unspecific
3 directory ----> (:absolute "Users" "rpg"), a proper list with 3
elements
4 name ---------> A simple-string (4) "lisp"
5 type ---------> The symbol nil
6 version ------> The symbol :unspecific
7 namestring ---> A simple-string (15) "/Users/rpg/lisp"
8 hash ---------> The symbol nil
9 dir-namestring -> The symbol nil
10 plist --------> The symbol nil
This is PRECISELY the sort of case that led to the proposition that
started this chain, I believe. The above pathname would have caused a
continuable error, warning me that I should have written
"/Users/rpg/lisp/" instead of "/Users/rpg/lisp" on ACL....
More information about the asdf-devel
mailing list