Subject: bug#48096: closed (Re: bug#48096: [3.0.6] ‘syntax-error’exceptions include vectors instead of source location properties)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 29 Apr 2021 20:02:01 +0000

Your bug report

#48096: [3.0.6] ‘syntax-error’ exceptions include vectors instead of source location properties

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
48096: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48096
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#48096: [3.0.6] ‘syntax-error’exceptions include vectors instead of source location properties
From: Andy Wingo <[email-masked]>
To: Ludovic Courtès <[email-masked]>
Cc: [email-masked]
Date: Thu, 29 Apr 2021 22:00:43 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Done!

On Thu 29 Apr 2021 11:41, Ludovic Courtès <[email-masked]> 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’.

Subject: [3.0.6] ‘syntax-error’ exceptions include vectors instead of source location properties
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Date: Thu, 29 Apr 2021 11:41:46 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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