[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Empty entries in $GUILE_LOAD_PATH
From: |
Ludovic Courtès |
Subject: |
Re: Empty entries in $GUILE_LOAD_PATH |
Date: |
Tue, 15 May 2012 19:13:38 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) |
Hi Mark,
Mark H Weaver <address@hidden> skribis:
> address@hidden (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’.