From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Print backtraces for syntax errors too. Date: Thu, 23 Feb 2023 12:38:33 +0100 Message-ID: <87pma07gsm.fsf@gnu.org> References: <20230208155905.27194-1-maximedevos@telenet.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1559"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) To: guile-devel@gnu.org Cancel-Lock: sha1:w1yq74hph9NYnlef4rSxL2du2bg= Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Feb 23 12:40:20 2023 Return-path: Envelope-to: guile-devel@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 1pV9xU-0000D3-99 for guile-devel@m.gmane-mx.org; Thu, 23 Feb 2023 12:40:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pV9xM-0006Wv-6K; Thu, 23 Feb 2023 06:40:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pV9xI-0006W0-8O for guile-devel@gnu.org; Thu, 23 Feb 2023 06:40:08 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pV9xG-0002wp-3B for guile-devel@gnu.org; Thu, 23 Feb 2023 06:40:07 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pV9xB-000ALy-TX for guile-devel@gnu.org; Thu, 23 Feb 2023 12:40:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 5 =?utf-8?Q?Vent=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Bouc X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Received-SPF: pass client-ip=116.202.254.214; envelope-from=guile-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21725 Archived-At: Hi, Maxime Devos skribis: > For complicated macros, especially macros that are used correctly but > have a bug in their implementation somewhere and use 'syntax-case' > or 'syntax-rules' multiple times, it can be very convenient to know > _which_ syntax-case or syntax-rules raised the syntax-error. > > E.g., I'm currently debugging some changes to a (non-Guile) macro, > and I don't know what to make of the following -- the '#:getter . datum-type' > isn't even present in the original code anywhere: > > ice-9/boot-9.scm:1685:16: In procedure raise-exception: > Syntax error: > unknown location: source expression failed to match any pattern in form (#:getter . datum-type) > make: *** [Makefile:1333: gnu/gnunet/dht/client.go] Fout 1 > > As such, partially revert the following commit that does not give a > rationale on how backtraces for syntax errors aren't helpful. Do you have a simple reproducer and a before/after comparison showing what Guile prints? Thanks, Ludo’.