Subject: [bug#50238] [PATCH] build-self: Try printing nicer error messages --- verifying if it doesn't break anything

From: Maxime Devos <[email-masked]>
Date: Tue, 22 Mar 2022 21:46:15 +0100

Maxime Devos schreef op za 19-03-2022 om 10:13 [+0100]:
> 1.3.0 is not a good test though because it's relatively recent, I'll
> try some older versions as well.

I tried from 1.1.0, seems like it fails because [email-masked] does not have
with-exception-handler:

Backtrace:
           5 (primitive-load "/gnu/store/jdf2z2vl4gc6yzl5gglixd5jpflcgikm-compute-guix-derivation")
In ice-9/eval.scm:
    155:9  4 (_ #(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#<directory (guile-u?> ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?))
    159:9  3 (_ #(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#<directory (guile-u?> ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?))
In ice-9/boot-9.scm:
    152:2  2 (with-fluid* _ _ _)
    152:2  1 (with-fluid* _ _ _)
In srfi/srfi-34.scm:
     38:0  0 (with-exception-handler #<procedure 7f3a57d078b8 at ./guix/ui.scm:694:2 (c)> #<procedure 7f3a582457c0 ?> ?)

srfi/srfi-34.scm:38:0: In procedure with-exception-handler:
Wrong number of arguments to #<procedure with-exception-handler (handler thunk)>
Computing Guix derivation for 'x86_64-linux'...  guix time-machine: error: You found a bug: the program '/gnu/store/jdf2z2vl4gc6yzl5gglixd5jpflcgikm-compute-guix-derivation'
failed to compute the derivation for Guix (version: "aac29b952e558e20ac97a95713b15ac453e59742"; system: "x86_64-linux";
host version: "1.1.0rc2-1.9d0d27f"; pull-version: 1).
Please report the COMPLETE output above by email to <[email-masked]>.

I guess the simplest solution is to only do 'with-error-handler' wrapping
when guile-version>=3.0 ...

Greetings,
Maxime.