GNU bug report logs - #36555
[PATCH 0/2] Refactor out common behavior for system reconfiguration.

Previous Next

Package: guix-patches;

Reported by: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)

Date: Mon, 8 Jul 2019 19:53:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
Cc: 36555 <at> debbugs.gnu.org
Subject: [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'.
Date: Wed, 24 Jul 2019 00:30:51 +0200
Hello,

zerodaysfordays <at> 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 lowered)))))

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’s
not good to report “failed to install bootloader” 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’.




This bug report was last modified 5 years and 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.