From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: 21613@debbugs.gnu.org
Subject: bug#21613: Include messes up when compiling file in load path
Date: Mon, 05 Oct 2015 00:31:34 +0200 [thread overview]
Message-ID: <87twq68dvd.fsf@T420.taylan> (raw)
In-Reply-To: <8737xqaefu.fsf@T420.taylan> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Sun, 04 Oct 2015 16:36:21 +0200")
[-- Attachment #1: Type: text/plain, Size: 410 bytes --]
taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
> This seems to be related to 'compile-file' setting
> '%file-port-name-canonicalization' to 'relative', but I don't know
> what the correct fix is.
With the following trivial patch changing 'relative' to 'absolute',
Guile's test suite passes and the bug seems to be fixed, but I still
don't know whether this is the right fix...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-include-for-files-in-load-path.patch --]
[-- Type: text/x-diff, Size: 1630 bytes --]
From 3e508926631a6fe3d81f6a584352562afc0e96ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
<taylanbayirli@gmail.com>
Date: Mon, 5 Oct 2015 00:15:56 +0200
Subject: [PATCH] Fix 'include' for files in load path.
Fixes <http://debbugs.gnu.org/21613>.
* module/system/base/compile.scm (compile-file): Set
%file-port-name-canonicalization to 'absolute by default.
(compile-and-load): Ditto.
---
module/system/base/compile.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
index c522b74..66eec44 100644
--- a/module/system/base/compile.scm
+++ b/module/system/base/compile.scm
@@ -136,7 +136,7 @@
(to 'objcode)
(env (default-environment from))
(opts '())
- (canonicalization 'relative))
+ (canonicalization 'absolute))
(with-fluids ((%file-port-name-canonicalization canonicalization))
(let* ((comp (or output-file (compiled-file-name file)
(error "failed to create path for auto-compiled file"
@@ -157,7 +157,7 @@
(define* (compile-and-load file #:key (from (current-language)) (to 'value)
(env (current-module)) (opts '())
- (canonicalization 'relative))
+ (canonicalization 'absolute))
(with-fluids ((%file-port-name-canonicalization canonicalization))
(read-and-compile (open-input-file file)
#:from from #:to to #:opts opts
--
2.5.0
next prev parent reply other threads:[~2015-10-04 22:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-04 14:36 bug#21613: Include messes up when compiling file in load path Taylan Ulrich Bayırlı/Kammer
2015-10-04 22:31 ` Taylan Ulrich Bayırlı/Kammer [this message]
2016-06-21 8:49 ` Taylan Ulrich Bayırlı/Kammer
2016-06-24 14:49 ` 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=87twq68dvd.fsf@T420.taylan \
--to=taylanbayirli@gmail.com \
--cc=21613@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).