user-homedir-pathname on cmucl
Robert Goldman
rpgoldman at sift.net
Sun Dec 20 21:49:35 UTC 2015
On 12/20/15 Dec 20 -12:14 PM, Raymond Toy wrote:
>>>>>> "Robert" == Robert Goldman <rpgoldman at sift.net> writes:
>
> Robert> On 12/19/15 Dec 19 -2:32 PM, Raymond Toy wrote:
> >>
> >> Not sure how this ever worked with cmucl, but user-homedir-pathname on
> >> cmucl returns #p"home:", where "home:" is a search-list. In some
> >> cases, it looks like asdf is trying to create the cache directory and
> >> end up with a path like
> >>
> >> P"home:.cache/common-lisp/cmu-21a__21a_unicode_-macosx-x86/**/*.*.~*~"
> >>
> >> but this confuses other parts of asdf and cmucl when trying to run
> >> pathname-match-p.
> >>
> >> Perhaps the best thing is to make asdf us a custom
> >> user-homedir-pathname like what is done with other lisps. An
> >> appropriate version would be
> >>
> >> (defun user-homedir-pathname ()
> >> (first (ext:search-list (cl:user-homedir-pathname))))
>
> Robert> Hi, Ray --
>
> Robert> I will be happy to make this modification.
>
> Robert> Can you provide a test that will barf when using the current, incorrect
> Robert> form of user-homedir-pathname?
>
> Here's a really simple test:
>
> (defun test ()
> (pathname-match-p (cl:user-homedir-pathname)
> (first (ext:search-list
> (cl:user-homedir-pathname)))))
Hm. That doesn't seem like a good test for me to add to the suite
because it fails for me even after I have applied your patch.
I think what we want is this, right?
(defun test () (pathname-match-p
(uiop/common-lisp:user-homedir-pathname) (first (ext:search-list
(cl:user-homedir-pathname)))))
that fails on master, and passes with your patch.
It's not particularly clear to anyone who's not familiar with CMUCL. Is
there a way to illustrate the issue without reference to
EXT:SEARCH-LIST? Or can you provide a comment for this? If I just drop
this form into the test suite, I foresee it creating great confusion for
some poor shlub (possibly me) who reads in > 6 months from now....
Looking at the context in which the error occurs (if I'm right), I think
it's in APPLY-OUTPUT-TRANSLATIONS in output-translations.lisp.
It seems like we're doing *SOMETHING* with USER-HOMEDIR-PATHNAME
followed by merging that causes PATHNAME-MATCH-P in this function to
error out.
But to be honest, I have no idea what's going wrong, or why it's ASDF's
fault. If you merge a pathname with USER-HOMEDIR-PATHNAME's return
value, it seems to me you ought to be able to call PATHNAME-MATCH-P on
the result.
It seems like you're saying it's something about the way that
search-lists deal with nonexistent directories. Is that right?
Or is this because when we merge we aren't appropriately creating
something that's a wildcard pathname?
Pretty lost here, actually.
Thanks,
r
More information about the asdf-devel
mailing list