From: Pascal Costanza on
Hi,

In one library, I used *load-pathname* / *load-truename* to find
additional files to load, relative to the location where the library was
found. This worked quite well for a couple of years. Alas, ASDF seems to
have changed the meaning of these two variables (or something) - they
now refer to some automatically created cache directory, where the
resources I'm looking for are, of course, not available. This happened
to me with the new release of ECL that was released two days ago, which
includes a newer version of ASDF.

So: What's the recommended way to locate such resources? (In my
particular case, it's .lisp files in a subfolder, to be loaded and
evaluated by the library - they cannot be declared as part of the system
definition, but have to be found in that folder.)

Any hints are appreciated.

Thanks,
Pascal

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
From: Zach Beane on
Pascal Costanza <pc(a)p-cos.net> writes:

> Hi,
>
> In one library, I used *load-pathname* / *load-truename* to find
> additional files to load, relative to the location where the library
> was found. This worked quite well for a couple of years. Alas, ASDF
> seems to have changed the meaning of these two variables (or
> something) - they now refer to some automatically created cache
> directory, where the resources I'm looking for are, of course, not
> available. This happened to me with the new release of ECL that was
> released two days ago, which includes a newer version of ASDF.
>
> So: What's the recommended way to locate such resources? (In my
> particular case, it's .lisp files in a subfolder, to be loaded and
> evaluated by the library - they cannot be declared as part of the
> system definition, but have to be found in that folder.)

ASDF:SYSTEM-RELATIVE-PATHNAME might help.

Zach

From: joswig on
On 7 Mrz., 12:55, Pascal Costanza <p...(a)p-cos.net> wrote:
> Hi,
>
> In one library, I used *load-pathname* / *load-truename* to find
> additional files to load, relative to the location where the library was
> found. This worked quite well for a couple of years. Alas, ASDF seems to
> have changed the meaning of these two variables (or something) - they
> now refer to some automatically created cache directory, where the
> resources I'm looking for are, of course, not available. This happened
> to me with the new release of ECL that was released two days ago, which
> includes a newer version of ASDF.
>
> So: What's the recommended way to locate such resources? (In my
> particular case, it's .lisp files in a subfolder, to be loaded and
> evaluated by the library - they cannot be declared as part of the system
> definition, but have to be found in that folder.)
>
> Any hints are appreciated.

Time to use another defsystem + logical pathnames?


>
> Thanks,
> Pascal
>
> --
> My website:http://p-cos.net
> Common Lisp Document Repository:http://cdr.eurolisp.org
> Closer to MOP & ContextL:http://common-lisp.net/project/closer/

From: Tim Bradshaw on
On 2010-03-07 11:55:05 +0000, Pascal Costanza said:

>
> So: What's the recommended way to locate such resources? (In my
> particular case, it's .lisp files in a subfolder, to be loaded and
> evaluated by the library - they cannot be declared as part of the
> system definition, but have to be found in that folder.)


I think that, if ASDF copies things so that the *LOAD-x* variables
don't correspond to the original source location, then it should
provide some way of things knowing their original location, so they can
find other bits of themselves - not just other bits of code, but data
and so on. The obvious approach would be to bind some variables like
*ORIGINAL-LOAD-PATHNAME* etc.

(so I guess this is a missing feature in ASDF.)

From: D Herring on
On 03/07/2010 11:37 AM, joswig(a)corporate-world.lisp.de wrote:
> On 7 Mrz., 12:55, Pascal Costanza<p...(a)p-cos.net> wrote:
>> Any hints are appreciated.
>
> Time to use another defsystem + logical pathnames?

Yes, but someone needs to write it first. ;)

In the mean time, I believe Zach gave the correct answer.

- Daniel