make-pathname* and Allegro

Faré fahree at gmail.com
Tue Nov 17 18:34:04 UTC 2015


On Tue, Nov 17, 2015 at 1:11 PM, Kevin Layer <layer at franz.com> wrote:
> We were debugging some problems with an internal system and happened
> to run across this:
>
>   (defun make-pathname* (&rest keys &key (directory nil)
>                                       host (device () #+allegro devicep) name type version defaults
>                                       #+scl &allow-other-keys)
>     "Takes arguments like CL:MAKE-PATHNAME in the CLHS, and
>    tries hard to make a pathname that will actually behave as documented,
>    despite the peculiarities of each implementation"
>     ;; TODO: reimplement defaulting for MCL, whereby an explicit NIL should override the defaults.
>     (declare (ignorable host device directory name type version defaults))
>     (apply 'make-pathname
>            (append
>             #+allegro (when (and devicep (null device)) `(:device :unspecific))
>             keys)))
>
> which is kind of curious, adding :device :unspecific only for
> Allegro.  Tracking it down to see if there were comments in the commit
> that added the change yielded nothing:
>
> commit 1e4bafdbd4200d3a19722699d6a332316b082b2b
[...]
> Does anyone know why this change was made and what problem it fixed?
>
Dear Kevin,

That change was just a reindentation. If you keep going along the git
blame ${VER}^ -- pathname.lisp history, you find that the commit that
introduced this line is 96cecd29 (2.26.85, citing "More pathname
madness for allegro"), but it only generalizes 21594070 (2.26.82,
citing just testing concerns).

So I suppose this change was born in making asdf run at all and pass its tests.

Since these changes predate the introduction of pathname-equal and of
caching file information based on namestring rather than pathname, my
guess is that I was desperately trying to eliminate the discrepancy
between two ways of generating a "same" pathname (say by merging
pathnames and by getting a truename, or using
translate-logical-pathname, or directory, etc.). I remember having to
deal with a LOT of aggravation in this respect, until I found that
semi-portable workaround.

You could remove those lines and see if ASDF still passes its test
suite (make t l=allegro). I'd weakly bet that it does, now that it has
stopped its quixotic quest to normalize pathnames in a portable way.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Democracy is but government of the busy, by the bully, for the bossy.
        — Arthur Seldon, "The Dilemma of Democracy"



More information about the asdf-devel mailing list