Subject: [bug#50238] [PATCH] build-self: Try printing nicer error messages.

From: zimoun <[email-masked]>
Date: Tue, 08 Mar 2022 20:22:32 +0100

Hi,

On ven., 24 sept. 2021 at 13:59, Ludovic Courtès <[email-masked]> wrote:

> I sympathize with the goal but unsure about the implementation.

On one hand, I agree that the import of '(guix ui)' here feels "hum, it
seems an incorrect location", but...

> 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.

...on the other hand, where 'build-program' is called, i.e, 'build,
there is:

--8<---------------cut here---------------start------------->8---
        (format (current-error-port) "Computing Guix derivation for '~a'...  "
                system)
--8<---------------cut here---------------end--------------->8---

which is UI, no?  Idem for the message "You found a bug".

Well, I am unsure about the addition of '(guix ui)' and by
'with-error-handlng' in 'build-program'.  However, maybe the exception
handling could happen in the 'build' part.  WDYT?

Cheers,
simon