GNU bug report logs - #48096
[3.0.6] ‘syntax-error’ exceptions include vectors instead of source location properties

Previous Next

Package: guile;

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

Date: Thu, 29 Apr 2021 09:42:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.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 48096 in the body.
You can then email your comments to 48096 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 wingo <at> pobox.com, bug-guile <at> gnu.org:
bug#48096; Package guile. (Thu, 29 Apr 2021 09:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to wingo <at> pobox.com, bug-guile <at> gnu.org. (Thu, 29 Apr 2021 09:42:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: bug-guile <at> gnu.org
Subject: [3.0.6] ‘syntax-error’ exceptions
 include vectors instead of source location properties
Date: Thu, 29 Apr 2021 11:41:46 +0200
[Message part 1 (text/plain, inline)]
Hi!

In 3.0.6, a slight incompatibility crept in: ‘syntax-error’ exceptions
include vectors like #("example.scm" 1 2) instead of good’ol source
property alists.

Here is a test case that reproduces the problem:

[Message part 2 (text/x-patch, inline)]
diff --git a/test-suite/tests/syntax.test b/test-suite/tests/syntax.test
index 10bc7b080..c60a453aa 100644
--- a/test-suite/tests/syntax.test
+++ b/test-suite/tests/syntax.test
@@ -1,7 +1,7 @@
 ;;;; syntax.test --- test suite for Guile's syntactic forms    -*- scheme -*-
 ;;;;
 ;;;; Copyright (C) 2001, 2003, 2004, 2005, 2006, 2009, 2010,
-;;;;   2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+;;;;   2011, 2012, 2013, 2014, 2021 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
@@ -112,6 +112,18 @@
 
   (with-test-prefix "Bad argument list"
 
+    (pass-if-equal "syntax-error location"
+        '((line . 1) (column . 2) (filename . "example.scm"))
+      (catch 'syntax-error
+        (lambda ()
+          (eval (call-with-input-string "\n  (let foo bar)"
+                  (lambda (port)
+                    (set-port-filename! port "example.scm")
+                    (read port)))
+                (interaction-environment)))
+        (lambda (key proc message properties form subform . rest)
+          properties)))
+
     (pass-if-syntax-error "improper argument list of length 1"
       exception:generic-syncase-error
       (eval '(let ((foo (lambda (x y) #t)))
[Message part 3 (text/plain, inline)]
Ludo’.

Reply sent to Andy Wingo <wingo <at> pobox.com>:
You have taken responsibility. (Thu, 29 Apr 2021 20:02:01 GMT) Full text and rfc822 format available.

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

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

From: Andy Wingo <wingo <at> pobox.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 48096-done <at> debbugs.gnu.org
Subject: Re: bug#48096: [3.0.6] ‘syntax-error’
 exceptions include vectors instead of source location properties
Date: Thu, 29 Apr 2021 22:00:43 +0200
Done!

On Thu 29 Apr 2021 11:41, Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi!
>
> In 3.0.6, a slight incompatibility crept in: ‘syntax-error’ exceptions
> include vectors like #("example.scm" 1 2) instead of good’ol source
> property alists.
>
> Here is a test case that reproduces the problem:
>
> diff --git a/test-suite/tests/syntax.test b/test-suite/tests/syntax.test
> index 10bc7b080..c60a453aa 100644
> --- a/test-suite/tests/syntax.test
> +++ b/test-suite/tests/syntax.test
> @@ -1,7 +1,7 @@
>  ;;;; syntax.test --- test suite for Guile's syntactic forms    -*- scheme -*-
>  ;;;;
>  ;;;; Copyright (C) 2001, 2003, 2004, 2005, 2006, 2009, 2010,
> -;;;;   2011, 2012, 2013, 2014 Free Software Foundation, Inc.
> +;;;;   2011, 2012, 2013, 2014, 2021 Free Software Foundation, Inc.
>  ;;;;
>  ;;;; This library is free software; you can redistribute it and/or
>  ;;;; modify it under the terms of the GNU Lesser General Public
> @@ -112,6 +112,18 @@
>  
>    (with-test-prefix "Bad argument list"
>  
> +    (pass-if-equal "syntax-error location"
> +        '((line . 1) (column . 2) (filename . "example.scm"))
> +      (catch 'syntax-error
> +        (lambda ()
> +          (eval (call-with-input-string "\n  (let foo bar)"
> +                  (lambda (port)
> +                    (set-port-filename! port "example.scm")
> +                    (read port)))
> +                (interaction-environment)))
> +        (lambda (key proc message properties form subform . rest)
> +          properties)))
> +
>      (pass-if-syntax-error "improper argument list of length 1"
>        exception:generic-syncase-error
>        (eval '(let ((foo (lambda (x y) #t)))
>
>
> Ludo’.




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

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

Previous Next


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