GNU bug report logs -
#55464
(current-filename) is #f when guix pull'ing
Previous Next
Full log
Message #17 received at 55464 <at> debbugs.gnu.org (full text, mbox):
Hi,
Attila Lendvai <attila <at> lendvai.name> skribis:
> is my analysis is correct, namely that cwd is not (always?) changed at macroexpand time, and thus the implementation of INCLUDE is broken for relative paths? is this a bug to be fixed in guile? if so, shall i try to add a test case for this somewhere?
‘include’ does all its work at macro-expansion time. It’s documented
like so (info "(guile) Local Inclusion"):
-- Scheme Syntax: include file-name
Open FILE-NAME, at expansion-time, and read the Scheme forms that
it contains, splicing them into the location of the ‘include’,
within a ‘begin’.
If FILE-NAME is a relative path, it is searched for relative to the
path that contains the file that the ‘include’ form appears in.
And I believe that’s what it does—see ‘psyntax.scm’ for the actual code.
Now, if source location info were to be missing, it wouldn’t be able to
work for relative file names because it wouldn’t know the name of the
source file that contains the ‘include’ form.
HTH!
Ludo’.
This bug report was last modified 3 years and 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.