[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'.
From: |
Ludovic Courtès |
Subject: |
[bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'. |
Date: |
Wed, 24 Jul 2019 00:30:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) |
Hello,
address@hidden (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’.
- [bug#36555] [PATCH v4 1/3] guix system: Add 'reconfigure' module., (continued)
- [bug#36555] [PATCH v4 1/3] guix system: Add 'reconfigure' module., Jakob L. Kreuze, 2019/07/19
- [bug#36555] [PATCH v4 2/3] guix system: Reimplement 'reconfigure'., Jakob L. Kreuze, 2019/07/19
- [bug#36555] [PATCH v4 3/3] tests: Add reconfigure system test., Jakob L. Kreuze, 2019/07/19
- [bug#36555] [PATCH v4 3/3] tests: Add reconfigure system test., Ludovic Courtès, 2019/07/20
- [bug#36555] [PATCH v4 3/3] tests: Add reconfigure system test., Jakob L. Kreuze, 2019/07/22
- [bug#36555] [PATCH v4 3/3] tests: Add reconfigure system test., Jakob L. Kreuze, 2019/07/22
- [bug#36555] [PATCH v5 0/3] Refactor out common behavior for system reconfiguration., Jakob L. Kreuze, 2019/07/22
- [bug#36555] [PATCH v5 1/3] guix system: Add 'reconfigure' module., Jakob L. Kreuze, 2019/07/22
- [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'., Jakob L. Kreuze, 2019/07/22
- [bug#36555] [PATCH v5 3/3] tests: Add reconfigure system test., Jakob L. Kreuze, 2019/07/22
- [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'.,
Ludovic Courtès <=
- [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'., Jakob L. Kreuze, 2019/07/23
- [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'., Jakob L. Kreuze, 2019/07/23
- [bug#36555] [PATCH v6 0/3] Refactor out common behavior for system reconfiguration., Jakob L. Kreuze, 2019/07/24
- [bug#36555] [PATCH v6 1/3] guix system: Add 'reconfigure' module., Jakob L. Kreuze, 2019/07/24
- [bug#36555] [PATCH v6 2/3] guix system: Reimplement 'reconfigure'., Jakob L. Kreuze, 2019/07/24
- [bug#36555] [PATCH v6 3/3] tests: Add reconfigure system test., Jakob L. Kreuze, 2019/07/24
- bug#36555: [PATCH v6 3/3] tests: Add reconfigure system test., Ludovic Courtès, 2019/07/26
- [bug#36555] [PATCH v6 3/3] tests: Add reconfigure system test., Jakob L. Kreuze, 2019/07/26
- [bug#36555] [PATCH v5 2/3] guix system: Reimplement 'reconfigure'., Ludovic Courtès, 2019/07/24
- [bug#36555] [PATCH v4 3/3] tests: Add reconfigure system test., Ludovic Courtès, 2019/07/23