Subject: Re: bug#38388: [2.9.5] Inaccurate source location info for unbound variables

From: Andy Wingo <[email-masked]>
Date: Wed, 27 Nov 2019 10:53:56 +0100

Hi,

On Tue 26 Nov 2019 16:20, Ludovic Courtès <[email-masked]> writes:

> I have a test that runs ‘guix system build’ on this file:
>
> (use-modules (gnu))                                   ; 1
> (use-service-modules networking)                      ; 2
>
> (operating-system                                     ; 4
>   (host-name "antelope")                              ; 5
>   (timezone "Europe/Paris")                           ; 6
>   (locale "en_US.UTF-8")                              ; 7
>
>   (bootloader (GRUB-config (target "/dev/sdX")))      ; 9
>   (file-systems (cons (file-system
>                         (device (file-system-label "root"))
>                         (mount-point "/")
>                         (type "ext4"))
>                       %base-file-systems)))
>
> Here, ‘GRUB-config’ is unbound, and the test expects to see a stack
> frame corresponding to line 9.
>
> However, the stack frame we get is for line 11, char 32, which
> corresponds to (file-system-label "root").
>
> So it would seem that the IP-to-source-location mapping is not quite
> working as expected.
>
> Thoughts?

What version is this with?

Unfortunately as you know, bare identifiers don't have good source
location information.  There are small improvements that can be made but
larger improvments are gnarly.  Could be this is a case for a small
improvement though!

Andy