[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another load path idea

From: Neil Jerram
Subject: Re: Another load path idea
Date: Sat, 21 Jan 2006 09:01:55 +0000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hi,
> Neil Jerram <address@hidden> writes:
>> Well, in the big picture of Guile package development, both of these
>> concepts could be useful.  If I'm understanding you correctly, I would
>> make the analogies that
>> - a .la file is a bit like a formal list of all a package's
>>   dependencies (which in practice might have to be declared by the
>>   package author, or could be detected automatically by code analysis)
>> - is the environment information needed to be able to load
>>   all those dependencies, which is distilled from the .la file.


> I don't see `.la' files as a cache of `'.

Nor do I.  It's the other way round.  (If anything.  Let's not get
hung up on the analogy, because it's not a very good one anyway.)

> You gave several good arguments against try to minimize `%load-path'.
> In fact, I think that the optimization that consists of
> minimizing/bypassing `%load-path' is not very valuable:
> 1. Practically, it seems that traversing even tens of directories to
>    locate a file is cheap compared to actually evaluating code, and, for
>    instance, marking and sweeping;  ;-)
> 2. Just like `$PATH', `$LD_LIBRARY_PATH' and the likes, `%load-path'
>    should is not supposed to contain a lot of directories; currently, it
>    contains 4 items by default, and I guess people will rarely have more
>    than 10 items in it.

Yes, agreed.

> As a conclusion, I'd still be in favor of a single file like this:
> [...]

Basically agreed, but what I now plan precisely is as follows.

1. /etc/guile/${GUILE_EFFECTIVE_VERSION}/load-path.scm

Contains the calculated load path, e.g.


2. Each Guile package installs a file under /etc/guile which contains
   its load path as a single string.

3. guile-config is enhanced so that "guile-config calculate-load-path"
   will recalculate load-path.scm from the installed package files.

Reasons for this arrangement:

1. I think it's nice to make what Guile does at startup as simple as
   possible (even if it's not significant in performance terms).

2. Some distros/installers (such as that on the Nokia 770, to pick an
   example out of the blue :-)) don't support the automatic execution
   of a post-install script.  The above arrangement makes things as
   easy as possible for such platforms: they just need to run
   guile-config manually after the install.

3. Advanced distros/installers may support coalescing the post-install
   steps for multiple packages, which in this case would work very


reply via email to

[Prev in Thread] Current Thread [Next in Thread]