From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eLwiOmsrmGDTZgAAgWs5BA (envelope-from ) for ; Sun, 09 May 2021 20:35:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mBC9NWsrmGBjNQAAB5/wlQ (envelope-from ) for ; Sun, 09 May 2021 18:35:23 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 78CAF20C81 for ; Sun, 9 May 2021 20:35:23 +0200 (CEST) Received: from localhost ([::1]:35284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfoGv-0004h8-SK for larch@yhetil.org; Sun, 09 May 2021 14:35:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfoGd-0004gk-0X for guix-patches@gnu.org; Sun, 09 May 2021 14:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lfoGc-0001Sg-Pf for guix-patches@gnu.org; Sun, 09 May 2021 14:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lfoGc-0007sq-Lm for guix-patches@gnu.org; Sun, 09 May 2021 14:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48120] [PATCH] Teach etc/committer.scm.in some stuff References: Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 May 2021 18:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48120 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , 48120@debbugs.gnu.org Received: via spool by 48120-submit@debbugs.gnu.org id=B48120.162058527830271 (code B ref 48120); Sun, 09 May 2021 18:35:02 +0000 Received: (at 48120) by debbugs.gnu.org; 9 May 2021 18:34:38 +0000 Received: from localhost ([127.0.0.1]:56607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lfoG9-0007s7-SC for submit@debbugs.gnu.org; Sun, 09 May 2021 14:34:38 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:34746 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lfoG3-0007rm-LG for 48120@debbugs.gnu.org; Sun, 09 May 2021 14:34:32 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1620585259; bh=sM2Ww4uaftLd/Us2T4093+5NuvMlSr9eK7pj3qcLkac=; h=From:To:Subject:In-Reply-To:Date; b=TFhL5Asyhf+nAmXl/sBd8KJvt/lgBYqDG9NNTJzbmqIXoqFdJI9yxoOyesbA/obL0 /EPn+gT8ZnPTZkvimdv3xn/f+XpGHncROfEfWnP3NKtem+TiGwtdnkDmpFS+bYrtdM nDkV5S2pPOgjxWGIhJhibb7csBSqAAplrqMso/ng= In-Reply-To: <039cd7066fe774cb6c3faad5e745da158d865485.camel@telenet.be> Date: Sun, 09 May 2021 20:34:19 +0200 Message-ID: <87v97rhi38.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620585323; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MHfeVUcQ1PFE8vR5YWIgAJA54HhW+O43qzCqna4TLX8=; b=C3nzKnZxWCbhAPIpdH6b8zN/bSyPKFgEXGVYlPG9FR03mAPrIa3nIGv1JSY6pljSR6eKSc L3s7WOZjPzyUjVltajRsrkDa3W07uwR8vX0SmpDnrSa9rylhj5yecFO3i04RsHxMcIl41X Bojm1sZWaFRVGCqo6m1XwRYZKYvvkH9qsITiLhqEUWC7dOYNK4RvRgELO5Yn4XzZ+eeyw1 LbLYQW4ZqJTb5KllKnwBD/c7JrvC5mikdN+aWHK/z7bN0rhN6xWvaYBevUsbwLwxRH4tDQ dv7ym3DhxWzXnAJh5xuKaELMPBEvh24ovy7uxLkQZBsEq0o2zorOtOuIf9Ii9w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620585323; a=rsa-sha256; cv=none; b=pGi5vvkNSKn+s2rXkWGWtuOx3Y2vdjyGAuEsBxtdTIzTePa8nnCN63xCGTHYbkgHab4Oqc 0maRKwuqi34S2773CdhdpqVjXPxDC1TIMjII0fqEvGyEknl1bPiDwQ9QFeU+5cQ6TdqhvA LkfzQfIk9/pkbYoa6z0kSIHPVz73FCXjdqx3H0lOPihGSym3pf+l4MjUm9XxIKIRk7tgkZ 9MN5YuDtWSrvUN94bwG+MG7aWsu9WeRCUCZhXwzQyE2RgZEqZWaD8ZA5gAs26rUbUvZWQT 2wr2Jrl0McDd75090muxolMAIZzTz74kkX10+n4ZX+tYqTh721lD50ScGcXxYg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=TFhL5Asy; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.15 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=TFhL5Asy; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 78CAF20C81 X-Spam-Score: 0.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: GwJXzySfKHVs On Thu, May 06 2021, Maxime Devos wrote: > New patch series, handling more edge cases. > > It needs some changes in how it wraps lines now there > is a break-string procedure, but I don't have time to > work on this currently so I'll just submit it as-is for now. I don=E2=80=99t think I am qualified to review all of this, but it seems to= work after I made some minor fixes. I just used =E2=80=98cc-for-target=E2=80=99= instead of hardcoding =E2=80=98gcc=E2=80=99 on a random package, this is what I got. --8<---------------cut here---------------start------------->8--- gnu: eigensoft: Use the C cross-compiler. =20=20 * gnu/packages/bioinformatics.scm (eigensoft) [arguments]<#:make-flags>: Use the C cross-compiler, instead of hardcoding "gcc". --8<---------------cut here---------------end--------------->8--- > +(define (keyword-list->alist kwlist) > + (match kwlist > + (() '()) > + (((? keyword? k) object . rest) > + `((,k . ,object) . ,(keyword-list->alist rest))))) > + > +(define (pairwise-foreach-keyword proc . arguments) > + "Apply PROC with each keyword argument and corresponding values > +in ARGUMENTS. If a value is not present in a argument, pass #f instead." > + (let* ((alists (map keyword-list->alist arguments)) > + (keywords (delete-duplicates > + (apply append (map (cut map car <>) alists)) =E2=80=98append-map=E2=80=99 instead of (apply append (map ...) ...) ? > + eq?))) > + (for-each (lambda (keyword) > + (apply proc keyword > + (map (cut assoc-ref <> keyword) alists))) > + keywords))) > + > > [...] > > @@ -207,6 +263,14 @@ corresponding to the top-level definition containing= the staged changes." > (() '()) > ((first . rest) > (map cadadr first)))) > + ;; Like get-values, but also allow quote and do not treat > + ;; the value of the field as an alist. > + (define (get-values/list expr field) > + (match ((sxpath `(// ,field ,(node-or (sxpath '(quasiquote)) > + (sxpath '(quote))))) expr) > + (() '()) > + ((first . rest) > + (second first)))) > (define (listify items) > (match items > ((one) one) > @@ -245,6 +309,34 @@ corresponding to the top-level definition containing= the staged changes." > (listify removed) > (listify added)))))))))) > '(inputs propagated-inputs native-inputs))) I think the parentheses are mismatched here, {M-x check-parens} should comp= lain. --8<---------------cut here---------------start------------->8--- ~/src/guix $ guile etc/committer.scm.in ;;; note: source file /home/yoctocell/src/guix/etc/committer.scm ;;; newer than compiled /home/yoctocell/.cache/guile/ccache/3.0-LE-8-= 4.4/home/yoctocell/src/guix/etc/committer.scm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/yoctocell/src/guix/etc/committer.scm ;;; WARNING: compilation of /home/yoctocell/src/guix/etc/committer.scm fail= ed: ;;; In procedure read_inner_expression: etc/committer.scm:465:47: unexpecte= d ")" Backtrace: 4 (primitive-load "/home/yoctocell/src/guix/etc/committer.scm") In ice-9/eval.scm: 298:34 3 (_ #) 196:27 2 (_ #) 223:20 1 (proc #) In unknown file: 0 (%resolve-variable (7 . get-values/no-unquote) #) ERROR: In procedure %resolve-variable: Unbound variable: get-values/no-unquote --8<---------------cut here---------------end--------------->8--- > From 5f0313c01121a0a1e7f39f447425b5a8b70fb8c0 Mon Sep 17 00:00:00 2001 > From: Maxime Devos > Date: Sat, 1 May 2021 12:19:05 +0200 > Subject: [PATCH 11/11] etc: committer: Handle substitute-keyword-argument= s. > > * etc/committer.scm.in > (keyword-list->alist): Rename to ... > (keyword-list->alist/list): ..., and document the input format. >=20=20 > [...] > > -(define (keyword-list->alist kwlist) > +;; Input: a list of keywords and the corresponding values, > +;; without an exterior quote, quasiquote or list. > +(define (keyword-list->alist/list kwlist) > (match kwlist > (() '()) > (((? keyword? k) object . rest) > `((,k . ,object) . ,(keyword-list->alist rest))) ^^^^^^^^^^^^^^^^^^^ =E2=80=98keyword-list->alist/list=E2=80=99