From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel@gnu.org
Subject: Re: Empty entries in $GUILE_LOAD_PATH
Date: Tue, 15 May 2012 19:13:38 +0200 [thread overview]
Message-ID: <8762bxe5a5.fsf@gnu.org> (raw)
In-Reply-To: <87r4umjsym.fsf@netris.org> (Mark H. Weaver's message of "Mon, 14 May 2012 18:30:57 -0400")
Hi Mark,
Mark H Weaver <mhw@netris.org> skribis:
> ludo@gnu.org (Ludovic Courtès) writes:
>> Try something like:
>>
>> $ GUILE_LOAD_PATH=/foo/bar: make check
>>
>> … and see the LALR tests fail with:
>>
>> ERROR: In procedure primitive-load-path: Unable to find file
>> "home/ludo/src/guile/test-suite/lalr/common-test.scm" in load path
>>
>> (These tests use ‘load’.)
>>
>> Is that expected? What’s the meaning of empty entries in the load path?
>
> It seems to me that a valid load path should never contain empty
> entries, because the empty string is not a valid path.
Apparently ‘search_path’ has always treated "" as the current directory:
$ guile
GNU Guile 2.0.5.132-ff4d3
Copyright (C) 1995-2012 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> (not (not (member "" %load-path)))
$1 = #t
scheme@(guile-user)> (chdir "/etc")
scheme@(guile-user)> (search-path '("") "resolv.conf")
$2 = "resolv.conf"
(Same with 1.8.)
So we probably can’t change that.
>> Should ‘meta/uninstalled-env’ & co. clear $GUILE_LOAD_PATH?
>
> I don't see why it should.
Actually the problem was:
scheme@(guile-user)> (set! %load-path (cons "" %load-path))
scheme@(guile-user)> (with-fluids ((%file-port-name-canonicalization 'relative))
(port-filename (open-input-file "/dev/null")))
$1 = "dev/null"
I just fixed it. Comments welcome!
Thanks,
Ludo’.
next prev parent reply other threads:[~2012-05-15 17:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 14:24 Empty entries in $GUILE_LOAD_PATH Ludovic Courtès
2012-05-14 22:30 ` Mark H Weaver
2012-05-15 17:13 ` Ludovic Courtès [this message]
2012-05-15 18:44 ` Andy Wingo
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=8762bxe5a5.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
--cc=mhw@netris.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).