From patchwork Sun May 15 04:36:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 39272 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 556D627BBEA; Sun, 15 May 2022 05:47:54 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham 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 D0AED27BBEA for ; Sun, 15 May 2022 05:47:53 +0100 (BST) Received: from localhost ([::1]:47942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nq6Ab-0002jy-2M for patchwork@mira.cbaines.net; Sun, 15 May 2022 00:47:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nq69m-00028B-Qu for guix-patches@gnu.org; Sun, 15 May 2022 00:47:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53965) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nq69m-0003aq-HZ for guix-patches@gnu.org; Sun, 15 May 2022 00:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nq69m-0002t3-Fq for guix-patches@gnu.org; Sun, 15 May 2022 00:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55424] [PATCH 002/602] etc/committer: Prefix (sxml xpath) symbols to avoid name conflict. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 15 May 2022 04:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55424 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55424@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 55424-submit@debbugs.gnu.org id=B55424.165259001111025 (code B ref 55424); Sun, 15 May 2022 04:47:02 +0000 Received: (at 55424) by debbugs.gnu.org; 15 May 2022 04:46:51 +0000 Received: from localhost ([127.0.0.1]:47851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nq69b-0002rl-59 for submit@debbugs.gnu.org; Sun, 15 May 2022 00:46:51 -0400 Received: from mail-qv1-f44.google.com ([209.85.219.44]:40894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nq69Z-0002rH-Rd for 55424@debbugs.gnu.org; Sun, 15 May 2022 00:46:50 -0400 Received: by mail-qv1-f44.google.com with SMTP id p3so9881193qvi.7 for <55424@debbugs.gnu.org>; Sat, 14 May 2022 21:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dRjeq9WVnxkT6uOeTkMMLjDJ1xzISCCU8cjqySxzKmg=; b=SnMI2rzeztRKVgzOVEYGjAXarlijnxbK5KUw7vfDYRAEHOL/SWZLqwDESUvrKQ6oJt iyt8+9IHT6erm7IX1fMmcZ1pgks+RETSNKOn8cFJbr5ThPKleSt3j5ILRy2DXvfXWbh6 hd71ivyo6+/bw//9qhM+nS+Lf455634b3iZjRp5ZmA8tDrlOULfi5SBnsTGddahKKi06 gfegsdc93kVV+cDBARxAAjyrhuCrTOWzisR7TbzkvXdX+XR9IOk64Aa6PHnwNehQm5xw 2lkOlCrfDctKY4zm4IPO/qUtExAtfzY6Kd6WsaochL2rKEzbbPT+yZSZ7OwkdGhuy4vD QoUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dRjeq9WVnxkT6uOeTkMMLjDJ1xzISCCU8cjqySxzKmg=; b=Vb7FGhG4s5eSYWbAP1NZ7ljnavMCi9+HZ9WSd1nhAqeeq47S/c1HMjPYrJUsNhQcz2 w8ZSD/lxpGrORAjR2VRmU9M/U7IJgeJIIL86dC+TcHV+ZxOjCzubo5GjsqreQ2C7UPGA Y8t2MvK6fP9rFpR2J4Cet+F/OgT7yZFeEC7JC2hu5qBiv8lHepptr4xUyd3sp1RegQGs YnnGMsgyXY+Xse1mtIItNPQpLyqZFdR989pZn1SX0weDQPaWL+RY289BK21vn7kLyceT cXKOTUWaCwxmq7FZPHg7q/nrXJVqWsZsQ2uKo6blbuJ6IkKhkVZ3Yb9o6PGdVSop8SnE Tqbg== X-Gm-Message-State: AOAM532w+IKnHb3jO11QORuU4rSRRzPF5y4yhbV8cyLZ3z79phYRbIbR shpVFd3l0H7F/U63vc3bLQOHitUMAAPv/w== X-Google-Smtp-Source: ABdhPJxO98jXjjFpfuIz6/iLjxfGOt/PTxrPZtd0TyfeFo7xY45NsatMJHBCzrG4Ue+rvGAW0IXScA== X-Received: by 2002:a05:6214:4006:b0:432:ea2b:5aad with SMTP id kd6-20020a056214400600b00432ea2b5aadmr10486902qvb.39.1652590004136; Sat, 14 May 2022 21:46:44 -0700 (PDT) Received: from localhost.localdomain (dsl-149-239.b2b2c.ca. [66.158.149.239]) by smtp.gmail.com with ESMTPSA id 2-20020ac82082000000b002f39b99f672sm4287690qtd.12.2022.05.14.21.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 May 2022 21:46:43 -0700 (PDT) From: Maxim Cournoyer Date: Sun, 15 May 2022 00:36:29 -0400 Message-Id: <20220515044629.6843-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220515044629.6843-1-maxim.cournoyer@gmail.com> References: <20220515044629.6843-1-maxim.cournoyer@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches This avoids a naming conflict for 'filter', provided by both (srfi srfi-1) and (sxml xpath). * etc/committer.scm.in: Use 'use-modules' instead of 'import', and use a prefix for the (sxml xpath) module. (new-sexp): Adjust accordingly. (change-commit-message): Likewise. --- etc/committer.scm.in | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/etc/committer.scm.in b/etc/committer.scm.in index 5a57d51577..3b37320e89 100755 --- a/etc/committer.scm.in +++ b/etc/committer.scm.in @@ -6,6 +6,7 @@ ;;; Copyright © 2020, 2021 Ricardo Wurmus ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,19 +29,19 @@ ;;; Code: -(import (sxml xpath) - (srfi srfi-1) - (srfi srfi-2) - (srfi srfi-9) - (srfi srfi-11) - (srfi srfi-26) - (ice-9 format) - (ice-9 popen) - (ice-9 match) - (ice-9 rdelim) - (ice-9 regex) - (ice-9 textual-ports) - (guix gexp)) +(use-modules ((sxml xpath) #:prefix xpath:) + (srfi srfi-1) + (srfi srfi-2) + (srfi srfi-9) + (srfi srfi-11) + (srfi srfi-26) + (ice-9 format) + (ice-9 popen) + (ice-9 match) + (ice-9 rdelim) + (ice-9 regex) + (ice-9 textual-ports) + (guix gexp)) (define* (break-string str #:optional (max-line-length 70)) "Break the string STR into lines that are no longer than MAX-LINE-LENGTH. @@ -214,10 +215,10 @@ (define (new-sexp hunk) (define* (change-commit-message file-name old new #:optional (port (current-output-port))) "Print ChangeLog commit message for changes between OLD and NEW." (define (get-values expr field) - (match ((sxpath `(// ,field quasiquote *)) expr) + (match ((xpath:sxpath `(// ,field quasiquote *)) expr) (() ;; New-style plain lists - (match ((sxpath `(// ,field list *)) expr) + (match ((xpath:sxpath `(// ,field list *)) expr) ((inner) inner) (_ '()))) ;; Old-style labelled inputs @@ -234,7 +235,7 @@ (define (listify items) (define variable-name (second old)) (define version - (and=> ((sxpath '(// version *any*)) new) + (and=> ((xpath:sxpath '(// version *any*)) new) first)) (format port "gnu: ~a: Update to ~a.~%~%* ~a (~a): Update to ~a.~%"