[Top][All Lists]

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

Re: Adding to the end of the load path

From: Mark H Weaver
Subject: Re: Adding to the end of the load path
Date: Thu, 15 Nov 2012 17:44:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi Andreas,

Andreas Rottmann <address@hidden> writes:

> address@hidden (Ludovic Courtès) writes:
>> I pretty much like Mark’s suggestion of using ‘...’ as a special marker,
>> even though that’s a valid file name.
> Well, there's a workaround -- specifying "./..." as an "escape sequence"
> for "..." if you really need to have a three-dot relative directory in
> the path.
>> How would that work for you?
> I would like the approach using separate _SUFFIX variables better, as it
> doesn't have this special case.

As I wrote earlier, I certainly agree that the _SUFFIX approach is
cleaner.  Unfortunately, we need a solution that will work nicely with
earlier versions of Guile.

> While I don't think the special case
> will be a problem for a user setting the environment variables
> themselves, if you want to set them programatically, you now have to
> consider treat "..." specially, escaping it like mentioned above, to be
> general.

Note that PATH-style variables are already not general, because they
provide no way to include filenames containing ':' (a colon).

In general, it's best to avoid setting GUILE_LOAD_PATH programmatically,
because it will affect more than just the instance of Guile you
intended; it will also affect any subprocesses that use Guile.  It's
better to use -L which is fully general without any special cases, or to
modify %load-path within the program itself.

> However, I can live with that, but maybe we can have it both
> ways:
> - Add the _SUFFIX environment variables, making it clear in the docs
>   that they are supported only from Guile 2.0.7 onward.

Yes, I agree this is a good idea.

> - Additonally, add "..." as a special marker, but mention it is just
>   provided to support Guile < 2.0.7, and should not be used in code that
>   needs to depend on Guile 2.0.7 or newer for other reasons
>   (e.g. reliance on another added feature or significant bugfix).

Again, these environment variables are not specific to any particular
piece of code.  They are usually associated with an entire user account.

> I'm not sure how the deprecation strategy is employed exactly, but we
> could mark the "..." feature as deprecated right away, or at least in
> master, and remove it in 2.2 or 2.4.

I don't think we can mark it deprecated until versions of Guile older
than 2.0.7 have become very rare, which won't be until at least 2017
(due to Ubuntu 12.04 LTS), and then it will need to be deprecated for a
couple more years before we can get rid of it entirely.  Therefore, I
think it's premature to emphasize the transient nature of the "..."
marker.  Like it or not, we'll probably be stuck with it for 7 or 8

Does that make sense?


reply via email to

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