GNU bug report logs -
#18127
add-to-load-path adds a path twice
Previous Next
Reported by: Alex Kost <alezost <at> gmail.com>
Date: Mon, 28 Jul 2014 13:07:02 UTC
Severity: normal
Done: Ian Price <ianprice90 <at> googlemail.com>
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 18127 in the body.
You can then email your comments to 18127 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#18127
; Package
guile
.
(Mon, 28 Jul 2014 13:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alex Kost <alezost <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Mon, 28 Jul 2014 13:07:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello, I noticed that ‘add-to-load-path’ adds a path 2 times when it is
called in Guile REPL.
taylanub from #guile explained that it may happen because in the REPL
the compilation and execution happen in the same session and
“‘add-to-load-path’ takes care of modifying the path both at
compile-time and at run-time.” (from manual).
Here is the session for illustrating the bug (if it's a bug) :
$ guile
GNU Guile 2.0.11
Copyright (C) 1995-2014 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)> %load-path
$1 = ( "/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/guile/site" "/usr/share/guile")
scheme@(guile-user)> (add-to-load-path "foo")
scheme@(guile-user)> %load-path
$2 = ("foo" "foo" "/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/guile/site" "/usr/share/guile")
scheme@(guile-user)> ,q
Also I have a question: Why there is no ‘add-to-load-compiled-path’? I
think such function may also be useful.
Thanks,
Alex
Information forwarded
to
bug-guile <at> gnu.org
:
bug#18127
; Package
guile
.
(Wed, 30 Jul 2014 18:37:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 18127 <at> debbugs.gnu.org (full text, mbox):
Alex Kost <alezost <at> gmail.com> writes:
> taylanub from #guile explained that it may happen because in the REPL
> the compilation and execution happen in the same session and
> “‘add-to-load-path’ takes care of modifying the path both at
> compile-time and at run-time.” (from manual).
This is correct, it will also happen in scripts if they are
auto-compiled, but you will only see it once on subsequent runs, since
macro-expansion doesn't need to happen again.
The fix is simple, and there is no harm in it, so I've pushed a fix to
stable-2.0.
> Also I have a question: Why there is no ‘add-to-load-compiled-path’? I
> think such function may also be useful.
Fair question. I have no idea about the answer, but I've not touched
this one. As a general principle, I wouldn't like to see us have a
separate macro for each of these.
Thanks
--
Ian Price -- shift-reset.com
"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
Reply sent
to
Ian Price <ianprice90 <at> googlemail.com>
:
You have taken responsibility.
(Wed, 30 Jul 2014 18:37:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Alex Kost <alezost <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 30 Jul 2014 18:37:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 28 Aug 2014 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 251 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.