From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:50533) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hq3KH-0005Ge-Qk for guix-patches@gnu.org; Tue, 23 Jul 2019 18:32:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hq3KG-0000cu-Ut for guix-patches@gnu.org; Tue, 23 Jul 2019 18:32:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55195) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hq3KG-0000cm-RL for guix-patches@gnu.org; Tue, 23 Jul 2019 18:32:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hq3KF-0003yY-1h for guix-patches@gnu.org; Tue, 23 Jul 2019 18:32:04 -0400 Subject: [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87imsci9sj.fsf@sdf.lonestar.org> <87ef30i9fl.fsf@sdf.lonestar.org> <87y3129qsn.fsf@gnu.org> <87sgr9bziq.fsf@sdf.lonestar.org> <87pnmc7nt1.fsf@gnu.org> <8736j7nwcb.fsf@sdf.lonestar.org> <87muhfjm14.fsf@gnu.org> <87ftn63l7d.fsf@sdf.lonestar.org> <87v9w1zgon.fsf_-_@sdf.lonestar.org> <87y30v3qke.fsf@sdf.lonestar.org> <871rylrjt8.fsf_-_@sdf.lonestar.org> <87wogdq575.fsf_-_@sdf.lonestar.org> <87r26lq531.fsf_-_@sdf.lonestar.org> <87muh9q51e.fsf_-_@sdf.lonestar.org> <87wogc4v6e.fsf@gnu.org> <87zhl69box.fsf@sdf.lonestar.org> <87o91laojb.fsf_-_@sdf.lonestar.org> <87k1c9aofq.fsf_-_@sdf.lonestar.org> <87ftmxaodv.fsf_-_@sdf.lonestar.org> Date: Wed, 24 Jul 2019 00:30:51 +0200 In-Reply-To: <87ftmxaodv.fsf_-_@sdf.lonestar.org> (Jakob L. Kreuze's message of "Mon, 22 Jul 2019 14:57:16 -0400") Message-ID: <87ftmwz8mc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: "Jakob L. Kreuze" Cc: 36555@debbugs.gnu.org Hello, zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis: > +(define (local-eval exp) > + "Evaluate EXP, a G-Expression, in-place." > + (mlet* %store-monad ((lowered (lower-gexp exp)) > + (_ (built-derivations (map gexp-input-thing > + (lowered-gexp-inputs l= owered))))) Note that on current master this should be: (built-derivations (lowered-gexp-inputs lowered)) > + (save-load-path-excursion > + (set! %load-path (lowered-gexp-load-path lowered)) > + (set! %load-compiled-path (lowered-gexp-load-compiled-path lowered)) > + (return > + (guard (c ((message-condition? c) > + (leave (G_ "failed to install bootloader:~%~a~%") > + (condition-message c)))) > + (primitive-eval (lowered-gexp-sexp lowered))))))) My last grief for this patch series is exception handling above: it=E2=80= =99s not good to report =E2=80=9Cfailed to install bootloader=E2=80=9D whatever = the problem is. :-) Could we somehow move exception handling at the call sites? I know that monadic style makes it harder. The rest looks great, and congrats for being the first one to reconfigure with it! :-) Thanks, Ludo=E2=80=99.