From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#48089: Guile 3.0.6 returns zero-indexed locations for =?UTF-8?Q?=E2=80=98read-error=E2=80=99?= Date: Thu, 29 Apr 2021 11:33:27 +0200 Message-ID: <87o8dxmo48.fsf@gnu.org> References: <877dkmox7x.fsf@inria.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15409"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) To: 48089@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Thu Apr 29 11:34:10 2021 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lc33i-0003r8-EH for guile-bugs@m.gmane-mx.org; Thu, 29 Apr 2021 11:34:10 +0200 Original-Received: from localhost ([::1]:46576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lc33h-0003rV-GQ for guile-bugs@m.gmane-mx.org; Thu, 29 Apr 2021 05:34:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lc33b-0003qP-2M for bug-guile@gnu.org; Thu, 29 Apr 2021 05:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43299) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lc33a-0004OZ-RQ for bug-guile@gnu.org; Thu, 29 Apr 2021 05:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lc33a-0006i1-PD for bug-guile@gnu.org; Thu, 29 Apr 2021 05:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 29 Apr 2021 09:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48089 X-GNU-PR-Package: guile Original-Received: via spool by 48089-submit@debbugs.gnu.org id=B48089.161968881925745 (code B ref 48089); Thu, 29 Apr 2021 09:34:02 +0000 Original-Received: (at 48089) by debbugs.gnu.org; 29 Apr 2021 09:33:39 +0000 Original-Received: from localhost ([127.0.0.1]:54844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lc33C-0006hB-Se for submit@debbugs.gnu.org; Thu, 29 Apr 2021 05:33:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lc339-0006gb-Ck for 48089@debbugs.gnu.org; Thu, 29 Apr 2021 05:33:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39041) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lc333-00044l-Ho; Thu, 29 Apr 2021 05:33:29 -0400 Original-Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=32856 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lc332-0005xE-Tp; Thu, 29 Apr 2021 05:33:29 -0400 In-Reply-To: <877dkmox7x.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 29 Apr 2021 00:33:54 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:10019 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s skribis: > Guile 3.0.6 returns zero-indexed (instead of one-indexed) source code > locations for =E2=80=98read-error=E2=80=99. Here=E2=80=99s a 3.0.6/3.0.5= comparison: > > $ /gnu/store/r2nr74rwhpqg16y1lyi6l0jn3lwx4yyz-guile-3.0.6/bin/guile <(ec= ho '(') > 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=E2=80=99s a test case waiting to succeed! :-) --=-=-= Content-Type: text/x-patch Content-Disposition: inline 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 "(")) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 DQpMdWRv4oCZLg0K --=-=-=--