From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MG5EIva502ClPAEAgWs5BA (envelope-from ) for ; Thu, 24 Jun 2021 00:47:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ONwEHva502BNVAAA1q6Kng (envelope-from ) for ; Wed, 23 Jun 2021 22:47:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E345F25E37 for ; Thu, 24 Jun 2021 00:47:17 +0200 (CEST) Received: from localhost ([::1]:46708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwBeO-0006pt-KF for larch@yhetil.org; Wed, 23 Jun 2021 18:47:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwBeA-0006pj-SO for guix-patches@gnu.org; Wed, 23 Jun 2021 18:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwBeA-0004my-7Y for guix-patches@gnu.org; Wed, 23 Jun 2021 18:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwBe9-0008DT-S6 for guix-patches@gnu.org; Wed, 23 Jun 2021 18:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49200] [PATCH] import: go: Fix match-error in 'go-package-description' Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Jun 2021 22:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49200 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49200@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162448841831571 (code B ref -1); Wed, 23 Jun 2021 22:47:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jun 2021 22:46:58 +0000 Received: from localhost ([127.0.0.1]:42010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwBe5-0008D8-LJ for submit@debbugs.gnu.org; Wed, 23 Jun 2021 18:46:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:34210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwBe3-0008D0-91 for submit@debbugs.gnu.org; Wed, 23 Jun 2021 18:46:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwBe3-0006pP-0V for guix-patches@gnu.org; Wed, 23 Jun 2021 18:46:55 -0400 Received: from out0.migadu.com ([94.23.1.103]:34636) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwBdz-0004f6-Ju for guix-patches@gnu.org; Wed, 23 Jun 2021 18:46:54 -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=1624488408; 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; bh=mwBA46sghhlYkPuqwq9Fgt98P6pnSNiC9a+mzQ5UTxo=; b=CPYZZWU+UgpDO35qotkgxweOfC37wto2G9yEjzNUIr8uWb+Sxkxz/YAk6UdGaApmeyJrBL iEWWPyUI5SFRQKt0Ve6vXwJUUHSl10NilhC24vFCm1uRxcaAJOsBzXXNhVevHr8T/fBn7i iCgFjwMos/0SHq9UZxsukVVHbFXWjvg= Date: Wed, 23 Jun 2021 15:46:46 -0700 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Auth-User: iskarian@mgsn.dev Received-SPF: pass client-ip=94.23.1.103; envelope-from=iskarian@mgsn.dev; helo=out0.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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Sarah Morgensen X-ACL-Warn: , Sarah Morgensen via Guix-patches From: Sarah Morgensen via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624488438; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=mwBA46sghhlYkPuqwq9Fgt98P6pnSNiC9a+mzQ5UTxo=; b=qg7B1WOK9sa5UZkQvqu4OipjY7NM2Xt5aaq8x2D4eiWuKJqSN2hloi2ysABjEavJeL0Itd 7e1hKH3PrKzBC/jxrn6EyP04lPoYFbsNUoXGYBL1zLdvx7sMhHBNGZ6WKXUMEMdP41QnfV vH0zqNscHS5PVfoXjjzqJOMZPgvf5qRcnuJA+xGk8X8EjViMlqRWv0dNafTJLUJjOPs6uk KHbaXRX83bJf/PB80kdgx375v+ZOglxra8wGm7SMdistOmj37p6AyA+p1Xs1w9JYTYt7uo yx5uncUB+A4Rk35gxAlXFn+zMcEhaE7NFoTUAZ5VPzmhL1TSy26Ht5eCt4+auQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624488438; a=rsa-sha256; cv=none; b=LDvAdcVCw9S0bzGTB9o1mDeR84WDA4Kmoj6CTTVlu3K9aVzBN18wVTJ8VrEZp62s/ChX5j T+pXC/ECScwFNGYM3iLyrr5bBtJsocZF24YI68O06FKmmzZrDgFU4wPFmJTeN41F1yfBTH sbTn058zczdj2NESE2E5LeJqoBjlou1Yb9LivZSeITVcsry+Civ3tvB+iN2W7FiXmN1piv /WfKKV2eM/1fe9sXqZcWhVjV6fJ6LEGmNbWK60T629sE0fXCo59CFtmnl3PtQ/+JmqcoBh 8sBFaGN5lDl73FvaXfbTZ7q3pADo9icQkWdpYJkvIZPT4fezP9fr0WlqjAVaFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=CPYZZWU+; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=CPYZZWU+; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E345F25E37 X-Spam-Score: -2.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: lDQziHU3e0lu * guix/import/go.scm (go-package-description): Make sure description* is always a list, so the result is properly matched. --- Hello Guix, In the process of using `guix import go` I encountered a rare issue when the go.pkg.dev Documentation and UnitInfo sections for a package are both blank: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix import go github.com/neelance/sourcemap Backtrace: In ice-9/boot-9.scm: 1752:10 7 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 6 (apply-smob/0 #) In ice-9/boot-9.scm: 724:2 5 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 4 (_ #(#(#))) In guix/ui.scm: 2147:12 3 (run-guix-command _ . _) In guix/scripts/import.scm: 120:11 2 (guix-import . _) In guix/scripts/import/go.scm: 118:27 1 (guix-import-go . _) In guix/import/go.scm: 191:4 0 (go-module->guix-package _ #:goproxy _ #:version _ # _) guix/import/go.scm:191:4: In procedure go-module->guix-package: Throw to key `match-error' with args `("match" "no matching pattern" #f)'. --8<---------------cut here---------------end--------------->8--- Looks like the error is due to using false where the empty list was expected. This tiny patch fixes that. Copyright for go.scm was added in . Sarah guix/import/go.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guix/import/go.scm b/guix/import/go.scm index d110954664..cf8c62abe2 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -186,8 +186,9 @@ e.g. \"google.golang.org/protobuf/proto\"." (description (if (not (null? overview)) overview (select-content sxml))) - (description* (and (not (null? description)) - (first description)))) + (description* (if (not (null? description)) + (first description) + description))) (match description* (() #f) ;nothing selected ((p elements ...) base-commit: 1f3d7b45349d43e5cc02594083e0cd44ef730992 -- 2.31.1