From 30e51cb6b42e86f9f94d6380f69a1020ee99ff39 Mon Sep 17 00:00:00 2001 From: David Elsing Date: Tue, 4 Mar 2025 20:33:08 +0000 Subject: gexp: ‘with-parameters’ properly handles ‘%graft?’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . * .dir-locals.el (scheme-mode): Remove mparameterize indentation rules. Add state-parameterize and store-parameterize indentation rules. * etc/manifests/system-tests.scm (test-for-current-guix): Replace mparameterize with store-parameterize. * etc/manifests/time-travel.scm (guix-instance-compiler): Likewise. * gnu/tests.scm (compile-system-test): Likewise. * guix/gexp.scm (compile-parameterized): Use state-call-with-parameters. * guix/monads.scm (mparameterize): Remove macro. (state-call-with-parameters): New procedure. (state-parameterize): New macro. * guix/store.scm (store-parameterize): New macro. * tests/gexp.scm ("with-parameters for %graft?"): New test. * tests/monads.scm ("mparameterize"): Remove test. ("state-parameterize"): New test. Co-authored-by: Ludovic Courtès Change-Id: I0c74066ca3f37072815b073fb3039925488a9645 Signed-off-by: Ludovic Courtès --- gnu/tests.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu') diff --git a/gnu/tests.scm b/gnu/tests.scm index 2a9e51511f0..1e3dbf09445 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -34,7 +34,7 @@ #:use-module (gnu services shepherd) #:use-module (guix discovery) #:use-module (guix monads) - #:use-module ((guix store) #:select (%store-monad)) + #:use-module ((guix store) #:select (%store-monad store-parameterize)) #:use-module ((guix utils) #:select (%current-system %current-target-system)) #:use-module (srfi srfi-1) @@ -289,9 +289,9 @@ the system under test." (define-gexp-compiler (compile-system-test (test ) system target) "Compile TEST to a derivation." - (mparameterize %store-monad ((%current-system system) - (%current-target-system target)) - (system-test-value test))) + (store-parameterize ((%current-system system) + (%current-target-system target)) + (system-test-value test))) (define (test-modules) "Return the list of modules that define system tests." -- cgit v1.3