[asdf-devel] Issues with logical pathnames in Allegro and clisp
Robert Goldman
rpgoldman at sift.info
Tue Jan 25 19:54:00 UTC 2011
On 1/25/11 Jan 25 -1:40 PM, Pascal Costanza wrote:
>
> On 25 Jan 2011, at 18:57, Robert Goldman wrote:
>
>> On 1/25/11 Jan 25 -7:30 AM, Pascal Costanza wrote:
>>>
>>> On 23 Jan 2011, at 15:27, Pascal Costanza wrote:
>>>
>>>> Hi,
>>>>
>>>> I have encountered two more issues when trying to use ASDF 2 with logical pathnames in Allegro and clisp. I have the following logical pathname translations in Allegro and clisp respectively:
>>>>
>>>> #+allegro
>>>> (setf (logical-pathname-translations "costanza")
>>>> `(("**;*.fasl.*" ,(format nil "/Users/costanza/.cache/common-lisp/~A ~A/**/*.fasl"
>>>> (lisp-implementation-type)
>>>> (read-from-string (lisp-implementation-version))))
>>>> ("**;*.*.*" "/Users/costanza/**/*.*")))
>>>>
>>>> #+clisp
>>>> (progn
>>>> (setq custom:*parse-namestring-ansi* t)
>>>>
>>>> (setf (logical-pathname-translations "costanza")
>>>> `(("**;*.lib.*" ,(format nil "/Users/costanza/.cache/common-lisp/~A ~A/**/*.lib"
>>>> (lisp-implementation-type)
>>>> (read-from-string (lisp-implementation-version))))
>>>> ("**;*.fas.*" ,(format nil "/Users/costanza/.cache/common-lisp/~A ~A/**/*.fas"
>>>> (lisp-implementation-type)
>>>> (read-from-string (lisp-implementation-version))))
>>>> ("**;*.*.*" "/Users/costanza/**/*.*"))))
>>>>
>>>>
>>>> When compiling systems with ASDF, however, the fasl, lib and fas files don't end up in the folders designated by these logical pathname translations, but rather in the locations as specified with ASDF output translations. (In CMUCL, Clozure, ECL, LispWorks, RMCL, and SBCL, similar logical pathname translations work as expected.)
>>>
>>> I have found the bug that causes this for Allegro, and am relatively sure what problem in clisp causes this.
>>>
>>> For Allegro, the following patch fixes the problem:
>>>
>>> (defun* resolve-symlinks (path)
>>> #-allegro (truenamize path)
>>> #+allegro (if (typep path 'logical-pathname)
>>> path
>>> (excl:pathname-resolve-symbolic-links path)))
>>>
>>
>> Will you please provide some commenting to explain why this is the right
>> thing to do here? To the extent that I understand this, it says
>> "resolve symlinks should not do anything to a logical pathname."
>>
>> Is that the correct behavior for RESOLVE-SYMLINKS? If so,
>>
>> 1. is it what automagically happens for the other lisp implementations.
>
> Yes. The first thing truenamize does is check whether it's argument is a
> logical pathname, and if that's the case, it returns it unchanged.
OK, possibly stupid follow-up question: if that is the case, is there
some reason why the call to excl:pathname-resolve-symbolic-links path
isn't pushed into TRUENAMIZE instead of sitting out here in resolve
symlinks?
For that matter, it seems like resolve-symlinks is simply an alias for
TRUENAMIZE, yes? If so, then aren't we doing the wrong thing by having
RESOLVE-SYMLINKS now do something different on Allegro than TRUENAMIZE does?
thanks,
r
More information about the asdf-devel
mailing list