From: ludovic.courtes@laas.fr (Ludovic Courtès)
Cc: guile-user@gnu.org
Subject: Re: Managing Guile and extensions versions
Date: Thu, 29 Sep 2005 17:34:37 +0200 [thread overview]
Message-ID: <871x3728he.fsf@laas.fr> (raw)
In-Reply-To: <6efab235050928131950e30e8c@mail.gmail.com> (Vorfeed Canal's message of "Thu, 29 Sep 2005 00:19:34 +0400")
Hi Vorfeed,
Vorfeed Canal <vorfeed.canal@gmail.com> writes:
> 4. Actual contents of default directory list is not important. Only
> two requirements:
> A. It must not be empty - this way there are place to put default
> libraries like readline.
> B. It must be modifyable at runtime - this way complex program (like
> Gnumeric or
> Gnucash) can keep it's private libraries private and not pollute
> default directory.
Right.
> In short: do not bother too much with understanding of my default
> locations choice.
Sure.
So, I'm all in favor of having your patch (or something equivalent)
applied. I guess you'll need to /kindly/ ask the developers for further
reviewing and see what needs to be done so that it can actually be
applied.
> I did so as well, but surprisingly it's VERY minor issue: since it's
> determined by GUILE_SITE_DIR and then by guile-config you can change
> this default quite easily WITHOUT changing third-part extensions code!
This is true since `GUILE_SITE_DIR' is already widely used. In fact,
the right way to do it would probably be to have:
1. `%site-dir' (and obviously `GUILE_SITE_DIR') return
`${datadir}/guile/MAJOR.MINOR/site';
2. `%load-path' include both `${datadir}/guile/MAJOR.MINOR/site' _and_
`${datadir}/guile/site' (in this order).
> Nope. You *can* *not* use them to solve (1). Trivial REAL WORLD
> sample: university system where you can only install stuff in your own
> home directory.
Yes you can: have third-party C libraries use Guile's version info.
IOW, add `-version-info
$LIBGUILE_INTERFACE_CURRENT:$LIBGUILE_INTERFACE_REVISION:$LIBGUILE_INTERFACE_AGE'
to your LDFLAGS.
However, this would not permit extension developers to use
`-version-info' for their own versioning purposes, so it sucks.
> Yes, it'd be quite nice to allow both (1) and (2). But!
> 1. It'll require major redesign or libtool (actual shared library is
> versioned, but .la file is not).
I don't think so but that discussion belongs to `libtool@'.
> 2. Crude yet effective substitute usually enough: just add something
> like "v2" to name of extension (like glib vs glib2). Not elegant but
> it works...
Remember: that's what `libguile-readline' already does. You might want
to re-read your email answer to my suggesting such workarounds. :-)
> In fact I'm not even sure this problem need solution! Think about it:
> if we'll allow this we should allow two version of, for example (web
> serialize) module. This means we'll be forced to develop some
> versioning for scheme modules as well. A lot of work for unknown
> benefit: in RARE cases where you really need two versions of the same
> module you can cope with %load-path/%load-libpath tricks.
"Lack of vision" you said earlier, right?
I believe Scheme module versioning would be beneficial, although I have
lived without it so far. Anyway, a quite straightforward solution (at
first sight, at least) would be something like:
(define-module (my-module)
#:version/current 2
#:version/age 1
#:version/revision 4)
And:
(use-modules ((my-module) #:interface 1))
This would look for `my-module.scm' in the directories of `%load-path'
and only import bindings from the first one (for instance) that
implements version 1 of the interface, in pure Libtool style. And
AFAICS, this wouldn't introduce any compatibility issue: both versioned
and unversioned modules and module users could peacefully coexist.
That may add some overhead in the rare case where a significant number
of different versions of a module are available, since Guile needs to
load each module before knowing whether it matches the constraint.
Hmm... In fact, that may be much more complicated than it seems since
`resolve-module' relies on `nested-ref' to find a module, and since
there can only be one module bound to a given name...
Thanks,
Ludovic.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2005-09-29 15:34 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-25 21:50 PHP to GUILE Vorfeed Canal
2005-09-26 1:42 ` Kevin Ryde
2005-09-26 7:27 ` Zeeshan Ali
2005-09-26 8:17 ` Vorfeed Canal
2005-09-26 17:57 ` Zeeshan Ali
2005-09-26 19:05 ` Vorfeed Canal
2005-09-26 19:34 ` Zeeshan Ali
2005-09-26 7:43 ` Vorfeed Canal
2005-09-26 11:17 ` Thien-Thi Nguyen
[not found] ` <6efab23505092609331abd82b7@mail.gmail.com>
2005-09-26 16:34 ` Vorfeed Canal
2005-09-26 22:12 ` Thien-Thi Nguyen
2005-09-27 10:11 ` Vorfeed Canal
2005-09-27 12:48 ` Thien-Thi Nguyen
2005-09-27 14:36 ` Vorfeed Canal
2005-09-27 17:13 ` Thien-Thi Nguyen
2005-09-27 17:47 ` Vorfeed Canal
2005-09-27 19:44 ` Thien-Thi Nguyen
2005-09-26 12:23 ` Exceptions Ludovic Courtès
2005-09-26 19:20 ` Exceptions Vorfeed Canal
2005-09-27 8:42 ` Exceptions Ludovic Courtès
2005-09-27 10:54 ` Exceptions Vorfeed Canal
2005-09-27 15:45 ` Exceptions Ludovic Courtès
2005-09-27 17:18 ` Exceptions Vorfeed Canal
2005-09-28 7:10 ` Managing Guile and extensions versions Ludovic Courtès
2005-09-28 20:19 ` Vorfeed Canal
2005-09-29 15:34 ` Ludovic Courtès [this message]
2005-09-29 16:30 ` Vorfeed Canal
2005-09-30 22:07 ` Neil Jerram
2005-10-19 7:58 ` Rob Browning
2005-09-29 22:24 ` Kevin Ryde
2005-09-30 8:00 ` Ludovic Courtès
2005-10-02 1:59 ` Kevin Ryde
[not found] ` <6efab2350510020425j76899e29hec6ea7e3dcce6c3@mail.gmail.com>
2005-10-03 1:58 ` Kevin Ryde
2005-10-04 11:06 ` Vorfeed Canal
2005-10-04 23:58 ` Kevin Ryde
2005-10-05 14:18 ` Vorfeed Canal
2005-10-09 1:53 ` Kevin Ryde
2005-10-11 10:20 ` Vorfeed Canal
2005-10-11 14:56 ` Greg Troxel
2005-10-11 21:32 ` Kevin Ryde
2005-10-03 12:58 ` Ludovic Courtès
2005-09-26 19:37 ` PHP to GUILE Neil Jerram
[not found] ` <6efab235050926131843ce69e2@mail.gmail.com>
2005-09-26 20:18 ` Vorfeed Canal
2005-09-26 22:39 ` Kevin Ryde
2005-09-27 9:20 ` Vorfeed Canal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871x3728he.fsf@laas.fr \
--to=ludovic.courtes@laas.fr \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).