From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OEpAH9hEGGCCBQAA0tVLHw (envelope-from ) for ; Mon, 01 Feb 2021 18:13:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sGT9GthEGGDwfAAAbx9fmQ (envelope-from ) for ; Mon, 01 Feb 2021 18:13:44 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C440C9402C2 for ; Mon, 1 Feb 2021 18:13:43 +0000 (UTC) Received: from localhost ([::1]:40552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6dhl-0000bx-CI for larch@yhetil.org; Mon, 01 Feb 2021 13:13:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6dh9-0000Ri-20 for bug-guix@gnu.org; Mon, 01 Feb 2021 13:13:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6dh8-00089H-RN for bug-guix@gnu.org; Mon, 01 Feb 2021 13:13:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l6dh8-0007Cw-L3 for bug-guix@gnu.org; Mon, 01 Feb 2021 13:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#46241: Guile Macros did not print the error-line-number ? Resent-From: Joshua Branson Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 01 Feb 2021 18:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46241 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 46241@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161220317827694 (code B ref -1); Mon, 01 Feb 2021 18:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Feb 2021 18:12:58 +0000 Received: from localhost ([127.0.0.1]:33110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6dh3-0007Cc-On for submit@debbugs.gnu.org; Mon, 01 Feb 2021 13:12:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:34194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6dh1-0007CU-Pl for submit@debbugs.gnu.org; Mon, 01 Feb 2021 13:12:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6dh1-0000KD-BH; Mon, 01 Feb 2021 13:12:55 -0500 Received: from mx1.dismail.de ([78.46.223.134]:42825) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6dgz-00082S-0I; Mon, 01 Feb 2021 13:12:55 -0500 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id f4121d2c; Mon, 1 Feb 2021 19:12:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=date :message-id:from:to:cc:subject; s=20190914; bh=LRpZImnkAVJbKXU4W w0139hB4XHKo151x4VpBMNbL3E=; b=lwpHb6vmx/qGeiw4BM86+rqsLclJ7ABis XkEGR7CbIT1auMvs6WHT1f3h3qGpZXqvyWm32lWtkFFHsfpLy2qaVN72j+IeErJj 4oGURD8fgFs9BROPuScVPepOWkl3N8O/M9ljOWhxiaL9dD25ACDrzNhkcMyQrdBo knTJGSOyrKdN/VfSmsI8TZz/g1fgMAodKL410eW+Y1xml0QJmJ7kw4elMzkR5Ugz OQv4Lu4yt7HMHs+o4pLh7p/yVeoXeD9wdtPA4+1DRct+Ex0QGeWnFwQAG1OYwKh4 CPdH8YFjYVejR3UBbfd3zPzlNd0PtTzRpHMZkaE5Hqr3de48JY1Sw== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 60599576; Mon, 1 Feb 2021 19:12:45 +0100 (CET) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id 53af86b2; Mon, 1 Feb 2021 19:12:45 +0100 (CET) Received: by dismail.de (OpenSMTPD) with ESMTPSA id da8fd0bd (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 1 Feb 2021 19:12:45 +0100 (CET) Date: Mon, 01 Feb 2021 13:12:42 -0500 Message-Id: <87r1lzodwl.fsf@dismail.de> Received-SPF: pass client-ip=78.46.223.134; envelope-from=jbranso@dismail.de; helo=mx1.dismail.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-guile@gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: Joshua Branson From: jbranso--- via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=dismail.de header.s=20190914 header.b=lwpHb6vm; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: C440C9402C2 X-Spam-Score: -1.86 X-Migadu-Scanner: scn1.migadu.com X-TUID: NeUlYXPPPDiP Hello! Recently on irc, I posted an example of an incorrectly used define-record-type* NOT displaying an error line number. mdevos mentioned that this could potentially be fixed in (guix records), but it may also be a guile compile bug as well. First here is a (guix records) example: #+BEGIN_SRC scheme (use-modules (guix records)) (define-record-type* sway-bindsym make-sway-bindsym sway-bindsym? (key-combo sway-bindsym-key-combo (default ""))) (display sway-bindsym) ;; compile error at unknown location ;; (display (sway-bindsym)) this is one "correct" way to call this code #+END_SRC One will get a compile error like the following #+BEING_SRC sh ;;; note: source file /home/joshua/prog/guile/test.scm ;;; newer than compiled /home/joshua/.cache/guile/ccache/3.0-LE-8-4.4/home/joshua/prog/guile/test.scm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/joshua/prog/guile/test.scm ;;; WARNING: compilation of /home/joshua/prog/guile/test.scm failed: ;;; Syntax error: ;;; unknown location: source expression failed to match any pattern in form sway-bindsym ice-9/psyntax.scm:2800:12: In procedure syntax-violation: Syntax error: unknown location: source expression failed to match any pattern in form sway-bindsym #+END_SRC As you can see, you do NOT see a error-line-number. If this file was sufficiently large, this might be hard to track down. Though it IS NICE to see that the error comes from an "sway-bindsym". mdevos then mentioned that I should provide a simple use case NOT involving (guix records). Here is one: #+BEGIN_SRC scheme (define-syntax when (syntax-rules () ((when condititon exp ...) (if condititon (begin exp ...))))) (when #t (display "Hello\n")) (display when) #+END_SRC The error message looks like: #+BEGIN_SRC sh ;;; note: source file /home/joshua/prog/guile/macro-bug.scm ;;; newer than compiled /home/joshua/.cache/guile/ccache/3.0-LE-8-4.4/home/joshua/prog/guile/macro-bug.scm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/joshua/prog/guile/macro-bug.scm ;;; WARNING: compilation of /home/joshua/prog/guile/macro-bug.scm failed: ;;; Syntax error: ;;; unknown location: source expression failed to match any pattern in form when Hello ice-9/psyntax.scm:2800:12: In procedure syntax-violation: Syntax error: unknown location: source expression failed to match any pattern in form when #+END_SRC Again, I do not see an error-line-number message. Thanks, Joshua P.S. I am no scheme compiler expert. As far as I know, maybe it's impossible to display the error-line-number, when you use macros. I just heard that few free software users report bugs. I'm just trying to be helpful. :) I hope I am.