[Top][All Lists]

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

Re: Another load path idea

From: Andy Wingo
Subject: Re: Another load path idea
Date: Sun, 22 Jan 2006 16:38:36 +0100

Hi Neil,

On Sat, 2006-01-21 at 09:01 +0000, Neil Jerram wrote:
> Basically agreed, but what I now plan precisely is as follows.

Oh good, a summary of this thread of many moons :)

A question though. What is the problem which is being solved here?

In guile-gnome I only really use the load path in one place. That is
that (use-modules (gnome-0)) adds the path for version 0 of the
guile-gnome API to the load path. Before that you cannot import (gnome
gobject), for example, because it's not in the path. Afterwards you can.

This was done this way to allow me to break API in the future, but leave
existing programs still working.

In that sense a global path that adds gnome isn't terribly interesting,
because you have to select the API version in the first place.

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

> Contains the calculated load path, e.g.
> ("/usr/share/guile/1.6"
>  "/usr/share/guile/site"
>  "/usr/share/guile"
>  "/opt/gnome/share/guile") 

As generated by guile-config ... ?

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

What about packages that depend on each other? Is that out of the scope
of this proposal?

I assume you mean /etc/guile/$effective_version

I think requiring users to run a command to fix the cache is an
invitation for bugs. I think it would be sufficient to have a cache in
~/.guile.d/cache, that would effectively hold the output of running
guile-config. That way the normal case is that one only stats the cache,
reads the system path dir, statting entries there, and then if
everything is up to date just load the cache file. That's one readdir,
one file read, and about 5 stats. Not expensive at all.

Perhaps I'm just burned by the fiasco that was gstreamer's gst-register.
Now having gotten rid of it, making the "registry" user-local and with
strict cache semantics, we get no bugs about it.

Sorry to bring up issues this late in the game.

Andy Wingo

reply via email to

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