From unknown Wed Jun 18 00:24:31 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#51463 <51463@debbugs.gnu.org> To: bug#51463 <51463@debbugs.gnu.org> Subject: Status: Lack of error message in several guix subcommands Reply-To: bug#51463 <51463@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:24:31 +0000 retitle 51463 Lack of error message in several guix subcommands reassign 51463 guix submitter 51463 Alice BRENON severity 51463 important thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 28 13:15:32 2021 Received: (at submit) by debbugs.gnu.org; 28 Oct 2021 17:15:32 +0000 Received: from localhost ([127.0.0.1]:53059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mg900-0006up-ES for submit@debbugs.gnu.org; Thu, 28 Oct 2021 13:15:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:47158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mg8zv-0006ub-1z for submit@debbugs.gnu.org; Thu, 28 Oct 2021 13:15:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mg8zu-0007Hn-Mc for bug-guix@gnu.org; Thu, 28 Oct 2021 13:15:26 -0400 Received: from lxc-smtp2.ens-lyon.fr ([140.77.167.81]:41764) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mg8zr-0003Nc-Uh for bug-guix@gnu.org; Thu, 28 Oct 2021 13:15:26 -0400 Received: from localhost (localhost [127.0.0.1]) by lxc-smtp2.ens-lyon.fr (Postfix) with ESMTP id C3FAFEA4CF for ; Thu, 28 Oct 2021 19:15:18 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.11.0 (20160426) (Debian) at ens-lyon.fr Received: from lxc-smtp2.ens-lyon.fr ([127.0.0.1]) by localhost (lxc-smtp2.ens-lyon.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tf2GDqMZKEku for ; Thu, 28 Oct 2021 19:15:18 +0200 (CEST) Received: from localhost (unknown [78.194.167.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by lxc-smtp2.ens-lyon.fr (Postfix) with ESMTPSA id AFE65EA4CC for ; Thu, 28 Oct 2021 19:15:18 +0200 (CEST) Date: Thu, 28 Oct 2021 19:15:17 +0200 From: Alice BRENON To: bug-guix@gnu.org Subject: Lack of error message in several guix subcommands Message-ID: <20211028191517.719afb83@ens-lyon.fr> Organization: ENS de Lyon X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.24; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/CXAS0LY7kZVHUEhrUmm3VqQ" Received-SPF: pass client-ip=140.77.167.81; envelope-from=alice.brenon@ens-lyon.fr; helo=lxc-smtp2.ens-lyon.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --MP_/CXAS0LY7kZVHUEhrUmm3VqQ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi list, I was giving guix shell a try today and noticed this annoying lack of relevant feedback from the tool: when running on a particularly malformed guix.scm, either by auto-loading or by explicitely passing -f guix.scm, guix shell returned in error ($? =3D=3D 1) without printing any error message, which is a bit unhelpful. The particular malformed guix.scm simply contains an extra parenthesis after the package definition. Compare to the case when the package definition lacks the final parenthesis, which yields a helpful message like this: /tmp/bug/guix.scm:25:1: missing closing parenthesis This is not specific to guix shell because I could then reproduce this behaviour with other commands like guix environment or guix build. Find attached the file I've been using to reproduce the bug, which is essentially the "hello" package example from the manual[1] without the (define-public =E2=80=A6) layer, in order for the top-level expression contained in the file to be directly a package usable by -f (-l for guix environment) and not have to put hello on the last line. The version attached is correct and will allow guix shell -f guix.scm to enter an environment where hello is installed. Remove a parenthesis, you should have the above message. Add one, on the contrary, and you should get nothing but silence. I'm using guix on Guix System, and pulled this morning: guix 5cbf9a4 URL du d=C3=A9p=C3=B4t : https://git.savannah.gnu.org/git/guix.git branche=E2=80=AF: master commit : 5cbf9a48d766191d8f17b2e9d1cf7b7db69b99ea Regards, Alice [1] https://guix.gnu.org/manual/devel/en/html_node/Defining-Packages.html --MP_/CXAS0LY7kZVHUEhrUmm3VqQ Content-Type: text/x-scheme Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=guix.scm (define-module (gnu packages hello) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix licenses) #:use-module (gnu packages gawk)) (package (name "hello") (version "2.10") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/hello/hello-" version ".tar.gz")) (sha256 (base32 "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--enable-silent-rules"))) (inputs `(("gawk" ,gawk))) (synopsis "Hello, GNU world: An example GNU package") (description "Guess what GNU Hello prints!") (home-page "https://www.gnu.org/software/hello/") (license gpl3+))) --MP_/CXAS0LY7kZVHUEhrUmm3VqQ-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 28 18:45:52 2021 Received: (at control) by debbugs.gnu.org; 28 Oct 2021 22:45:52 +0000 Received: from localhost ([127.0.0.1]:53467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgE9f-0002e0-VL for submit@debbugs.gnu.org; Thu, 28 Oct 2021 18:45:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgE9e-0002dn-Dp for control@debbugs.gnu.org; Thu, 28 Oct 2021 18:45:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40180) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgE9Z-0005e8-5O for control@debbugs.gnu.org; Thu, 28 Oct 2021 18:45:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=HWIuDqV3X5gW8znpntkVtstnxjpKHI966maI5B7vPsE=; b=JhCRNg99/eknPD ccFVdkmFuxMVEnXO6WD+uTuWRV8K+mXsIwgJBRythuDqqounE8qFcoceVXDzZu7FN7wyJRZXfddrx I6Qnm6piBPbWIEZ3bIQycDdlzi7wsP8jaIOKBX6O9Pro3HxB55tmGMvVlSf4Siv+S2/JvJ0q6zAQy ruZJpfE3c+o3XnXyU4UCdQ14BY4Jp29bs/jvMFMfO/z/hwYRt/y3XeaWtjxq6AiIkaievOmlFbEF/ mlhnSL9Cgfq3i2TqSbb5fIKhA25ctnbfgHiqystMdr0b+fqFEs3QJM9+zSJDkW5vPScbhlJ52UIeZ lc6ijNGFDb3CWHgIn/7w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:54872 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgE9T-00050o-07 for control@debbugs.gnu.org; Thu, 28 Oct 2021 18:45:44 -0400 Date: Fri, 29 Oct 2021 00:45:37 +0200 Message-Id: <874k904vla.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #51463 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) severity 51463 important quit From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 07 17:14:57 2021 Received: (at 51463-done) by debbugs.gnu.org; 7 Nov 2021 22:14:57 +0000 Received: from localhost ([127.0.0.1]:55139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjqR4-00012d-Sh for submit@debbugs.gnu.org; Sun, 07 Nov 2021 17:14:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjqR2-00012N-5l for 51463-done@debbugs.gnu.org; Sun, 07 Nov 2021 17:14:45 -0500 Received: from [2001:470:142:3::e] (port=57628 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjqQw-0000oV-QC; Sun, 07 Nov 2021 17:14:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=cnoY6lHYbpZIAWaz8GZVPbtTZMdraIjFj6mjuG0A4pg=; b=hWFFU59pW3yxebbMORY+ 0H+6k+JkgjVRm4Tr+v5f28B4tkC4Ipz3MDysQjkK4JL8uW+xGd+U0qlhGqX20BIhf/9P/wCvnryyk 8a46cjztVLvFb0E0YZIqzj2Mc00hUc8gvV7K8qTa8HBrWxdtoijGsTfMjnPIzyq0ZikE7nJAtOISy mclL9connDGI2mXajb7c9FHduiG2Z2iN9efqZHfAxoRZAUcI9DxCKs50oJXIujnJNzdSBQKOe1SqN QTa1kSx90qDcP5NP5Ye4C2Tb7bYTgRAVn4ZO3a5PjO9X2teMVo5/X2oqVrEmJxMgtK5B1KWa0pbLh vUmtqpbtYAVRMg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:55552 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjqQw-00056j-Gp; Sun, 07 Nov 2021 17:14:38 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Alice BRENON Subject: Re: bug#51463: Lack of error message in several guix subcommands References: <20211028191517.719afb83@ens-lyon.fr> Date: Sun, 07 Nov 2021 23:14:36 +0100 In-Reply-To: <20211028191517.719afb83@ens-lyon.fr> (Alice BRENON's message of "Thu, 28 Oct 2021 19:15:17 +0200") Message-ID: <87ee7rk3zn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51463-done Cc: 51463-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Alice, Alice BRENON skribis: > I was giving guix shell a try today and noticed this annoying lack of > relevant feedback from the tool: when running on a particularly > malformed guix.scm, either by auto-loading or by explicitely passing -f > guix.scm, guix shell returned in error ($? =3D=3D 1) without printing any > error message, which is a bit unhelpful. I believe commit 4d59596a1c5f6b20870e619cbf67068ac7dd64ff fixes it (the issue affected =E2=80=98read-error=E2=80=99 exceptions for reasons other th= an missing closing parentheses). Let me know if anything=E2=80=99s amiss. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 08 05:54:48 2021 Received: (at 51463-done) by debbugs.gnu.org; 8 Nov 2021 10:54:48 +0000 Received: from localhost ([127.0.0.1]:56568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk2IZ-0000eA-Uo for submit@debbugs.gnu.org; Mon, 08 Nov 2021 05:54:48 -0500 Received: from mail-wm1-f52.google.com ([209.85.128.52]:34578) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk2IY-0000dw-Rw for 51463-done@debbugs.gnu.org; Mon, 08 Nov 2021 05:54:47 -0500 Received: by mail-wm1-f52.google.com with SMTP id o4-20020a1c7504000000b0032cab7473caso10074867wmc.1 for <51463-done@debbugs.gnu.org>; Mon, 08 Nov 2021 02:54:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=JnROaPOGHrRK5McRspYSeykZcpRENAeOhQhCYNFavLU=; b=DTu7iaZsCzeZx5TsobtsID5dGY8XQETbHSCR7LDL6FwDgsVngNL3rZJfhJ+ocbPZgO FriHqYmOHI1eOCtzR/2p+Foh82nyI8TJmUNotFL2xrhpi9Mrti1PJYUqQ8X21a4J02Z8 PU11mYjwzs8OqZkcnemGoSYxLJ5ShLzWFDu/PwHv+xjLF55lQMDtRP7nmtFlOQfhtX6r jkgKkaWvHt9Vx/Dama0HeOWGTFcJtJPHaKUhJYK27YMlDo/ilkiK1s6dT7m5xP8Hgnsl agmDcTXWF6r9JRtL9SFCWA337/wkNkTfoKXHVuSlvakJum3QqPgVjQCI3UdeAONsrO28 o1Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=JnROaPOGHrRK5McRspYSeykZcpRENAeOhQhCYNFavLU=; b=17/kx0PU8zt38qvS+e4ZvE5TbEuWqrZVu3qLnCJ7aaMOmS4ZjReJErSsj/lzAf7W6L IEoDnnwYqLAw7ZT3tklUiWl+EiVB3J2uxaIctFU6J4+oYrktTYy9SEq6GKcYRT7lVREg FxgxqKRga1qSCu8bYVO+kIyD9CnekAFF6/IsJXJ/UvYToEjkiED/NXcFnZHSk161rZQW ZLtANjyU9T51mfimgPOl2d2Kq8i54AhxbX2vome8U2yIyQJSLMeY52zL2fDUkjXkRsVg uHFWxFshDoJZYAB04SLe+ly7prHzExTKa4J6ZRKiYcZAsK5fevvrgAzUqfKQUey+3s+T lHyg== X-Gm-Message-State: AOAM531yxuaWvWU6X3pPGpgAKKqbtO+s/oVkTPgF8EVtzGlcXI6l8/tZ p9Qe42Pa3/MivUeFjR6kwVi8Qr6XI50= X-Google-Smtp-Source: ABdhPJzqEsxrmb7UXE11pldfRr+xeDfJYpva8fvBulTFURPPudsjDsKNR4JQRiVP7IoPBfhS+6zFHQ== X-Received: by 2002:a05:600c:253:: with SMTP id 19mr51033944wmj.179.1636368880791; Mon, 08 Nov 2021 02:54:40 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id 126sm19012879wmz.28.2021.11.08.02.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 02:54:40 -0800 (PST) From: zimoun To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Alice BRENON Subject: Re: bug#51463: Lack of error message in several guix subcommands In-Reply-To: <87ee7rk3zn.fsf@gnu.org> References: <20211028191517.719afb83@ens-lyon.fr> <87ee7rk3zn.fsf@gnu.org> Date: Mon, 08 Nov 2021 11:45:18 +0100 Message-ID: <86bl2vsz7l.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51463-done Cc: 51463-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, On Sun, 07 Nov 2021 at 23:14, Ludovic Court=C3=A8s wrote: > I believe commit 4d59596a1c5f6b20870e619cbf67068ac7dd64ff fixes it (the > issue affected =E2=80=98read-error=E2=80=99 exceptions for reasons other = than missing > closing parentheses). With your fix, I am questioning the =E2=80=99if=E2=80=99 test. Introduced = before 524c9800afb433cc474132185d8e37f72004adb3. For instance, it reads, --8<---------------cut here---------------start------------->8--- /tmp/pkgs/foo.scm:26:1: missing closing parenthesis --8<---------------cut here---------------end--------------->8--- when Guile reports, --8<---------------cut here---------------start------------->8--- /tmp/foo.scm:25:1: unexpected end of input while searching for: ) --8<---------------cut here---------------end--------------->8--- and this message is parsed to catch and report the first message, instead. Well, I agree that on one hand, Guile error messages seem badly worded for newcomers. On the other hand, post 4d59596a1c5f6b20870e619cbf67068ac7dd64ff, the message for extra parenthesis, --8<---------------cut here---------------start------------->8--- guix repl: error: read error while loading '/tmp/pkgs/foo.scm': /tmp/pkgs/f= oo.scm:25:23: unexpected ")" --8<---------------cut here---------------end--------------->8--- is inconsistent from the one for missing parenthesis. Other said, the then-branch uses =E2=80=99format=E2=80=99 and the else-branch uses =E2=80= =99report-error=E2=80=99. Some Guile errors are sometimes cryptic (the reason of =E2=80=9Cmissing clo= sing parenthesis=E2=80=9D I guess), therefore, the question is: do we add =E2=80= =99cond=E2=80=99 branches for each cases? Using =E2=80=9Creport-error=E2=80=9D for all? Or d= o we only rely on Guile error messages? Dropping =E2=80=99if=E2=80=99 test. Last, checking and playing with all that, I note that this catch is done when using =E2=80=99load*=E2=80=99 and nothing is done for option =E2=80=99= load-path=E2=80=99. Cheers, simon From unknown Wed Jun 18 00:24:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 06 Dec 2021 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator