From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: Another load path idea Date: Sun, 22 Jan 2006 16:38:36 +0100 Message-ID: <1137944316.15250.29.camel@localhost.localdomain> References: <877j9cnoh4.fsf@ossau.uklinux.net> <87oe2hss4d.fsf@laas.fr> <87mzi1jq8j.fsf@ossau.uklinux.net> <87psmobmju.fsf@laas.fr> <87veweeyyk.fsf@ossau.uklinux.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1138144746 17337 80.91.229.2 (24 Jan 2006 23:19:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Jan 2006 23:19:06 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jan 25 00:19:04 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F1XRB-0000C2-7s for guile-user@m.gmane.org; Wed, 25 Jan 2006 00:18:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1XSi-0006rh-G5 for guile-user@m.gmane.org; Tue, 24 Jan 2006 18:20:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F1X6C-0006Xa-JT for guile-user@gnu.org; Tue, 24 Jan 2006 17:57:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F1X69-0006Vz-OZ for guile-user@gnu.org; Tue, 24 Jan 2006 17:57:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F1WZq-0001pW-2o for guile-user@gnu.org; Tue, 24 Jan 2006 17:23:50 -0500 Original-Received: from [216.27.85.7] (helo=kettle.ambient-hosting.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1F1UlH-0006la-DD for guile-user@gnu.org; Tue, 24 Jan 2006 15:27:31 -0500 Original-Received: from localhost.localdomain (ambient-hosting.net [10.1.6.1]) by kettle.ambient-hosting.net (Postfix) with ESMTP id 22C4788079 for ; Tue, 24 Jan 2006 15:18:34 -0500 (EST) Original-Received: by localhost.localdomain (Postfix, from userid 1000) id E5FB51182C8; Sun, 22 Jan 2006 16:38:36 +0100 (CET) Original-To: guile-user@gnu.org In-Reply-To: <87veweeyyk.fsf@ossau.uklinux.net> X-Mailer: Evolution 2.5.4 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5092 Archived-At: 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. Regards, -- Andy Wingo http://wingolog.org/ _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user