unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: 50238@debbugs.gnu.org
Cc: ludo@gnu.org
Subject: [bug#50238] [PATCH] build-self: Try printing nicer error messages.
Date: Tue, 08 Mar 2022 19:58:45 +0100	[thread overview]
Message-ID: <89a84004d1fbc60f7d13eb91cb2d8239beb506d8.camel@telenet.be> (raw)
In-Reply-To: <b8eaa03230227033135d919aaafe76ad5af1eefc.camel@telenet.be>

[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]

> I sympathize with the goal but unsure about the implementation.
> 
> To me, compute-guix-derivation should remain as simple as possible
> and it shouldn't take care of UI concerns.  Having said that, I don't
> know how to address the problem above while sticking to this
> principle.
>
> WDYT?

*Something* should take care of UI concerns, and 'build-program' is in
a good position to do so.  I don't really see another way to do it
(except by serialising the exception and letting the Guix that is doing
the pulling report it, but that's even more fragile).  Where else could
the UI bits be done?

Additionally, while importing (guix ui) may seem rather daunting,
the error handling bits are only run when there's actually an error to
handle, so I expect it to be fine in practice --- it seems only
possible for this to break "guix pull" if "guix pull" would have failed
anyway.

I have one concern though: (guix ui) used with-exception-handler which
is new-ish with Guile 3.0 IIUC.  Do we need to support pulling from a
Guix of version Guile <2.2?  If so, a little compatibility code may
be necessary -- e.g., not doing the 'with-error-handling' when guile-
version=2.2.

I think the little bit of extra non-simplicity is worth the clarity
(not very much, but still useful) it brings to people on bug-guix and
people reporting the ‘guix pull: error: You found a bug: ...’ issues --
-- see the long list at
<https://issues.guix.gnu.org/search?query=%22you+found+a+bug%22>, and
compare it with the two extra lines of code.

In other terms, if we do a risk-benefit analysis, there is some risk,
but due to the large number of reports there would be much benefit.
And even though there is some risk (see e.g. the Guile 2.2/3.0 thing
above), whenever such an accident happens, it could quickly addressed
by pushing a new commit.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  parent reply	other threads:[~2022-03-08 18:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-28 14:36 [bug#50238] [PATCH] build-self: Try printing nicer error messages Maxime Devos
2021-09-24 11:59 ` Ludovic Courtès
2022-03-08 19:22   ` zimoun
2022-03-09 13:18     ` Maxime Devos
2022-03-08 18:58 ` Maxime Devos [this message]
2022-03-19  9:13 ` [bug#50238] [PATCH] build-self: Try printing nicer error messages --- verifying if it doesn't break anything Maxime Devos
2022-03-22 20:46   ` Maxime Devos
2022-03-22 20:55     ` Maxime Devos
2022-03-22 20:57     ` Maxime Devos
2022-03-22 22:24 ` [bug#50238] [PATCH v2] build-self: Try printing nicer error messages Maxime Devos
2022-03-27 20:17   ` Maxime Devos
2022-05-06 12:48 ` [bug#50238] [PATCH] " Maxime Devos
2022-06-13  2:03 ` Maxime Devos
2022-07-09 20:39 ` [bug#50238] Bug in compute-guix-derivation Maxime Devos via Guix-patches
2022-07-30 11:18 ` [bug#50238] [PATCH] build-self: Try printing nicer error messages Maxime Devos
2022-08-13 19:38 ` Maxime Devos

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=89a84004d1fbc60f7d13eb91cb2d8239beb506d8.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=50238@debbugs.gnu.org \
    --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).