unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Attila Lendvai <attila@lendvai.name>
Cc: 55464@debbugs.gnu.org
Subject: bug#55464: (current-filename) is #f when guix pull'ing
Date: Sat, 21 May 2022 18:39:08 +0200	[thread overview]
Message-ID: <87mtfau9g3.fsf@gnu.org> (raw)
In-Reply-To: <tBSTE5N8NWJIWIIr3W0VBG9aUjGdWsKFUTgSrjGbYVI91hTDrHGg0SQ3UyG606XDPo37sTYLIfRNbvt-HRU1tDbjHlc7C9KBABKlQeF8edM=@lendvai.name> (Attila Lendvai's message of "Thu, 19 May 2022 13:32:55 +0000")

Hi,

Attila Lendvai <attila@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’.




      reply	other threads:[~2022-05-21 16:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 21:04 bug#55464: (current-filename) is #f when guix pull'ing Attila Lendvai
2022-05-17  0:09 ` bug#55464: alternative way Attila Lendvai
2022-05-18  9:14 ` bug#55464: (current-filename) is #f when guix pull'ing Ludovic Courtès
2022-05-19 13:32   ` Attila Lendvai
2022-05-21 16:39     ` Ludovic Courtès [this message]

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://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtfau9g3.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=55464@debbugs.gnu.org \
    --cc=attila@lendvai.name \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).