GNU bug report logs - #26107
Inaccurate location info for unbound-variable errors

Previous Next

Package: guile;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Wed, 15 Mar 2017 14:04:02 UTC

Severity: minor

Done: Taylan Kammer <taylan.kammer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26107 in the body.
You can then email your comments to 26107 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#26107; Package guile. (Wed, 15 Mar 2017 14:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ludo <at> gnu.org (Ludovic Courtès):
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Wed, 15 Mar 2017 14:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: bug-guile <at> gnu.org
Subject: Inaccurate location info for unbound-variable errors
Date: Wed, 15 Mar 2017 15:03:37 +0100
Hi!

In 2.1.8/2.2.0, walking up the stack to find the origin of an unbound
variable error yields inaccurate location info.  Consider this:

--8<---------------cut here---------------start------------->8---
(list 'a
      (symbol->string 'b)
      (symbol->string 'c)  ;← unbound variable error reported here
      (FOO 'bar)           ;… instead of here
      3
      4)
--8<---------------cut here---------------end--------------->8---

We get:

--8<---------------cut here---------------start------------->8---
$ guild compile -t value t.scm
Backtrace:
          18 (apply-smob/1 #<catch-closure 1312aa0>)
In ice-9/boot-9.scm:
    710:2 17 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8 16 (_ #(#(#<directory (guile-user) 13ba1e0>)))
In /gnu/store/4xir0dlzxl7h5v7va9rz8x3mvarlv2fd-profile/bin/guild:
    72:17 15 (main _)
In srfi/srfi-1.scm:
    640:9 14 (for-each #<procedure 128be40 at scripts/compile.scm:248:14 (file)> ("t.scm"))
In scripts/compile.scm:
   251:26 13 (_ _)
In system/base/target.scm:
     57:6 12 (with-target _ _)
In system/base/compile.scm:
    152:6 11 (compile-file "t.scm" #:output-file _ #:from _ #:to _ #:env _ #:opts _ #:canonicalization _)
     43:4 10 (call-once _)
In ice-9/boot-9.scm:
    846:4  9 (with-throw-handler _ _ _)
In system/base/compile.scm:
    59:11  8 (_)
   155:11  7 (_ #<closed: file 160a0e0>)
   224:14  6 (read-and-compile _ #:from _ #:to _ #:env _ #:opts _)
    255:6  5 (compile _ #:from _ #:to _ #:env _ #:opts _)
   183:32  4 (compile-fold _ #<tree-il (call (toplevel list) (const a) (call (toplevel symbol->string) (const b)) (call (toplevel symbol->string) (const c)) (call (toplevel FO…> …)
In ice-9/boot-9.scm:
   2309:4  3 (save-module-excursion #<procedure 1345d60 at language/bytecode/spec.scm:33:9 ()>)
In language/bytecode/spec.scm:
    35:19  2 (_)
In t.scm:
      3:6  1 (_)       ;← incorrect line number! (expected line 4)
In ice-9/boot-9.scm:
   757:25  0 (dispatch-exception _ _ _)

ice-9/boot-9.scm:757:25: In procedure dispatch-exception:
ice-9/boot-9.scm:757:25: In procedure module-lookup: Unbound variable: FOO
--8<---------------cut here---------------end--------------->8---

It Would Be Nice if we could get the right location info here, though I
understand this is a corner case.

Thoughts?

Ludo’.




Information forwarded to bug-guile <at> gnu.org:
bug#26107; Package guile. (Tue, 18 May 2021 18:34:01 GMT) Full text and rfc822 format available.

Message #8 received at 26107 <at> debbugs.gnu.org (full text, mbox):

From: Taylan Kammer <taylan.kammer <at> gmail.com>
To: 26107 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Inaccurate location info for unbound-variable errors
Date: Tue, 18 May 2021 20:33:47 +0200
FWIW this seems fixed in 3.0, but I can reproduce with 2.2.7.

Are we still supporting 2.2 for non-critical stuff?

-- 
Taylan




Severity set to 'minor' from 'normal' Request was from Taylan Kammer <taylan.kammer <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 18 May 2021 18:37:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guile <at> gnu.org:
bug#26107; Package guile. (Tue, 18 May 2021 20:12:02 GMT) Full text and rfc822 format available.

Message #13 received at 26107 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Taylan Kammer <taylan.kammer <at> gmail.com>
Cc: 26107 <at> debbugs.gnu.org
Subject: Re: Inaccurate location info for unbound-variable errors
Date: Tue, 18 May 2021 22:11:28 +0200
Hi,

Taylan Kammer <taylan.kammer <at> gmail.com> skribis:

> FWIW this seems fixed in 3.0, but I can reproduce with 2.2.7.
>
> Are we still supporting 2.2 for non-critical stuff?

There’s no plan to do so.

Ludo’.




Reply sent to Taylan Kammer <taylan.kammer <at> gmail.com>:
You have taken responsibility. (Tue, 18 May 2021 20:13:01 GMT) Full text and rfc822 format available.

Notification sent to ludo <at> gnu.org (Ludovic Courtès):
bug acknowledged by developer. (Tue, 18 May 2021 20:13:01 GMT) Full text and rfc822 format available.

Message #18 received at 26107-done <at> debbugs.gnu.org (full text, mbox):

From: Taylan Kammer <taylan.kammer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 26107-done <at> debbugs.gnu.org
Subject: Re: Inaccurate location info for unbound-variable errors
Date: Tue, 18 May 2021 22:12:27 +0200
On 18.05.2021 22:11, Ludovic Courtès wrote:
> Hi,
> 
> Taylan Kammer <taylan.kammer <at> gmail.com> skribis:
> 
>> FWIW this seems fixed in 3.0, but I can reproduce with 2.2.7.
>>
>> Are we still supporting 2.2 for non-critical stuff?
> 
> There’s no plan to do so.
> 
> Ludo’.
> 

Closing then. :-)

-- 
Taylan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 16 Jun 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.