emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48089: closed (Guile 3.0.6 returns zero-indexed locations for ‘read-


From: GNU bug Tracking System
Subject: bug#48089: closed (Guile 3.0.6 returns zero-indexed locations for ‘read-error’)
Date: Thu, 29 Apr 2021 20:06:01 +0000

Your message dated Thu, 29 Apr 2021 22:04:52 +0200
with message-id <8735v8luvv.fsf@pobox.com>
and subject line Re: bug#48089: Guile 3.0.6 returns zero-indexed locations for 
‘read-error’
has caused the debbugs.gnu.org bug report #48089,
regarding Guile 3.0.6 returns zero-indexed locations for ‘read-error’
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
48089: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48089
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Guile 3.0.6 returns zero-indexed locations for ‘read-error’ Date: Thu, 29 Apr 2021 00:33:54 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hi,

Guile 3.0.6 returns zero-indexed (instead of one-indexed) source code
locations for ‘read-error’.  Here’s a 3.0.6/3.0.5 comparison:

--8<---------------cut here---------------start------------->8---
$ /gnu/store/r2nr74rwhpqg16y1lyi6l0jn3lwx4yyz-guile-3.0.6/bin/guile  <(echo '(')
ice-9/read.scm:126:4: In procedure lp:
/dev/fd/63:1:0: unexpected end of input while searching for: )
$ guile  <(echo '(')
ERROR: In procedure primitive-load:
In procedure scm_i_lreadparen: /dev/fd/63:2:1: end of file
--8<---------------cut here---------------end--------------->8---

Ludo’.



--- End Message ---
--- Begin Message --- Subject: Re: bug#48089: Guile 3.0.6 returns zero-indexed locations for ‘read-error’ Date: Thu, 29 Apr 2021 22:04:52 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Done :)

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

> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> Guile 3.0.6 returns zero-indexed (instead of one-indexed) source code
>> locations for ‘read-error’.  Here’s a 3.0.6/3.0.5 comparison:
>>
>> $ /gnu/store/r2nr74rwhpqg16y1lyi6l0jn3lwx4yyz-guile-3.0.6/bin/guile  <(echo 
>> '(')
>> ice-9/read.scm:126:4: In procedure lp:
>> /dev/fd/63:1:0: unexpected end of input while searching for: )
>> $ guile  <(echo '(')
>> ERROR: In procedure primitive-load:
>> In procedure scm_i_lreadparen: /dev/fd/63:2:1: end of file
>
> Here’s a test case waiting to succeed!  :-)
>
> diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test
> index fad531b39..231e69553 100644
> --- a/test-suite/tests/reader.test
> +++ b/test-suite/tests/reader.test
> @@ -212,6 +212,18 @@
>  
>
>  (with-test-prefix "mismatching parentheses"
> +  (pass-if-equal "read-error location"
> +      '("foo.scm:3:1: unexpected end of input while searching for: ~A" #\))
> +    (catch 'read-error
> +      (lambda ()
> +        ;; The missing closing paren error should be located on line 3,
> +        ;; column 1 (one-indexed).
> +        (call-with-input-string "\n    (hi there!\n"
> +          (lambda (port)
> +            (set-port-filename! port "foo.scm")
> +            (read port))))
> +      (lambda (key proc message args . _)
> +        (cons message args))))
>    (pass-if-exception "opening parenthesis"
>      exception:eof
>      (read-string "("))
>
>
> Ludo’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]