[asdf-devel] ASDF with RMCL?
Pascal Costanza
pc at p-cos.net
Sat Jan 22 20:12:55 UTC 2011
The reason why I'm having problems is probably because I want to create a setup that works the same for all the Common Lisp implementations that I'm using. (I'm the maintainer of Closer to MOP, and this requires regular testing on several CL implementations, including RMCL, which is still in use by several parties.)
At the moment, there are only two options to make RMCL work with ASDF 2, as far as I can tell. One is to exclusively use logical pathnames, but that requires setting up the same logical pathname translations for all the other CL implementations, as far as I can tell. (Maybe this also has other implications, but I cannot tell, because I haven't dived deeper in that direction.)
The other option is to use *central-registry*, but one goal for me was to switch to the new recommended configuration options. Referring to section 7.1 of the ASDF user manual, none of the options described there seem to work with RMCL, as far as I can tell, because ASDF 2 seems to make strong assumptions about what physical pathnames are supposed to look like (basically, Unixy), and these assumptions simply don't hold at all for RMCL.
I figured out a hack that is workable for me at the moment, which consists of adding the following to my init.lisp for RMCL:
(let ((exp (with-open-file (s #P"Macintosh HD:Users:costanza:.config:common-lisp:source-registry.conf")
(read s))))
(labels ((traverse (exp)
(typecase exp
(cons (case (car exp)
(:home (push (concatenate
'string
"Macintosh HD:Users:costanza:"
(substitute #\: #\/ (cadr exp))
":")
asdf:*central-registry*))
(t (traverse (car exp))
(traverse (cdr exp)))))
(t '()))))
(traverse exp)))
This converts one particular configuration file into a form that is understood by *central-registry*. The binaries are then stored in some subfolder of the RMCL folder, but that's ok. This is all not beautiful, but it works.
Note that I'm not trying to put any pressure on anybody to fix this for me. I know that such portability issues are very difficult to deal with, and it's already amazing how well ASDF 2 works in that regard.
But please don't remove support *central-registry* in a future version of ASDF, unless you make the rest more portable.
Any comments about what I may be missing, or suggestions for better workarounds, are of course welcome.
Thanks a lot,
Pascal
On 21 Jan 2011, at 15:50, Chun Tian (binghe) wrote:
> Strange, I do have ASDF2 loaded into RMCL 5.2.1, and just loaded two ASDF packages, but:
>
> ? (user-homedir-pathname)
> #4P"home:"
> ? (truename *)
> #P"Snow Leopard:Users:binghe:Lisp:RMCL 5.2.1:"
>
> Seems everything is fine on my side ...
>
> --binghe
>
> 在 2011-1-21,18:29, Pascal Costanza 写道:
>
>> Hi,
>>
>> Thanks a lot to Chun Tian (binghe) and you already!!!
>>
>> However, it looks like this is going to be a lot more work:
>>
>> - After loading ASDF and trying to load a system, I get the following error:
>>
>>> Error: File #4P"home:" does not exist.
>>> While executing: TRUENAME
>>
>> ...which is triggered again by the following:
>>
>> 1 > (truename (user-homedir-pathname))
>>> Error: File #4P"home:" does not exist.
>>> While executing: TRUENAME
>>
>> Translating the user-homedir-pathname in a different way yields the following:
>>
>> 2 > (translate-logical-pathname (user-homedir-pathname))
>> #P"Macintosh HD:Users:costanza:lisp:RMCL 5.2.1:"
>>
>> This is probably because Mac OS 9 didn't know about home directories.
>>
>> When I try truename before attempting to load any system, I get the following:
>>
>> ? (truename (user-homedir-pathname))
>> #P"Macintosh HD:Users:costanza:lisp:RMCL 5.2.1:"
>
--
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel
Software Languages Lab
Pleinlaan 2, B-1050 Brussel, Belgium
More information about the asdf-devel
mailing list