*LOAD-TRUENAME* and ASDF

Robert Goldman rpgoldman at sift.net
Tue Aug 30 20:53:44 UTC 2016


On 8/30/16 Aug 30 -3:46 PM, 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, and
> relative pathnames have their own problems.  The unix way of solving it
> is to transform relative pathnames with "$PWD/pathname" but I don't
> believe there is a builtin facility for doing the equivalent in common
> lisp, nor did I find one in a quick look throug uiop/pathname.
> 

There is a method for doing this, but it's done through
*default-pathname-defaults*

The problem is that the Unix way relies on the current working
directory, but *default-pathname-defaults* is populated in a
domain-dependent way.

Rant: As with non-CL software, it's amazing how many people assume that
you will be running their software in the way they do, typically from
the directory where the code is located.  I cannot tell you how much
aggregate time I have spent over the years hardening other people's
software against violations of this assumption.  Please folks, remember
that even *I* may not know the working directory of my SLIME instance,
so *you* cannot count on it!



More information about the asdf-devel mailing list