GNU bug report logs - #10693
guild compile --load-path value is not processed with scm_parse_path, GUILE_LOAD_PATH env variable value is parsed.

Previous Next

Package: guile;

Reported by: Ian Hulin <ian <at> hulin.org.uk>

Date: Thu, 2 Feb 2012 00:48:01 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10693 in the body.
You can then email your comments to 10693 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#10693; Package guile. (Thu, 02 Feb 2012 00:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ian Hulin <ian <at> hulin.org.uk>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Thu, 02 Feb 2012 00:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ian Hulin <ian <at> hulin.org.uk>
To: bug-guile <at> gnu.org
Subject: guild compile --load-path value is not processed with scm_parse_path, 
	GUILE_LOAD_PATH env variable value is parsed.
Date: Thu, 02 Feb 2012 00:46:34 +0000
Using this small test file load-path-test.scm using
meta/uninstalled-env bash with V2.0.5:

(eval-when (compile load eval)
(format #t "version: ~s\n" (version) )
(format #t "%load-path: ~s\n" %load-path)
(format #t "(access? (%search-load-path \"c++.scm\"): ~s\n"
  (%search-load-path "c++.scm")))

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 


1. Loading the test file (no extra %load-path items)

ian <at> nanny-ogg ~/src/lilypond (T2026-1)>> guile -l load-path-test.scm
;;; note: source file /home/ian/src/lilypond/load-path-test.scm
;;;       newer than compiled
/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5/cache/guile/ccache/2.0-LE-4-2.0/home/ian/src/lilypond/load-path-test.scm.go
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/ian/src/lilypond/load-path-test.scm
version: "2.0.5"
%load-path:
("/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5/module"
"/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5/guile-readline"
"/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5")
(access? (%search-load-path "c++.scm"): #f
;;; compiled
/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5/cache/guile/ccache/2.0-LE-4-2.0/home/ian/src/lilypond/load-path-test.scm.go
version: "2.0.5"
%load-path:
("/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5/module"
"/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5/guile-readline"
"/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5")
(access? (%search-load-path "c++.scm"): #f
# ^^^^^^^^^not found, not in %load-path - correct ^^^^^^^^^^^^
GNU Guile 2.0.5
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)> ,q
ian <at> nanny-ogg ~/src/lilypond (T2026-1)>>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 

2. Loading the test file (extra %load-path items specified with
GUILE_LOAD_PATH environment variable)
ian <at> nanny-ogg ~/src/lilypond (T2026-1)>> env
GUILE_LOAD_PATH="/home/ian/src/lilypond:/home/ian/src/lilypond/scm"
guile -l load-path-test.scmversion: "2.0.5"
%load-path:
("/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5"
"/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5/guile-readline"
"/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5/module"
"/home/ian/src/lilypond" "/home/ian/src/lilypond/scm")
#^^^^^^^^ env variable contents parsed with scm_parse_path ^^^^^^^^^^^
(access? (%search-load-path "c++.scm"):
"/home/ian/src/lilypond/scm/c++.scm"
#^^^^^^^^^^^^^^^^ file found - correct ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GNU Guile 2.0.5
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)> ,q


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 

3. Using guild-compile

ian <at> nanny-ogg ~/src/lilypond (T2026-1)>> guild compile
--load-path="/home/ian/src/lilypond:/home/ian/src/lilypond/scm"
--output=scm/out/load-path-test.go load-path-test.scm
version: "2.0.5"
%load-path: ("/home/ian/src/lilypond:/home/ian/src/lilypond/scm" "/home
# ^^^^^^^^^^^^^option string not parsed ^^^^^^^^^^^^^^^^^^^
/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5/module"
"/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5/guile-readline"
"/home/ian/Dropbox/Development/Guile-and-Scheme/guile-2.0.5")
(access? (%search-load-path "c++.scm"): #f
#^^^^^^^^^^^^^^ file not found in %load-path^^^^^^^^
wrote `scm/out/load-path-test.go'
ian <at> nanny-ogg ~/src/lilypond (T2026-1)>>

I get similar results using installed V2.0.5 on my laptop.

Cheers,

Ian Hulin








Information forwarded to bug-guile <at> gnu.org:
bug#10693; Package guile. (Thu, 02 Feb 2012 05:09:02 GMT) Full text and rfc822 format available.

Message #8 received at 10693 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Ian Hulin <ian <at> hulin.org.uk>
Cc: 10693 <at> debbugs.gnu.org
Subject: Re: bug#10693: guild compile --load-path value is not processed with
	scm_parse_path, GUILE_LOAD_PATH env variable value is parsed.
Date: Thu, 02 Feb 2012 00:05:52 -0500
Hi Ian,

Ian Hulin <ian <at> hulin.org.uk> writes:
> ian <at> nanny-ogg ~/src/lilypond (T2026-1)>> guild compile
> --load-path="/home/ian/src/lilypond:/home/ian/src/lilypond/scm"

According to both the Guile manual and the output of "guile compile -h":

  -L, --load-path=DIR   add DIR to the front of the module load path

In other words, it behaves as documented.  The idea is that you should
pass multiple --load-path options, one for each DIR.

Having said this, one could reasonably argue that the long option name
is misleading, and I tend to agree.  On the other hand, the current
behavior has the advantage of allowing _any_ directory to be added, even
if its name contains a colon, and thus allows the creation of more
robust code.

We might want to change the long option name (while continuing to accept
--load-path for backward compatibility), but I can't think of a good
name.  Any suggestions?

    Thanks,
      Mark




Information forwarded to bug-guile <at> gnu.org:
bug#10693; Package guile. (Thu, 02 Feb 2012 21:00:01 GMT) Full text and rfc822 format available.

Message #11 received at 10693 <at> debbugs.gnu.org (full text, mbox):

From: Ian Hulin <ian <at> hulin.org.uk>
To: 10693 <at> debbugs.gnu.org
Subject: Re: bug#10693: guild compile --load-path value is not processed with
	scm_parse_path, GUILE_LOAD_PATH env variable value is parsed.
Date: Thu, 02 Feb 2012 20:59:13 +0000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(Copy of reply sent to Mark alone by mistake)
Hi Mark
On 02/02/12 05:05, Mark H Weaver wrote:
> Hi Ian,
> 
> Ian Hulin <ian <at> hulin.org.uk> writes:
>> ian <at> nanny-ogg ~/src/lilypond (T2026-1)>> guild compile 
>> --load-path="/home/ian/src/lilypond:/home/ian/src/lilypond/scm"
> 
> According to both the Guile manual and the output of "guile compile
> -h":
> 
> -L, --load-path=DIR   add DIR to the front of the module load path
> 
> In other words, it behaves as documented.  The idea is that you
> should pass multiple --load-path options, one for each DIR.
> 
> Having said this, one could reasonably argue that the long option
> name is misleading, and I tend to agree.  On the other hand, the
> current behavior has the advantage of allowing _any_ directory to
> be added, even if its name contains a colon, and thus allows the
> creation of more robust code.
> 
> We might want to change the long option name (while continuing to
> accept --load-path for backward compatibility), but I can't think
> of a good name.  Any suggestions?
> 
- --add-to-load-path, then it matches the new procedure/macro that does
the same thing?

Note too that the guile command line does not have a long option name
for -L.

Also, how about documenting somewhere the difference in behaviour
between setting the environment variable and using the long option name.

Thanks very much for pointing out the bear-traps, Mark.

Cheers,

Ian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPKvkhAAoJEBqidDirZqAShiUIAJEy0qTxa9nfOTsidTG5DGmM
CM0rvAOUPoBii39nUNX/vkpBtTPWRLerY7QhTVPNMNbu7T7+rify12KwDxYaz/bM
8CDXYzYD7ypTiBHYlJ4ZJaGPt+CZs7PR9JobtaGT3AuRx8S4iGRGEL6x0G2hByiy
M7sEHkxU8D1FGgavTFxvWI9MLypde44xcjagv6Da3ATUD3nYO4HRDVSAMp9g1cmy
6dAGDtzEccbzlYfRtb126MtskAqD4Z9Fl/zfFIhN06CLXyJBi1xS+WL3F5EwI0lv
evAN5VXwb1xkVaHFkjM1xaM4ny2BFAJEkJeBx7KTTqQJNWrplVBPJGUyzJWM7QU=
=YiMF
-----END PGP SIGNATURE-----




Information forwarded to bug-guile <at> gnu.org:
bug#10693; Package guile. (Thu, 02 Feb 2012 22:40:02 GMT) Full text and rfc822 format available.

Message #14 received at 10693 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw <at> netris.org>
Cc: Ian Hulin <ian <at> hulin.org.uk>, 10693 <at> debbugs.gnu.org
Subject: Re: bug#10693: guild compile --load-path value is not processed with
	scm_parse_path, GUILE_LOAD_PATH env variable value is parsed.
Date: Thu, 02 Feb 2012 23:39:14 +0100
Hi,

Mark H Weaver <mhw <at> netris.org> skribis:

> Ian Hulin <ian <at> hulin.org.uk> writes:
>> ian <at> nanny-ogg ~/src/lilypond (T2026-1)>> guild compile
>> --load-path="/home/ian/src/lilypond:/home/ian/src/lilypond/scm"
>
> According to both the Guile manual and the output of "guile compile -h":
>
>   -L, --load-path=DIR   add DIR to the front of the module load path
>
> In other words, it behaves as documented.  The idea is that you should
> pass multiple --load-path options, one for each DIR.

[...]

> We might want to change the long option name (while continuing to accept
> --load-path for backward compatibility), but I can't think of a good
> name.  Any suggestions?

As discussed on IRC, I agree that the long name can be misleading.

Yet, I’d rather keep it, especially since the doc is non-ambiguous and
‘-L’ looks familiar.

Done?  :-)

Thanks,
Ludo’.




Reply sent to Mark H Weaver <mhw <at> netris.org>:
You have taken responsibility. (Thu, 09 Feb 2012 03:35:02 GMT) Full text and rfc822 format available.

Notification sent to Ian Hulin <ian <at> hulin.org.uk>:
bug acknowledged by developer. (Thu, 09 Feb 2012 03:35:02 GMT) Full text and rfc822 format available.

Message #19 received at 10693-done <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 10693-done <at> debbugs.gnu.org
Subject: Re: bug#10693: guild compile --load-path value is not processed with
	scm_parse_path, GUILE_LOAD_PATH env variable value is parsed.
Date: Wed, 08 Feb 2012 22:31:54 -0500
ludo <at> gnu.org (Ludovic Courtès) writes:

> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> We might want to change the long option name (while continuing to accept
>> --load-path for backward compatibility), but I can't think of a good
>> name.  Any suggestions?
>
> As discussed on IRC, I agree that the long name can be misleading.
>
> Yet, I’d rather keep it, especially since the doc is non-ambiguous and
> ‘-L’ looks familiar.
>
> Done?  :-)

Okay, I'm closing this bug.

    Mark




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 08 Mar 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.