*LOAD-TRUENAME* and ASDF
Robert Goldman
rpgoldman at sift.net
Wed Aug 31 17:09:08 UTC 2016
On 8/31/16 Aug 31 -11:43 AM, Robert Goldman wrote:
> On 8/31/16 Aug 31 -11:26 AM, Kevin Layer wrote:
>> Jason Miller wrote:
>>
>>>> On 09:48 Mon 29 Aug , Kevin Layer wrote:
>>>>> I've avoided getting into this discussion, but I feel I need to ask:
>>>>> why use *load-truename* instead of *load-pathname*?
>>>>>
>>>>> *load-truename* goes through symbolic links (even though the ANS says
>>>>> nothing about it, this is the behavior of implementations I know of)
>>>>> and that is almost always the wrong thing. GNU make doesn't do it, I
>>>>> don't see why ASDF should do it. A build system should never itself
>>>>> follow symlinks, because it defeats systems that have been in place
>>>>> for 30+ years: linked directories of binary files linking to a single
>>>>> source directory.
>>>> Somewhat off-topic, but I'll bite:
>>>>
>>>> This is because *load-pathname* is likely to be a relative
>>>> pathname, ..
>>
>> This is certainly not true in Allegro. In lisps where it is true,
>> it's easily fixable with (merge-pathnames *load-pathname*).
>>
>
> I suppose this is safe, but I always have an unpleasant feeling about
> using a function call like this that depends on the value of a special
> variable (*default-pathname-defaults*) that I don't control.
>
> At any rate, we pretty much established that in an ASDF-loaded system,
> *load-pathname* is likely to be garbagy, because at load time it
> typically holds the pathname of the *RELOCATED* FASL file, which is of
> no use to anyone.
This issue just popped up on the LispWorks users group mailing list, so
I took a few minutes to write a FAQ about it, and pushed it into the manual.
I have updated the manual version on the ASDF web page at
common-lisp.net to hold the new version.
Comments welcome.
More information about the asdf-devel
mailing list