* bug#21347: include-from-path and relative paths in load-path
@ 2015-08-25 19:42 Taylan Ulrich Bayırlı/Kammer
2016-06-24 8:42 ` Andy Wingo
0 siblings, 1 reply; 2+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-08-25 19:42 UTC (permalink / raw)
To: 21347
When there are relative paths in the load-path, `include-from-path'
seems to always interpret them relative to the directory of the file in
which the `include-from-path' is called, instead of relative to the
current working directory in effect when Guile is started.
Transcript:
--- SNIP ---
taylan@T420:~$ unset GUILE_LOAD_COMPILED_PATH
taylan@T420:~$ unset GUILE_LOAD_PATH
taylan@T420:~$ echo '(display "foo\n")' > display.scm
taylan@T420:~$ mkdir test
taylan@T420:~$ echo '(include-from-path "display.scm")' > test/test.scm
taylan@T420:~$ guile -q -L .
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 "test/test.scm")
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/taylan/test/test.scm
;;; WARNING: compilation of /home/taylan/test/test.scm failed:
;;; ERROR: In procedure open-file: No such file or directory: "/home/taylan/test/./display.scm"
ERROR: In procedure open-file:
ERROR: In procedure open-file: No such file or directory: "/home/taylan/test/./display.scm"
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
--- SNIP ---
Is this behavior desired? I would say not, because when passing "-L ."
to guile, one expects the current directory to be added to the load
path, not some symbolic "current directory" whose true value changes
dynamically. (Well, I could understand if there were an explicit
`chdir' call, though even then I think the "." would ideally be
evaluated once at startup, if possible.)
Taylan
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#21347: include-from-path and relative paths in load-path
2015-08-25 19:42 bug#21347: include-from-path and relative paths in load-path Taylan Ulrich Bayırlı/Kammer
@ 2016-06-24 8:42 ` Andy Wingo
0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2016-06-24 8:42 UTC (permalink / raw)
To: Taylan Ulrich "Bayırlı/Kammer"; +Cc: 21347-done
On Tue 25 Aug 2015 21:42, taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
> When there are relative paths in the load-path, `include-from-path'
> seems to always interpret them relative to the directory of the file in
> which the `include-from-path' is called, instead of relative to the
> current working directory in effect when Guile is started.
Indeed, good catch. Fixed in master. I don't know if we can fix in
2.0.
Andy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-24 8:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-25 19:42 bug#21347: include-from-path and relative paths in load-path Taylan Ulrich Bayırlı/Kammer
2016-06-24 8:42 ` Andy Wingo
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).