From: Alice BRENON <alice.brenon@ens-lyon.fr>
To: 51463@debbugs.gnu.org
Subject: bug#51463: Lack of error message in several guix subcommands
Date: Thu, 28 Oct 2021 19:15:17 +0200 [thread overview]
Message-ID: <20211028191517.719afb83@ens-lyon.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]
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 ($? == 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 …) 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épôt : https://git.savannah.gnu.org/git/guix.git
branche : master
commit : 5cbf9a48d766191d8f17b2e9d1cf7b7db69b99ea
Regards,
Alice
[1]
https://guix.gnu.org/manual/devel/en/html_node/Defining-Packages.html
[-- Attachment #2: guix.scm --]
[-- Type: text/x-scheme, Size: 825 bytes --]
(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+)))
next reply other threads:[~2021-10-28 17:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-28 17:15 Alice BRENON [this message]
2021-11-07 22:14 ` bug#51463: Lack of error message in several guix subcommands Ludovic Courtès
2021-11-08 10:45 ` zimoun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211028191517.719afb83@ens-lyon.fr \
--to=alice.brenon@ens-lyon.fr \
--cc=51463@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).