GNU bug report logs - #23739
Unexpected behavior of 'add-to-load-path'.

Previous Next

Package: guile;

Reported by: Mathieu Lirzin <mthl <at> gnu.org>

Date: Fri, 10 Jun 2016 12:18:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Mathieu Lirzin <mthl <at> gnu.org>
To: 23739 <at> debbugs.gnu.org
Subject: bug#23739: Unexpected behavior of 'add-to-load-path'.
Date: Fri, 10 Jun 2016 14:17:23 +0200
Hello,

I have noticed something that doesn't feel right when using
‘add-to-load-path’.

$ cat test.scm
--8<---------------cut here---------------start------------->8---
(define old %load-path)
(add-to-load-path "foo")
(pk %load-path)
(pk old)
--8<---------------cut here---------------end--------------->8---

first run:

$ guile test.scm
--8<---------------cut here---------------start------------->8---
;;; [Compilation]
;;; (("foo" "foo" "/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/guile/site" "/usr/share/guile"))

;;; (("foo" "/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/guile/site" "/usr/share/guile"))
--8<---------------cut here---------------end--------------->8---

next runs:

$ guile test.scm
--8<---------------cut here---------------start------------->8---
;;; (("foo" "/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/guile/site" "/usr/share/guile"))

;;; (("/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/guile/site" "/usr/share/guile"))
--8<---------------cut here---------------end--------------->8---

each time test.scm is recompiled the first result reappears.  This has
been tested with Guile 2.0.11 and Guile master.

Thanks,

-- 
Mathieu Lirzin




This bug report was last modified 8 years and 339 days ago.

Previous Next


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