From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 00/14] import: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162761707814384 (code B ref -1); Fri, 30 Jul 2021 03:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jul 2021 03:51:18 +0000 Received: from localhost ([127.0.0.1]:58639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JYL-0003jv-Jn for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:51:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:57736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JYK-0003jo-Fn for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:51:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9JYK-0005pm-6y for guix-patches@gnu.org; Thu, 29 Jul 2021 23:51:16 -0400 Received: from out1.migadu.com ([91.121.223.63]:37252) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9JYG-00020m-NH for guix-patches@gnu.org; Thu, 29 Jul 2021 23:51:15 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=aq6LrRYw3rj4U/flguoi7LyAJChVf887Xk0HajhUa+4=; b=IlbK46GtotFmti3yi4wkxSiPG5vQx2FURP5oagbl3paOoLMNuRfw4IARabsnQb6Nv/cNcv 0BptOxYL+FRnMULS7xilaMhtQQnlTjiUSvEFZ/m7Dzxe6nKM01hJ45yORuyHqoDr4XOf9j l20Mheaauz0Q3sM+tuG//2avJrTdFHw= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:51:04 -0700 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev Received-SPF: pass client-ip=91.121.223.63; envelope-from=iskarian@mgsn.dev; helo=out1.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hello Guix, I noticed that we have an ARGS-FOLD* wrapper called PARSE-COMMAND-LINE which has the same invalid argument message as the importers, the same argument handler, and has an option hint feature. So let's use that in the importers. The change is identical across all importers, and the semantics as far as return value are identical, so this should just be a drop-in. -- Sarah Morgensen (14): import: go: Use PARSE-COMMAND-LINE for options. import: egg: Use PARSE-COMMAND-LINE for options. import: gem: Use PARSE-COMMAND-LINE for options. import: gnu: Use PARSE-COMMAND-LINE for options. import: cpan: Use PARSE-COMMAND-LINE for options. import: cran: Use PARSE-COMMAND-LINE for options. import: elpa: Use PARSE-COMMAND-LINE for options. import: json: Use PARSE-COMMAND-LINE for options. import: opam: Use PARSE-COMMAND-LINE for options. import: pypi: Use PARSE-COMMAND-LINE for options. import: crate: Use PARSE-COMMAND-LINE for options. import: texlive: Use PARSE-COMMAND-LINE for options. import: hackage: Use PARSE-COMMAND-LINE for options. import: stackage: Use PARSE-COMMAND-LINE for options. guix/scripts/import/cpan.scm | 9 +++------ guix/scripts/import/cran.scm | 9 +++------ guix/scripts/import/crate.scm | 10 +++------- guix/scripts/import/egg.scm | 9 +++------ guix/scripts/import/elpa.scm | 9 +++------ guix/scripts/import/gem.scm | 9 +++------ guix/scripts/import/gnu.scm | 9 +++------ guix/scripts/import/go.scm | 9 +++------ guix/scripts/import/hackage.scm | 9 +++------ guix/scripts/import/json.scm | 9 +++------ guix/scripts/import/opam.scm | 9 +++------ guix/scripts/import/pypi.scm | 9 +++------ guix/scripts/import/stackage.scm | 9 +++------ guix/scripts/import/texlive.scm | 9 +++------ 14 files changed, 42 insertions(+), 85 deletions(-) base-commit: daeef2e7f4f36df7a098c9aee7c03546d8691d39 -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 01/14] import: go: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761731614826 (code B ref 49780); Fri, 30 Jul 2021 03:56:01 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:16 +0000 Received: from localhost ([127.0.0.1]:58654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcB-0003r4-V4 for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:16 -0400 Received: from out1.migadu.com ([91.121.223.63]:22046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Jc8-0003qt-Qk for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:14 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617311; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=EqkhQhAAERMpIV1MOJklSOYrbX6JgWMBRQi5n0e07kY=; b=d0fQrGRSsq7Tsnt70gYGxrFI30zmQT5/7itQmnfH0xuGNNH2/js8f/xr3olMXrrG3sEjqg M5kdSLWsGmxVXkFlSaxO7kbgAu5GhLIJQy3mf5xogvfsPticihyNS4k2VynFP4buWZcleM k2Up/NXWqjRF+A0EikHGvaWjZocdv9w= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:54:57 -0700 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) guix/scripts/import/go.scm (guix-import-go)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/go.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/go.scm b/guix/scripts/import/go.scm index 74e8e60cce..e08a1e427e 100644 --- a/guix/scripts/import/go.scm +++ b/guix/scripts/import/go.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2020 Katherine Cox-Buday ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -83,12 +84,8 @@ that are not yet in Guix")) (define (guix-import-go . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 02/14] import: egg: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761731814841 (code B ref 49780); Fri, 30 Jul 2021 03:56:01 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:18 +0000 Received: from localhost ([127.0.0.1]:58657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcE-0003rI-6e for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:18 -0400 Received: from out0.migadu.com ([94.23.1.103]:28407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcC-0003r3-NC for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:17 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617314; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=m5BV66pUOEW6f8G2bNqZuFoJmOaPBm44iap7Jy8qQV8=; b=Z1Yz7fshH6FfHbeEqq2VHdV6eFqnMco9xTTmreSyo234iPI9QxCG1EumEKMdoYK+qJlVSl kr1kpYekIi3JBkC5oyOQwdur/EBzlR6LpZqkmw/bE6tj/nfoLMZbuHoUtdA4iwhjpJ+LFE C5uHtlv/cEGx9HQlT6IxLer7UZdkrcE= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:54:58 -0700 Message-Id: <5a19dcc9709dcacc09e08bfc7db6fb2c872ba596.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: guix/scripts/import/egg.scm (guix-import-egg)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/egg.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(- [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [94.23.1.103 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [94.23.1.103 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) guix/scripts/import/egg.scm (guix-import-egg)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/egg.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/egg.scm b/guix/scripts/import/egg.scm index 7dbd6fcd5a..829cdc2ca0 100644 --- a/guix/scripts/import/egg.scm +++ b/guix/scripts/import/egg.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -71,12 +72,8 @@ Import and convert the egg package for PACKAGE-NAME.\n")) (define (guix-import-egg . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (repo (and=> (assoc-ref opts 'repo) string->symbol)) -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 03/14] import: gem: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761732114863 (code B ref 49780); Fri, 30 Jul 2021 03:56:02 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:21 +0000 Received: from localhost ([127.0.0.1]:58661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcH-0003ra-Dm for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:21 -0400 Received: from out2.migadu.com ([188.165.223.204]:20471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcF-0003rR-Tp for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:20 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617317; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=/s65LPBYjh58qMMnyvUWY/dXba9ENb9xhIopi19liMc=; b=cTShgT7Y2+FgXzsOE4/49wDaePqmw3AidfWzHje/i9DxIycYFiTIhSq8wtl+hSUwJGU4M1 r5EGVOeifLWTaZn9vkVl802iXjJW/lxJg1p70Z5CUoHZ322poE8ZB4M47pETD5VcWn1IRA in46TEqGA5KLg0YWqjYlQBFu5vgOgVE= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:54:59 -0700 Message-Id: <88cd802f44b842faf7a87329b01a7860ff38e1e7.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) guix/scripts/import/gem.scm (guix-import-gem)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/gem.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/gem.scm b/guix/scripts/import/gem.scm index c64596b514..65d2bf10b4 100644 --- a/guix/scripts/import/gem.scm +++ b/guix/scripts/import/gem.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson ;;; Copyright © 2018 Oleg Pykhalov +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -73,12 +74,8 @@ Import and convert the RubyGems package for PACKAGE-NAME.\n")) (define (guix-import-gem . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 04/14] import: gnu: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761732514881 (code B ref 49780); Fri, 30 Jul 2021 03:56:02 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:25 +0000 Received: from localhost ([127.0.0.1]:58664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcK-0003rw-OJ for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:25 -0400 Received: from out0.migadu.com ([94.23.1.103]:28425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcH-0003rZ-4x for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:21 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617320; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=pxo3O6SA3qccE2jfs/y0ik2f7Jo5gq99kgWWzSYhqJw=; b=lApxyKgCwm3oG5aOfIwfBte8/bnutkhrOOND0BUOCFZEOkopNATUIK6nH6DjH2FpmyzV1M ltas+eEn4SifLqY/hq4g0ASkSXciJy+gz19QXdZL/H/hxnTF+AWCZltEiDEvsCafMsiHuz ihgt09ZuVI+MSwIb7HD2lbet6BUnKSw= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:00 -0700 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) guix/scripts/import/gnu.scm (guix-import-gnu)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/gnu.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/gnu.scm b/guix/scripts/import/gnu.scm index ae98370037..344e363abe 100644 --- a/guix/scripts/import/gnu.scm +++ b/guix/scripts/import/gnu.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2016 Ludovic Courtès +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,12 +82,8 @@ Return a package declaration template for PACKAGE, a GNU package.\n")) (define (guix-import-gnu . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 05/14] import: cpan: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761732514889 (code B ref 49780); Fri, 30 Jul 2021 03:56:03 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:25 +0000 Received: from localhost ([127.0.0.1]:58667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcL-0003ry-2g for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:25 -0400 Received: from out2.migadu.com ([188.165.223.204]:20480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcJ-0003rn-21 for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:23 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617322; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=bWpmecEbp8n8ctoarYkhplymaKeOTof+rdLOZ8SAjeM=; b=SmmkZI6n8aujTVxWTzxlV/BgHu8SgQYhqkhIC3s9cs7l4N3YgjzIcCPIZfm3cXDE9Dx7kZ 6ctRyK5ntxtcN0fAmuzgdByezF9lsxLSarlWrpDVIwhaDAY2bcgpA4x5KY2d0wkXy4FjZ0 Z53fBuNzSyUf2lfLlKYpYKnJvZygqfk= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:01 -0700 Message-Id: <94492cb4dec436cfa3968af23db192a6e199ccea.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) guix/scripts/import/cpan.scm (guix-import-cpan)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/cpan.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/cpan.scm b/guix/scripts/import/cpan.scm index 77ffe1f38e..bdf5a1e423 100644 --- a/guix/scripts/import/cpan.scm +++ b/guix/scripts/import/cpan.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Eric Bavier +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,12 +67,8 @@ Import and convert the CPAN package for PACKAGE-NAME.\n")) (define (guix-import-cpan . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 06/14] import: cran: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761733214927 (code B ref 49780); Fri, 30 Jul 2021 03:56:03 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:32 +0000 Received: from localhost ([127.0.0.1]:58671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcR-0003sa-FV for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:31 -0400 Received: from out0.migadu.com ([94.23.1.103]:28441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcK-0003rv-Ui for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:26 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617324; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=81ao+knwzwVZ3AmCy8Ec6zpX3jJLJcCLa7mKZRt2I7I=; b=XjGYaaZ0mCpec6hZ1nIVGhU8/cKtW1R+5aIp6MV0mGkmqvIq4rcgAFE+870R3ZzQuBiu3g liDs/Iy5MFMPsNGI+RgHOrZ8YOcnCctz3ILEUweOauCLaWSOlCVsmLqVtz/Jje3Xqzn3rH wcyW7t8VyzyMi6xFjNiWfEefdX+7PD4= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:02 -0700 Message-Id: <4600ae9cdab23bc81790a9a2098d813ea2941205.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) guix/scripts/import/cran.scm (guix-import-cran)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/cran.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/cran.scm b/guix/scripts/import/cran.scm index aa3ef324e0..3e4b038cc4 100644 --- a/guix/scripts/import/cran.scm +++ b/guix/scripts/import/cran.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015, 2017, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2020 Martin Becze +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -86,12 +87,8 @@ Import and convert the CRAN package for PACKAGE-NAME.\n")) (define (guix-import-cran . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 07/14] import: elpa: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761733214935 (code B ref 49780); Fri, 30 Jul 2021 03:56:03 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:32 +0000 Received: from localhost ([127.0.0.1]:58674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcS-0003si-1P for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:32 -0400 Received: from out0.migadu.com ([94.23.1.103]:28452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcN-0003sJ-0X for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:27 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617326; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=zsoutCcvTxLsNTVvpGfNLG9KuRmFnRITiqbEGBf3yGI=; b=BQosh9914t7lA72smByk0coXSWvIlI2axA1d6LMwunoRn4lq/ycCdEcXXSjBlUhCNDahfE 2yiKfoviPxgKieqMTwhBy48813uwnFQJF4BKiVXaz7Vcs7sFbUl2Ifbz7JT+VXJ5JO63/Z +befgDYpAKj7NUoI0vljCpXvASc1fMo= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:03 -0700 Message-Id: <8fdf9feebd6ec374c15d0b80948fd985f1c2312a.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) guix/scripts/import/elpa.scm (guix-import-elpa)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/elpa.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/elpa.scm b/guix/scripts/import/elpa.scm index d6b38e5c4b..052b0cc0e7 100644 --- a/guix/scripts/import/elpa.scm +++ b/guix/scripts/import/elpa.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2020 Martin Becze +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -80,12 +81,8 @@ Import the latest package named PACKAGE-NAME from an ELPA repository.\n")) (define (guix-import-elpa . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 08/14] import: json: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761733214941 (code B ref 49780); Fri, 30 Jul 2021 03:56:04 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:32 +0000 Received: from localhost ([127.0.0.1]:58676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcS-0003sq-CY for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:32 -0400 Received: from out0.migadu.com ([94.23.1.103]:28465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcP-0003sR-6a for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:29 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617328; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=92z/ICd7Zm8rRGVS1N97oEsSx/CL2+wMuI1BnTIV7Os=; b=IX7if4DeFHcxlzu6BxYPhAzACQCV00/a1iw1ppPFkwvSqWBKU8+9NI5K5nrskeI8UUeon8 bugItKADM9d/ceDip9P4/nDNVgFZAPiGvp0Hm2+q2+GsUhIP4GZelAoKU7pHDfGojoDodC gphOVqZWr9TAFe0QD+PZnR3UgP6aeMc= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:04 -0700 Message-Id: <0136e6efdb033fc2bdf8bd0c4a0a9d64eb742115.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) guix/scripts/import/json.scm (guix-import-json)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/json.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/json.scm b/guix/scripts/import/json.scm index d8d5c3a4af..a3b5e6d79c 100644 --- a/guix/scripts/import/json.scm +++ b/guix/scripts/import/json.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015, 2017 Ricardo Wurmus ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -74,12 +75,8 @@ Import and convert the JSON package definition in PACKAGE-FILE.\n")) (define (guix-import-json . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 09/14] import: opam: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761734114978 (code B ref 49780); Fri, 30 Jul 2021 03:56:04 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:41 +0000 Received: from localhost ([127.0.0.1]:58681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Jca-0003tU-Ps for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:41 -0400 Received: from out0.migadu.com ([94.23.1.103]:28474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcR-0003sZ-EH for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:31 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617330; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=Dh2AbnD8EIWx3k3E3nO64zmrPhb/z555zakDLcYtn9A=; b=g3tkc0ZQq1chnX3gxsArvIi4IO78e0he+Yac4Ci5SFpy99J9HyRq8dJMPexxlskdGuRhpP rhsaMuT8wM5h6ivu5n8cpW0ynheziKJAc0La2BbFtfmemi3r3Z0fbE057zrNX1DeUVkaLY W8O1rN7O/DGm9J9+7vuQ3WWrOpSriFU= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:05 -0700 Message-Id: <2f03c9d080eeec52abbe43db2c1c02099086c2b2.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) guix/scripts/import/opam.scm (guix-import-opam)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/opam.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/opam.scm b/guix/scripts/import/opam.scm index da9392821c..64164e7cc4 100644 --- a/guix/scripts/import/opam.scm +++ b/guix/scripts/import/opam.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Julien Lepiller +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -76,12 +77,8 @@ Import and convert the opam package for PACKAGE-NAME.\n")) (define (guix-import-opam . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (repo (and=> (assoc-ref opts 'repo) string->symbol)) -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 10/14] import: pypi: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761734114985 (code B ref 49780); Fri, 30 Jul 2021 03:56:04 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:41 +0000 Received: from localhost ([127.0.0.1]:58683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Jcb-0003tX-2I for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:41 -0400 Received: from out2.migadu.com ([188.165.223.204]:20564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcU-0003t4-Vq for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:35 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617334; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=RktJVNRF7ZmEbCbf+CKJjHL8JkVirq8jP157dfwiWPA=; b=BhGYTwHHP6TnxSpRemRUhbhQ/Rx8aUgx6zbmbnA+gxX+KeU0vQH1PFttoJIArM4nOy5QeJ B245tBX7HwXbZL+ag2c1w7e4b348QYBCKZ16NpaKUcQQmVwUvnph1OtK6NHycUV+FVQcZ4 wB+pHCJG9rOxrJ9jx4l3PDn3Wcw3z5Y= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:06 -0700 Message-Id: <525c47b49dbab918c23b07d1c197496b028930c9.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) guix/scripts/import/pypi.scm (guix-import-pypi)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/pypi.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/pypi.scm b/guix/scripts/import/pypi.scm index 33167174e2..9170a0b359 100644 --- a/guix/scripts/import/pypi.scm +++ b/guix/scripts/import/pypi.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 David Thompson ;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -72,12 +73,8 @@ Import and convert the PyPI package for PACKAGE-NAME.\n")) (define (guix-import-pypi . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 11/14] import: crate: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761734114993 (code B ref 49780); Fri, 30 Jul 2021 03:56:05 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:41 +0000 Received: from localhost ([127.0.0.1]:58685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Jcb-0003te-DG for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:41 -0400 Received: from out0.migadu.com ([94.23.1.103]:28507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcX-0003tC-NO for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:38 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617336; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=o7WdmX2OqSqfqCgDYP92Mde/VFiW2RW2sEhHXAXFGfA=; b=Xo1OgSv0QRONOgmlok+rZiLjvGuq4NwGqSlxKmtjNSa15mjkoO/dga7L8THC8O5aRxxT6R 4C6Nh1lJS4xFqp4O6cFE4/pu/dQ9DlzNFLs2rto1TYGOYuMswPpaVitoYIV5gaz28osZVZ XSv4D/J95oyRu8RRlqd3K5Gwap66fr0= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:07 -0700 Message-Id: <85674bf52bdbac917e5f68ca47c226ec5b2c3371.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) guix/scripts/import/crate.scm (guix-import-crate)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/crate.scm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/guix/scripts/import/crate.scm b/guix/scripts/import/crate.scm index 3a96defb86..97152904ac 100644 --- a/guix/scripts/import/crate.scm +++ b/guix/scripts/import/crate.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 David Thompson ;;; Copyright © 2016 David Craven ;;; Copyright © 2019, 2020 Martin Becze +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -75,13 +76,8 @@ Import and convert the crates.io package for PACKAGE-NAME.\n")) (define (guix-import-crate . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) - + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 12/14] import: texlive: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761734215000 (code B ref 49780); Fri, 30 Jul 2021 03:56:05 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:42 +0000 Received: from localhost ([127.0.0.1]:58687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Jcb-0003tm-PC for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:42 -0400 Received: from out0.migadu.com ([94.23.1.103]:28519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JcZ-0003tL-LG for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:40 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617339; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=5amurRtvtQLgasf73pn/9onQ+yFZAAsX1xkryZziOuI=; b=TO2MeJstfyLXKtFJcwa/0GARcHLhLGW+shkpfHSR0Q7wBlwMmJOyVaiWKGAB8ANwbCj3t3 MI6kZfWd1rHCqg4k5mmX6DPhuCrTfg3VclM1ipzTyJxeHV3wpKBDcUkA+HdmNpiwfy9V7V wxcDNf5alz8y1wumeBmHlSqme8w+9xw= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:08 -0700 Message-Id: <13032b76fab4f6580e657cd4cda1f24b69b5ad9f.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) guix/scripts/import/texlive.scm (guix-import-texlive)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/texlive.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/texlive.scm b/guix/scripts/import/texlive.scm index 1cceee7051..6f0818e274 100644 --- a/guix/scripts/import/texlive.scm +++ b/guix/scripts/import/texlive.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ricardo Wurmus +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -73,12 +74,8 @@ Import and convert the Texlive package for PACKAGE-NAME.\n")) (define (guix-import-texlive . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 13/14] import: hackage: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761735315030 (code B ref 49780); Fri, 30 Jul 2021 03:56:06 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:53 +0000 Received: from localhost ([127.0.0.1]:58691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Jcn-0003uK-4N for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:53 -0400 Received: from out0.migadu.com ([94.23.1.103]:28537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Jcb-0003tk-Sk for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:42 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617341; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=t450CiMgHXHYuMxvRIxBBF5UiFU/zPt32wbm4mu3Bzg=; b=I3iUpK8DE6pvlfGvkG01awVvT1BbXB+DOQIqzVS05znZZx7hDUo9IWNGritUdCV0UJL3/P RYzEo+pfa2O5sapzRGDpPEjY/BdLcraAtpIkhwBQkGukDFqO8I9R9MF6gO+OIqdndQOJWg /+MduelFpTQ2Ox5UtahyKvQYAkL3kWE= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:09 -0700 Message-Id: <30e8e284d65f381e30e9bc84c47744b12b2abf9d.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) guix/scripts/import/hackage.scm (guix-import-hackage)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/hackage.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/hackage.scm b/guix/scripts/import/hackage.scm index 906dca24b1..83128fb816 100644 --- a/guix/scripts/import/hackage.scm +++ b/guix/scripts/import/hackage.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -105,12 +106,8 @@ version.\n")) (define (guix-import-hackage . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (define (run-importer package-name opts error-fn) (let* ((arguments (list -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 14/14] import: stackage: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Jul 2021 03:56:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162761735315036 (code B ref 49780); Fri, 30 Jul 2021 03:56:06 +0000 Received: (at 49780) by debbugs.gnu.org; 30 Jul 2021 03:55:53 +0000 Received: from localhost ([127.0.0.1]:58693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Jcn-0003uN-CX for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:53 -0400 Received: from out0.migadu.com ([94.23.1.103]:28551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Jcd-0003u5-Vw for 49780@debbugs.gnu.org; Thu, 29 Jul 2021 23:55:44 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617343; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=Et/xDvqAPx2iplIss0MzIO4u2o99BjZXvN7qPczCk28=; b=AqhqRqqfZMzgh/r/MJxYRMqhMVfVnNzjj9ojPvSNhFE7rGDxAP0SJCoAfnIZ0r/RuYoqaB y++Ihk9XOW/i0WXXtgBbhiLIx5fa7Drb+hh2YhMT85TOH14aDmCAjn+kwcIliuNd+ySp8k J/CGF8sL1zxlLoRAKOWu0R5jzDJKjp8= From: Sarah Morgensen Date: Thu, 29 Jul 2021 20:55:10 -0700 Message-Id: <8dcfa87ce142e999afef7896c4d1bb58746e50a6.1627617006.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) guix/scripts/import/stackage.scm (guix-import-stackage)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. --- guix/scripts/import/stackage.scm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/guix/scripts/import/stackage.scm b/guix/scripts/import/stackage.scm index d77328dcbf..211ac73ada 100644 --- a/guix/scripts/import/stackage.scm +++ b/guix/scripts/import/stackage.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Federico Beffa ;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -89,12 +90,8 @@ Import and convert the LTS Stackage package for PACKAGE-NAME.\n")) (define (guix-import-stackage . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (define (run-importer package-name opts error-fn) (let* ((arguments (list -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 00/14] import: Use PARSE-COMMAND-LINE for options. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Aug 2021 15:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sarah Morgensen Cc: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162800564426196 (code B ref 49780); Tue, 03 Aug 2021 15:48:01 +0000 Received: (at 49780) by debbugs.gnu.org; 3 Aug 2021 15:47:24 +0000 Received: from localhost ([127.0.0.1]:41207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAwdX-0006oS-NM for submit@debbugs.gnu.org; Tue, 03 Aug 2021 11:47:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAwdW-0006oD-4B for 49780@debbugs.gnu.org; Tue, 03 Aug 2021 11:47:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53756) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAwdQ-000056-Qm; Tue, 03 Aug 2021 11:47:16 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=43010 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAwdQ-0000n7-I4; Tue, 03 Aug 2021 11:47:16 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Tue, 03 Aug 2021 17:47:14 +0200 In-Reply-To: (Sarah Morgensen's message of "Thu, 29 Jul 2021 20:51:04 -0700") Message-ID: <87czquttrx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Sarah, Sarah Morgensen skribis: > I noticed that we have an ARGS-FOLD* wrapper called PARSE-COMMAND-LINE wh= ich has > the same invalid argument message as the importers, the same argument han= dler, > and has an option hint feature. So let's use that in the importers. > > The change is identical across all importers, and the semantics as far as= return > value are identical, so this should just be a drop-in. Neat, that=E2=80=99s a welcome change. I hope you won=E2=80=99t hate me fo= r suggesting this, but I think such systematic API evolution changes can go in a single commit. WDYT? Nitpick: guix/scripts/import/go.scm (guix-import-go)[parse-options]: Use ^ You need a =E2=80=98*=E2=80=99 at the beginning of the line. Thanks! Ludo=E2=80=99. From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH v2] import: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Aug 2021 18:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49780@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.16280151078439 (code B ref 49780); Tue, 03 Aug 2021 18:26:02 +0000 Received: (at 49780) by debbugs.gnu.org; 3 Aug 2021 18:25:07 +0000 Received: from localhost ([127.0.0.1]:41405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAz63-0002BY-9n for submit@debbugs.gnu.org; Tue, 03 Aug 2021 14:25:07 -0400 Received: from out0.migadu.com ([94.23.1.103]:48874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAz5z-0002BN-Cz for 49780@debbugs.gnu.org; Tue, 03 Aug 2021 14:24:57 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1628015093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=isFAlg2tXnoEsyu2u4JkKnRewUoZPptteYvxPqBQtNM=; b=k8dBTZAZ7HprTwJKsaWej+5PDVY7DUAYb2lzfOv1pFC+JgP3rOxojDA8u3exomS2o/0FmV fSB1eCuPngR5QI9GKwYPjY4MA3V7r0l5KLAEa/142n/VYTFonjklaLMCCcuJ9UOhZNqT71 3FJdhn5/t7i2w9VX8U30wq92lyfQ/VM= From: Sarah Morgensen Date: Tue, 3 Aug 2021 11:24:50 -0700 Message-Id: <727dc025443a70a985c0e8006e25c468f7524037.1628014596.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * guix/scripts/import/go.scm (guix-import-go)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. * guix/scripts/import/egg.scm (guix-import-egg)[parse-options]: Likewise. * guix/scripts/imp [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [94.23.1.103 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [94.23.1.103 listed in wl.mailspike.net] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) * guix/scripts/import/go.scm (guix-import-go)[parse-options]: Use PARSE-COMMAND-LINE instead of ARGS-FOLD*. * guix/scripts/import/egg.scm (guix-import-egg)[parse-options]: Likewise. * guix/scripts/import/gem.scm (guix-import-gem)[parse-options]: Likewise. * guix/scripts/import/gnu.scm (guix-import-gnu)[parse-options]: Likewise. * guix/scripts/import/cpan.scm (guix-import-cpan)[parse-options]: Likewise. * guix/scripts/import/cran.scm (guix-import-cran)[parse-options]: Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa)[parse-options]: Likewise. * guix/scripts/import/json.scm (guix-import-json)[parse-options]: Likewise. * guix/scripts/import/opam.scm (guix-import-opam)[parse-options]: Likewise. * guix/scripts/import/pypi.scm (guix-import-pypi)[parse-options]: Likewise. * guix/scripts/import/crate.scm (guix-import-crate)[parse-options]: Likewise. * guix/scripts/import/texlive.scm (guix-import-texlive)[parse-options]: Likewise. * guix/scripts/import/hackage.scm (guix-import-hackage)[parse-options]: Likewise. * guix/scripts/import/stackage.scm (guix-import-stackage)[parse-options]: Likewise. --- guix/scripts/import/cpan.scm | 9 +++------ guix/scripts/import/cran.scm | 9 +++------ guix/scripts/import/crate.scm | 10 +++------- guix/scripts/import/egg.scm | 9 +++------ guix/scripts/import/elpa.scm | 9 +++------ guix/scripts/import/gem.scm | 9 +++------ guix/scripts/import/gnu.scm | 9 +++------ guix/scripts/import/go.scm | 9 +++------ guix/scripts/import/hackage.scm | 9 +++------ guix/scripts/import/json.scm | 9 +++------ guix/scripts/import/opam.scm | 9 +++------ guix/scripts/import/pypi.scm | 9 +++------ guix/scripts/import/stackage.scm | 9 +++------ guix/scripts/import/texlive.scm | 9 +++------ 14 files changed, 42 insertions(+), 85 deletions(-) diff --git a/guix/scripts/import/cpan.scm b/guix/scripts/import/cpan.scm index 77ffe1f38e..bdf5a1e423 100644 --- a/guix/scripts/import/cpan.scm +++ b/guix/scripts/import/cpan.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Eric Bavier +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,12 +67,8 @@ Import and convert the CPAN package for PACKAGE-NAME.\n")) (define (guix-import-cpan . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda diff --git a/guix/scripts/import/cran.scm b/guix/scripts/import/cran.scm index aa3ef324e0..3e4b038cc4 100644 --- a/guix/scripts/import/cran.scm +++ b/guix/scripts/import/cran.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015, 2017, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2020 Martin Becze +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -86,12 +87,8 @@ Import and convert the CRAN package for PACKAGE-NAME.\n")) (define (guix-import-cran . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda diff --git a/guix/scripts/import/crate.scm b/guix/scripts/import/crate.scm index 3a96defb86..97152904ac 100644 --- a/guix/scripts/import/crate.scm +++ b/guix/scripts/import/crate.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 David Thompson ;;; Copyright © 2016 David Craven ;;; Copyright © 2019, 2020 Martin Becze +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -75,13 +76,8 @@ Import and convert the crates.io package for PACKAGE-NAME.\n")) (define (guix-import-crate . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) - + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda diff --git a/guix/scripts/import/egg.scm b/guix/scripts/import/egg.scm index 7dbd6fcd5a..829cdc2ca0 100644 --- a/guix/scripts/import/egg.scm +++ b/guix/scripts/import/egg.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -71,12 +72,8 @@ Import and convert the egg package for PACKAGE-NAME.\n")) (define (guix-import-egg . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (repo (and=> (assoc-ref opts 'repo) string->symbol)) diff --git a/guix/scripts/import/elpa.scm b/guix/scripts/import/elpa.scm index d6b38e5c4b..052b0cc0e7 100644 --- a/guix/scripts/import/elpa.scm +++ b/guix/scripts/import/elpa.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2020 Martin Becze +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -80,12 +81,8 @@ Import the latest package named PACKAGE-NAME from an ELPA repository.\n")) (define (guix-import-elpa . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda diff --git a/guix/scripts/import/gem.scm b/guix/scripts/import/gem.scm index c64596b514..65d2bf10b4 100644 --- a/guix/scripts/import/gem.scm +++ b/guix/scripts/import/gem.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson ;;; Copyright © 2018 Oleg Pykhalov +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -73,12 +74,8 @@ Import and convert the RubyGems package for PACKAGE-NAME.\n")) (define (guix-import-gem . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda diff --git a/guix/scripts/import/gnu.scm b/guix/scripts/import/gnu.scm index ae98370037..344e363abe 100644 --- a/guix/scripts/import/gnu.scm +++ b/guix/scripts/import/gnu.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2016 Ludovic Courtès +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,12 +82,8 @@ Return a package declaration template for PACKAGE, a GNU package.\n")) (define (guix-import-gnu . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda diff --git a/guix/scripts/import/go.scm b/guix/scripts/import/go.scm index 74e8e60cce..e08a1e427e 100644 --- a/guix/scripts/import/go.scm +++ b/guix/scripts/import/go.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2020 Katherine Cox-Buday ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -83,12 +84,8 @@ that are not yet in Guix")) (define (guix-import-go . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda diff --git a/guix/scripts/import/hackage.scm b/guix/scripts/import/hackage.scm index 906dca24b1..83128fb816 100644 --- a/guix/scripts/import/hackage.scm +++ b/guix/scripts/import/hackage.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -105,12 +106,8 @@ version.\n")) (define (guix-import-hackage . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (define (run-importer package-name opts error-fn) (let* ((arguments (list diff --git a/guix/scripts/import/json.scm b/guix/scripts/import/json.scm index d8d5c3a4af..a3b5e6d79c 100644 --- a/guix/scripts/import/json.scm +++ b/guix/scripts/import/json.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015, 2017 Ricardo Wurmus ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -74,12 +75,8 @@ Import and convert the JSON package definition in PACKAGE-FILE.\n")) (define (guix-import-json . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda diff --git a/guix/scripts/import/opam.scm b/guix/scripts/import/opam.scm index da9392821c..64164e7cc4 100644 --- a/guix/scripts/import/opam.scm +++ b/guix/scripts/import/opam.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Julien Lepiller +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -76,12 +77,8 @@ Import and convert the opam package for PACKAGE-NAME.\n")) (define (guix-import-opam . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (repo (and=> (assoc-ref opts 'repo) string->symbol)) diff --git a/guix/scripts/import/pypi.scm b/guix/scripts/import/pypi.scm index 33167174e2..9170a0b359 100644 --- a/guix/scripts/import/pypi.scm +++ b/guix/scripts/import/pypi.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 David Thompson ;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -72,12 +73,8 @@ Import and convert the PyPI package for PACKAGE-NAME.\n")) (define (guix-import-pypi . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda diff --git a/guix/scripts/import/stackage.scm b/guix/scripts/import/stackage.scm index d77328dcbf..211ac73ada 100644 --- a/guix/scripts/import/stackage.scm +++ b/guix/scripts/import/stackage.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Federico Beffa ;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -89,12 +90,8 @@ Import and convert the LTS Stackage package for PACKAGE-NAME.\n")) (define (guix-import-stackage . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (define (run-importer package-name opts error-fn) (let* ((arguments (list diff --git a/guix/scripts/import/texlive.scm b/guix/scripts/import/texlive.scm index 1cceee7051..6f0818e274 100644 --- a/guix/scripts/import/texlive.scm +++ b/guix/scripts/import/texlive.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ricardo Wurmus +;;; Copyright © 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. ;;; @@ -73,12 +74,8 @@ Import and convert the Texlive package for PACKAGE-NAME.\n")) (define (guix-import-texlive . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (let* ((opts (parse-options)) (args (filter-map (match-lambda base-commit: e1ddcf75bf9e68a04698733063dd35a3d5b997ee -- 2.31.1 From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 00/14] import: Use PARSE-COMMAND-LINE for options. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 03 Aug 2021 18:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.162801689611337 (code B ref 49780); Tue, 03 Aug 2021 18:55:01 +0000 Received: (at 49780) by debbugs.gnu.org; 3 Aug 2021 18:54:56 +0000 Received: from localhost ([127.0.0.1]:41509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAzZ1-0002wm-Of for submit@debbugs.gnu.org; Tue, 03 Aug 2021 14:54:56 -0400 Received: from out0.migadu.com ([94.23.1.103]:56752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAzYy-0002we-IJ for 49780@debbugs.gnu.org; Tue, 03 Aug 2021 14:54:53 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1628016891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qkP2uQnKDb/TElbq7hp2rno/zjkJudJkcQjt1wtU1ZE=; b=KvQl+LJtXCs9atoylsXz/mPvuH+29fB03XyLbsSVXQV0/CAl1GBI5rf6Z1fZehKrg+AtyU jS9u2ggtaDbqvcAP0YYxgCKvLYBSemYp/3uFURLj+oul4Kq9nujvvlLFp/7jHR4PeuTwQ0 M8yD2CK4GwNiIsNC5cqpe1hyn/aGjAU= From: Sarah Morgensen References: <87czquttrx.fsf@gnu.org> Date: Tue, 03 Aug 2021 11:54:49 -0700 In-Reply-To: <87czquttrx.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 03 Aug 2021 17:47:14 +0200") Message-ID: <86bl6e4ava.fsf_-_@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, Ludovic Court=C3=A8s writes: > Hi Sarah, > > Sarah Morgensen skribis: > >> I noticed that we have an ARGS-FOLD* wrapper called PARSE-COMMAND-LINE w= hich has >> the same invalid argument message as the importers, the same argument ha= ndler, >> and has an option hint feature. So let's use that in the importers. >> >> The change is identical across all importers, and the semantics as far a= s return >> value are identical, so this should just be a drop-in. > > Neat, that=E2=80=99s a welcome change. I hope you won=E2=80=99t hate me = for suggesting > this, but I think such systematic API evolution changes can go in a > single commit. WDYT? Ha! No problem. v2 sent. > > Nitpick: > > guix/scripts/import/go.scm (guix-import-go)[parse-options]: Use > ^ > You need a =E2=80=98*=E2=80=99 at the beginning of the line. Of course I missed that. Fixed in v2. If only etc/committer didn't choke on it because git-diff decided that literal strings are function definitions... Looking at it now, git 2.32+ has a built-in function regex for Scheme, so if we add *.scm diff=3Dscheme to a .gitattributes file, we should get better diff headers. Quick testing shows that if we have nested functions, it shows the innermost one, though. A little modification to the regex can make it show the topmost one. This is what we want for etc/committer, but is it what we want elsewhere? I'll send a patch shortly. > > Thanks! > > Ludo=E2=80=99. -- Sarah From unknown Mon Aug 18 06:57:40 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Sarah Morgensen Subject: bug#49780: closed (Re: [PATCH v2] import: Use PARSE-COMMAND-LINE for options.) Message-ID: References: <87lf5hp834.fsf@gnu.org> X-Gnu-PR-Message: they-closed 49780 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 49780@debbugs.gnu.org Date: Wed, 04 Aug 2021 15:02:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1628089322-30292-1" This is a multi-part message in MIME format... ------------=_1628089322-30292-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #49780: [PATCH 00/14] import: Use PARSE-COMMAND-LINE for options. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 49780@debbugs.gnu.org. --=20 49780: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49780 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1628089322-30292-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 49780-done) by debbugs.gnu.org; 4 Aug 2021 15:01:49 +0000 Received: from localhost ([127.0.0.1]:44921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBIOz-0007sA-7Z for submit@debbugs.gnu.org; Wed, 04 Aug 2021 11:01:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBIOw-0007ry-VW for 49780-done@debbugs.gnu.org; Wed, 04 Aug 2021 11:01:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33732) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBIOo-00014l-87; Wed, 04 Aug 2021 11:01:39 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=43032 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBIOn-0006hJ-Ku; Wed, 04 Aug 2021 11:01:38 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Sarah Morgensen Subject: Re: [PATCH v2] import: Use PARSE-COMMAND-LINE for options. References: <727dc025443a70a985c0e8006e25c468f7524037.1628014596.git.iskarian@mgsn.dev> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Thermidor an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 04 Aug 2021 17:01:35 +0200 In-Reply-To: <727dc025443a70a985c0e8006e25c468f7524037.1628014596.git.iskarian@mgsn.dev> (Sarah Morgensen's message of "Tue, 3 Aug 2021 11:24:50 -0700") Message-ID: <87lf5hp834.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49780-done Cc: 49780-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Sarah Morgensen skribis: > * guix/scripts/import/go.scm (guix-import-go)[parse-options]: Use > PARSE-COMMAND-LINE instead of ARGS-FOLD*. > * guix/scripts/import/egg.scm (guix-import-egg)[parse-options]: > Likewise. > * guix/scripts/import/gem.scm (guix-import-gem)[parse-options]: > Likewise. > * guix/scripts/import/gnu.scm (guix-import-gnu)[parse-options]: > Likewise. > * guix/scripts/import/cpan.scm (guix-import-cpan)[parse-options]: > Likewise. > * guix/scripts/import/cran.scm (guix-import-cran)[parse-options]: > Likewise. > * guix/scripts/import/elpa.scm (guix-import-elpa)[parse-options]: > Likewise. > * guix/scripts/import/json.scm (guix-import-json)[parse-options]: > Likewise. > * guix/scripts/import/opam.scm (guix-import-opam)[parse-options]: > Likewise. > * guix/scripts/import/pypi.scm (guix-import-pypi)[parse-options]: > Likewise. > * guix/scripts/import/crate.scm (guix-import-crate)[parse-options]: > Likewise. > * guix/scripts/import/texlive.scm (guix-import-texlive)[parse-options]: > Likewise. > * guix/scripts/import/hackage.scm (guix-import-hackage)[parse-options]: > Likewise. > * guix/scripts/import/stackage.scm (guix-import-stackage)[parse-options]: > Likewise. Applied, thank you! Ludo=E2=80=99. ------------=_1628089322-30292-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Jul 2021 03:51:18 +0000 Received: from localhost ([127.0.0.1]:58639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JYL-0003jv-Jn for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:51:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:57736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9JYK-0003jo-Fn for submit@debbugs.gnu.org; Thu, 29 Jul 2021 23:51:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9JYK-0005pm-6y for guix-patches@gnu.org; Thu, 29 Jul 2021 23:51:16 -0400 Received: from out1.migadu.com ([91.121.223.63]:37252) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9JYG-00020m-NH for guix-patches@gnu.org; Thu, 29 Jul 2021 23:51:15 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1627617068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=aq6LrRYw3rj4U/flguoi7LyAJChVf887Xk0HajhUa+4=; b=IlbK46GtotFmti3yi4wkxSiPG5vQx2FURP5oagbl3paOoLMNuRfw4IARabsnQb6Nv/cNcv 0BptOxYL+FRnMULS7xilaMhtQQnlTjiUSvEFZ/m7Dzxe6nKM01hJ45yORuyHqoDr4XOf9j l20Mheaauz0Q3sM+tuG//2avJrTdFHw= From: Sarah Morgensen To: guix-patches@gnu.org Subject: [PATCH 00/14] import: Use PARSE-COMMAND-LINE for options. Date: Thu, 29 Jul 2021 20:51:04 -0700 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev Received-SPF: pass client-ip=91.121.223.63; envelope-from=iskarian@mgsn.dev; helo=out1.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Hello Guix, I noticed that we have an ARGS-FOLD* wrapper called PARSE-COMMAND-LINE which has the same invalid argument message as the importers, the same argument handler, and has an option hint feature. So let's use that in the importers. The change is identical across all importers, and the semantics as far as return value are identical, so this should just be a drop-in. -- Sarah Morgensen (14): import: go: Use PARSE-COMMAND-LINE for options. import: egg: Use PARSE-COMMAND-LINE for options. import: gem: Use PARSE-COMMAND-LINE for options. import: gnu: Use PARSE-COMMAND-LINE for options. import: cpan: Use PARSE-COMMAND-LINE for options. import: cran: Use PARSE-COMMAND-LINE for options. import: elpa: Use PARSE-COMMAND-LINE for options. import: json: Use PARSE-COMMAND-LINE for options. import: opam: Use PARSE-COMMAND-LINE for options. import: pypi: Use PARSE-COMMAND-LINE for options. import: crate: Use PARSE-COMMAND-LINE for options. import: texlive: Use PARSE-COMMAND-LINE for options. import: hackage: Use PARSE-COMMAND-LINE for options. import: stackage: Use PARSE-COMMAND-LINE for options. guix/scripts/import/cpan.scm | 9 +++------ guix/scripts/import/cran.scm | 9 +++------ guix/scripts/import/crate.scm | 10 +++------- guix/scripts/import/egg.scm | 9 +++------ guix/scripts/import/elpa.scm | 9 +++------ guix/scripts/import/gem.scm | 9 +++------ guix/scripts/import/gnu.scm | 9 +++------ guix/scripts/import/go.scm | 9 +++------ guix/scripts/import/hackage.scm | 9 +++------ guix/scripts/import/json.scm | 9 +++------ guix/scripts/import/opam.scm | 9 +++------ guix/scripts/import/pypi.scm | 9 +++------ guix/scripts/import/stackage.scm | 9 +++------ guix/scripts/import/texlive.scm | 9 +++------ 14 files changed, 42 insertions(+), 85 deletions(-) base-commit: daeef2e7f4f36df7a098c9aee7c03546d8691d39 -- 2.31.1 ------------=_1628089322-30292-1-- From unknown Mon Aug 18 06:57:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49780] [PATCH 00/14] import: Use PARSE-COMMAND-LINE for options. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 31 Aug 2021 08:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Sarah Morgensen Cc: 49780@debbugs.gnu.org Received: via spool by 49780-submit@debbugs.gnu.org id=B49780.163039944827242 (code B ref 49780); Tue, 31 Aug 2021 08:45:02 +0000 Received: (at 49780) by debbugs.gnu.org; 31 Aug 2021 08:44:08 +0000 Received: from localhost ([127.0.0.1]:32872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKzNH-00075J-Vo for submit@debbugs.gnu.org; Tue, 31 Aug 2021 04:44:08 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:44015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKzNC-00074f-OM for 49780@debbugs.gnu.org; Tue, 31 Aug 2021 04:44:06 -0400 Received: by mail-wr1-f46.google.com with SMTP id b6so26369037wrh.10 for <49780@debbugs.gnu.org>; Tue, 31 Aug 2021 01:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=lVoMqwM6LVnA9u6F2FSexzQbHvndvf8paS6atse09k8=; b=fQr4cCXWTc4us+xEtSv76G2CnUkPk82R8suCnkbzGEI69wJjfjsGgeWLuWlAkWDkNn 9+65T0oRv3jwy5usp7EN3/OQ7NDXdaAXn/Qqq9h97fQbMBQuM6wBRmn+82JOIokSr7ln PK06wf8wSvZLpvCcp4qKdcRkDEJymjbsXI4WkHlRoRf9DIeKS39tSWT5UOU9sf6OwTfw H5IDGs0W7S9Jv5KrHm/4DFlTPN3jIoj0SManw3BqXR6iLAnf/VWyYFMEuLxF+R4L4aua X85DaIR9mtePSO2aTgqP4WpwXaL1AxC6D+G0za6ylBeCQ2C9a62daub8v9pefAWh+pMg ogpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=lVoMqwM6LVnA9u6F2FSexzQbHvndvf8paS6atse09k8=; b=YXDMb4c3sqjvfhN9VKCkoZ24rHsylMBlCsk2pH/vS+lLYoezwF+VJ+/WFRo9dmJRqA y3t6YGUljhGEh71wQumK6uDeZGE91ZcJUAMDS1IuOpNQiOiVnxDcmKYTf7pveVuL6brS 6+j1TdL8rNIlQVEKcxp9AKDjjDM6dEhmWEe62tiG0A73qy+FhcRQA5BiSbrVjW5yc8dY TWPDJM6DwK33OavTgvphStbJjSycXInbjyRnMRgIEXhBDJoHDW9A/JUHMv01Xm8vbRvU Liq842CiEDKhWXlgt4WreWWFsC/vEczA2PZu/hKl2y18QP7+B7kRTE5iVkIZey2SQv8N hoNQ== X-Gm-Message-State: AOAM532M9ZhJ7PqYU01S2utHBMGMGhSXGy8Qx+ZAl/O61+mKNeSEmclg fo0RDI+I/RKYFHVaWu6SC1K5HHyVfwGT1A== X-Google-Smtp-Source: ABdhPJyicGiyjENe9LbHWN9oNIbs4SNDbHFXGfhj6jTBc/WNWnsHulTk99AQhYldfoSIikw5/U2Fdg== X-Received: by 2002:adf:ec8b:: with SMTP id z11mr30136929wrn.122.1630399436852; Tue, 31 Aug 2021 01:43:56 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id n8sm17748196wra.24.2021.08.31.01.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 01:43:56 -0700 (PDT) From: zimoun In-Reply-To: <87czquttrx.fsf@gnu.org> References: <87czquttrx.fsf@gnu.org> Date: Tue, 31 Aug 2021 10:24:12 +0200 Message-ID: <867dg210pf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Cool! Thanks Sarah for the improvement. On Tue, 03 Aug 2021 at 17:47, Ludovic Court=C3=A8s wrote: > Sarah Morgensen skribis: > >> I noticed that we have an ARGS-FOLD* wrapper called PARSE-COMMAND-LINE w= hich has >> the same invalid argument message as the importers, the same argument ha= ndler, >> and has an option hint feature. So let's use that in the importers. >> >> The change is identical across all importers, and the semantics as far a= s return >> value are identical, so this should just be a drop-in. > > Neat, that=E2=80=99s a welcome change. I hope you won=E2=80=99t hate me = for suggesting > this, but I think such systematic API evolution changes can go in a > single commit. WDYT? Well, the previous replacement before the introduction of option hint had been done with several commits. ;-) --8<---------------cut here---------------start------------->8--- 4056ba3645 scripts: show: Replace 'args-fold*' by 'parse-command-line'. [...] 946f563d91 scripts: describe: Replace 'args-fold*' by 'parse-command-line'. --8<---------------cut here---------------end--------------->8--- Whatever, now it is pushed. :-) Cheers, simon PS: For the interested reader, the story is not complete yet, the subcommands =E2=80=9Cguix system=E2=80=9D does not enjoy such. ;-)