unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>,
	"Alice BRENON" <alice.brenon@ens-lyon.fr>
Cc: 51463-done@debbugs.gnu.org
Subject: bug#51463: Lack of error message in several guix subcommands
Date: Mon, 08 Nov 2021 11:45:18 +0100	[thread overview]
Message-ID: <86bl2vsz7l.fsf@gmail.com> (raw)
In-Reply-To: <87ee7rk3zn.fsf@gnu.org>

Hi Ludo,

On Sun, 07 Nov 2021 at 23:14, Ludovic Courtès <ludo@gnu.org> wrote:

> I believe commit 4d59596a1c5f6b20870e619cbf67068ac7dd64ff fixes it (the
> issue affected ‘read-error’ exceptions for reasons other than missing
> closing parentheses).

With your fix, I am questioning the ’if’ 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/foo.scm:25:23: unexpected ")"
--8<---------------cut here---------------end--------------->8---

is inconsistent from the one for missing parenthesis. Other said, the
then-branch uses ’format’ and the else-branch uses ’report-error’.


Some Guile errors are sometimes cryptic (the reason of “missing closing
parenthesis” I guess), therefore, the question is: do we add ’cond’
branches for each cases? Using “report-error” for all? Or do we only
rely on Guile error messages?  Dropping ’if’ test.


Last, checking and playing with all that, I note that this catch is done
when using ’load*’ and nothing is done for option ’load-path’.


Cheers,
simon




      reply	other threads:[~2021-11-08 10:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 17:15 bug#51463: Lack of error message in several guix subcommands Alice BRENON
2021-11-07 22:14 ` Ludovic Courtès
2021-11-08 10:45   ` zimoun [this message]

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=86bl2vsz7l.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=51463-done@debbugs.gnu.org \
    --cc=alice.brenon@ens-lyon.fr \
    --cc=ludo@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).