Subject: Re: bug#54003: local-file after Guile update

From: Ludovic Courtès <[email-masked]>
Date: Tue, 15 Feb 2022 20:42:21 +0100

Hi!

For now, here’s a workaround: instead of writing

  #~(… #$(local-file …) …)

you can write:

  (gexp (… (ungexp (local-file …)) …))

or:

  (let ((file (local-file …)))
    #~(… #$file …))

The problem is that ‘read’ hash extensions (like those for #~ and #$)
would so far return sexps with associated source properties, but psyntax
in 3.0.8 ignores those source properties.

I believe this is due to Guile commit
54bbe0b2846c5b1aa366c91d679ba724869c8cda, specifically this bit:

     (define source-annotation
       (lambda (x)
-        (if (syntax? x)
-            (syntax-sourcev x)
-            (datum-sourcev x))))
+        (and (syntax? x)
+             (syntax-sourcev x))))

I’m looking for a reasonable workaround we could apply.

Ludo’.