unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Andreas Rottmann <a.rottmann@gmx.at>
Cc: Ian Price <ianprice90@googlemail.com>, guile-devel@gnu.org
Subject: Re: Adding to the end of the load path
Date: Sun, 11 Nov 2012 16:51:42 -0500	[thread overview]
Message-ID: <87390f95ap.fsf@tines.lan> (raw)
In-Reply-To: <87a9uo7yk5.fsf@delenn.home.rotty.xx.vu> (Andreas Rottmann's message of "Sun, 11 Nov 2012 20:02:34 +0100")

Andreas Rottmann <a.rottmann@gmx.at> writes:

> Mark H Weaver <mhw@netris.org> writes:
>
>> I'm also not comfortable with having the empty string be the special
>> marker separating the prepend and append portions of the path.  As you
>> noted in your earlier email, the empty string is currently interpreted
>> as the current directory, and users may have come to rely on that.
>>
>> If we do this, I think the special marker should be a path component
>> that is highly unlikely to occur in practice.  Some ideas off the top of
>> my head are: "...", "*", or " ".  I think I like "..." best.
>>
>> What do you think?
>>
> Another idea would be to use an additional environment variable,
> e.g. GUILE_LOAD_{COMPILED_,}_PATH_SUFFIX.  If we cannot use the empty
> string as special token, I'd prefer introducing additional environment
> variables.

This is certainly the cleanest solution, but there is a complication: if
a user has multiple versions of Guile installed on their system, some of
which look for GUILE_LOAD_PATH_SUFFIX and some which do not, there is no
way for them to configure their environment variables that will work
correctly for all versions.  Guile 2.0.5 will be widely deployed until
at least 2017, since it is part of Ubuntu 12.04 LTS.  We have to cope
with that somehow.

With the "special path component" approach, a user can configure their
GUILE_LOAD_PATH properly today, and it will behave reasonably well on
all versions of Guile.  For older versions of Guile, it will prepend all
components to the path, including the special token which adds two
stat(2) calls per module-load but is otherwise harmless.  For newer
versions, it will do what we want.

Although not as elegant as I'd like, this seems to be the only workable
solution to our problems regarding SRFIs in Guildhall.  It means that we
can immediately start asking users to put "..." in their GUILE_LOAD_PATH
when configuring Guildhall.  The fact that older versions of Guile will
prepend _all_ path components is not a problem, because our Guildhall
repositories we include only SRFIs that are not yet included in core
Guile.  The additional functionality will start working precisely when
it needs to, because only future versions of Guile will include SRFIs
that are also included in Guildhall.

What do you think?

If we can come up with a more elegant solution to this problem that
works with both old and new versions of Guile, I'm open to suggestions.

    Regards,
      Mark



  reply	other threads:[~2012-11-11 21:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-05  3:18 Adding to the end of the load path Ian Price
2012-11-08  1:03 ` Andreas Rottmann
2012-11-11  7:50   ` Mark H Weaver
2012-11-11 19:02     ` Andreas Rottmann
2012-11-11 21:51       ` Mark H Weaver [this message]
2012-11-12 16:35         ` Bruce Korb
2012-11-13 21:04   ` Ludovic Courtès
2012-11-15 22:06     ` Andreas Rottmann
2012-11-15 22:37       ` Ludovic Courtès
2012-11-15 22:44       ` Mark H Weaver
2012-11-15 23:06         ` Ludovic Courtès
2012-11-16  0:10         ` Noah Lavine
2012-11-16 14:00           ` Noah Lavine
2012-11-16 18:06           ` Bruce Korb
2012-11-16 18:52           ` Mark H Weaver
2012-11-16 21:38             ` Noah Lavine
2012-11-28 23:12     ` [PATCH] Add parse-path-with-ellipsis, and use it for GUILE_LOAD_PATH et al Mark H Weaver
2012-11-28 23:46       ` Ludovic Courtès
2012-11-29  3:04         ` Mark H Weaver
2012-11-29 10:27           ` Ludovic Courtès

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=87390f95ap.fsf@tines.lan \
    --to=mhw@netris.org \
    --cc=a.rottmann@gmx.at \
    --cc=guile-devel@gnu.org \
    --cc=ianprice90@googlemail.com \
    /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).