[Asdf-devel] Semantics of asdf:system-relative-pathname

Faré fahree at gmail.com
Thu Sep 4 16:34:05 UTC 2014


On Thu, Sep 4, 2014 at 9:49 AM, Ralf Mattes <rm at mh-freiburg.de> wrote:
>
> Hello list,
>
> I just stumbled overthe following strangeness [1]:
>
>  I've some code in directory foo that contains two asdf files, foo.asd
>  and foo-test.asd, the later contains the following definition:
>
>   (defsystem "foo-test"
>      :version "0.1"
>      :pathname "t"
>      :serial t
>      ..... )
>
>  Now, if I evaluate
>
>    (asdf:system-relative-pathname :foo-test "baz" :type "rsc")
>
>  I get a pathname relative to the _asdf-file_, while evaluating:
>
>    (merge-pathnames "baz.rsc" (slot-value (asdf:find-system :foo-test) 'asdf::absolute-pathname))
>
>  yields the correct/expected pathname (i.e. one that honors the pathname
>  spec. of the asdf system).
>
>  Is this really intended behavior or just an oversight?
>
>   Cheers, Ralf Mattes
>
>  Footnotes:
> [1]  in the sense of not following the principle o fleast astonishment
>
To put it in more "canonical" terms, the issue is that

(asdf:system-source-directory (asdf:find-system "foo-test")) ;=>
#p"/home/ralf/src/foo/"
(asdf:component-pathname (asdf:find-system "foo-test")) ;=>
#p"/home/ralf/src/foo/t/"

Is it the right thing? Should system-relative-pathname use the latter
rather than the former?
I can't say. I don't want to think about these things anymore.
The difference, if it persists, should be documented.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
You don't have to like everything about me, but if you don't love me
the way I am, it's not me you love, only some fantasy of yours.




More information about the asdf-devel mailing list