From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: 21347@debbugs.gnu.org
Subject: bug#21347: include-from-path and relative paths in load-path
Date: Tue, 25 Aug 2015 21:42:54 +0200 [thread overview]
Message-ID: <87twrni281.fsf@T420.taylan> (raw)
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
next reply other threads:[~2015-08-25 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-25 19:42 Taylan Ulrich Bayırlı/Kammer [this message]
2016-06-24 8:42 ` bug#21347: include-from-path and relative paths in load-path Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87twrni281.fsf@T420.taylan \
--to=taylanbayirli@gmail.com \
--cc=21347@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).