From patchwork Tue Mar 4 22:10:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 39694 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7831427BBE2; Tue, 4 Mar 2025 22:19:49 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F1BC527BBE9 for ; Tue, 4 Mar 2025 22:19:47 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tpaan-0007K8-4X; Tue, 04 Mar 2025 17:18:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tpaZo-0005S3-6o for guix-patches@gnu.org; Tue, 04 Mar 2025 17:17:24 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tpaZS-0003Sc-QW for guix-patches@gnu.org; Tue, 04 Mar 2025 17:17:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=PAjbOj+rX+fDAHImZzv+cKBc+Wjp4+JmxJq3faQW9/Y=; b=qZsWuq0/kx5j+dtfP8XfonXrUttqpGqohMdi7WIA56hdXTjMzyWPVCwYJ5hEkvP+xSs4Mp629g+F1EaRxbvtnNqlgN2vlLdwYmja/yPXNkImXwUsprOsoewAKW8HwylGdH2M6nd4qKXnzFlqQiJWGrqBxtqtkJFxn2HrVAXFI/KmBZr8swJN/4WTv6EvLX2tV3zuxBRGjtaiLL/lf2imn3cpcGsvzfAWXPJ2H/v2Lp5sr4Y1RrUGyx+q7nLHWvULwGps8OjVTuempqcayi8b0SwNST5prUMYvCfl5B2+A7XT2Q7RV14t0dpl1wG7Ny9z9Ns4EUxrr8ONHt/E1dYhqw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tpaZS-0003gM-JT for guix-patches@gnu.org; Tue, 04 Mar 2025 17:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76485] [PATCH v2] gexp: =?utf-8?b?4oCYd2l0aC1wYXJhbWV0ZXJz4oCZ?= properly handles =?utf-8?b?4oCYJWdyYWZ0P+KAmS4=?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 04 Mar 2025 22:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76485 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: David Elsing Cc: 76485@debbugs.gnu.org Received: via spool by 76485-submit@debbugs.gnu.org id=B76485.174112657514058 (code B ref 76485); Tue, 04 Mar 2025 22:17:02 +0000 Received: (at 76485) by debbugs.gnu.org; 4 Mar 2025 22:16:15 +0000 Received: from localhost ([127.0.0.1]:33377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tpaYg-0003ec-FP for submit@debbugs.gnu.org; Tue, 04 Mar 2025 17:16:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44692) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tpaYO-0003d5-RF for 76485@debbugs.gnu.org; Tue, 04 Mar 2025 17:15:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tpaYI-0002Gx-Tj; Tue, 04 Mar 2025 17:15:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=PAjbOj+rX+fDAHImZzv+cKBc+Wjp4+JmxJq3faQW9/Y=; b=hX8bNhCDg3EFBl+ezRER WIEY2lEBExLw9bRBQueOyEcDyu/Kot91dq/7Tc8C+K3jv3qPhPVC57uTcZLuspht8vcUq1j2ykAP7 CJVY4hvStOzauV6AAvbbcq9Pqye2JRaDKT/sx5onX38LCQA+gtslA2faEPM7UltCsYbqVs7+0v4HR 5XT9jbbrQWLO5pYe3b6SrEFrNWD8CSaPRrfkF5TsxZU36o9V/1mwSFWlj1FaEwLaCIkp0KJZmuVAO 44CpPi3ZLk8woLYmMz+DngUSRTLcna4wgsLZMwrHTil1d/1tlCA38vufcnYd95TOZAHjWrmfLU0TL iW5eEfNMJV9HcA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= In-Reply-To: <20250304203337.2628-1-david.elsing@posteo.net> (David Elsing's message of "Tue, 4 Mar 2025 20:33:08 +0000") References: <868qpky1uc.fsf@posteo.net> <20250304203337.2628-1-david.elsing@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 04 Mar 2025 23:10:28 +0100 Message-ID: <87v7so8n1n.fsf@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello, David Elsing skribis: > 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 Applied with the change below, in accordance with the deprecation policy. Thank you! Ludo’. PS: Let me know if I got the copyright line wrong. diff --git a/guix/monads.scm b/guix/monads.scm index 0df82bb4653..e1b056dc95f 100644 --- a/guix/monads.scm +++ b/guix/monads.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2017, 2022 Ludovic Courtès +;;; Copyright © 2013-2015, 2017, 2022, 2025 Ludovic Courtès +;;; Copyright © 2025 David Elsing ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +20,7 @@ (define-module (guix monads) #:use-module ((system syntax) #:select (syntax-local-binding)) + #:autoload (guix deprecation) (warn-about-deprecation) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) @@ -58,7 +60,8 @@ (define-module (guix monads) state-push state-pop run-with-state - state-parameterize)) + state-parameterize + mparameterize)) ;;; Commentary: ;;; @@ -618,4 +621,15 @@ (define-syntax state-parameterize (lambda () (mbegin %state-monad body ...)))))))) +(define-syntax mparameterize ;can be removed after 2026-03-05 + (lambda (s) + "This is the old form for 'state-parameterize', which pretended to work +with any monad but was in fact specialized for '%state-monad'." + (syntax-case s () + ((_ monad bindings body ...) + (begin + (warn-about-deprecation 'mparameterize (current-source-location) + #:replacement 'state-parameterize) + #'(state-parameterize bindings body ...)))))) + ;;; monads.scm end here