From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qHWWHnsLRWHqhwAAgWs5BA (envelope-from ) for ; Fri, 17 Sep 2021 23:41:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id aD1KGnsLRWGERgAA1q6Kng (envelope-from ) for ; Fri, 17 Sep 2021 21:41:15 +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 CF1821907E for ; Fri, 17 Sep 2021 23:41:14 +0200 (CEST) Received: from localhost ([::1]:47626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRLbc-0000ek-O0 for larch@yhetil.org; Fri, 17 Sep 2021 17:41:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRLbS-0000eZ-78 for bug-guix@gnu.org; Fri, 17 Sep 2021 17:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRLbR-0001pw-T8 for bug-guix@gnu.org; Fri, 17 Sep 2021 17:41:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mRLbR-0005s4-N6 for bug-guix@gnu.org; Fri, 17 Sep 2021 17:41:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#50595: Failure in guix import go Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 17 Sep 2021 21:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50595 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Stephen Paul Weber Received: via spool by 50595-submit@debbugs.gnu.org id=B50595.163191480722497 (code B ref 50595); Fri, 17 Sep 2021 21:41:01 +0000 Received: (at 50595) by debbugs.gnu.org; 17 Sep 2021 21:40:07 +0000 Received: from localhost ([127.0.0.1]:33156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRLaY-0005qm-OZ for submit@debbugs.gnu.org; Fri, 17 Sep 2021 17:40:07 -0400 Received: from out2.migadu.com ([188.165.223.204]:34691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRLaV-0005qa-Hx for 50595@debbugs.gnu.org; Fri, 17 Sep 2021 17:40:05 -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=1631914800; 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: in-reply-to:in-reply-to:references:references; bh=Y3aINljf0Rx1JTtCymONnGMJ/D77ANargXA6tH4DCTg=; b=gFX7RamN4SJMYJX1zQMvq9tMY6ta0H/thkyEat6qKPra+Vhy5kkszAtQs7yH18+sTIZTzj vYLjKliInm9tP70xBrDDGTP1jg0t9SOK776RhJYEDaJmqxMpp8ySep2W/tY6p2XWcNBd8P Ehf7QHvEX7t7MSTDmDafFYz5iLdNJ4U= From: Sarah Morgensen References: <20210915003242.GA22238@singpolyma-beefy.lan> <20210915022754.GC22238@singpolyma-beefy.lan> Date: Fri, 17 Sep 2021 14:39:58 -0700 In-Reply-To: <20210915022754.GC22238@singpolyma-beefy.lan> (Stephen Paul Weber's message of "Tue, 14 Sep 2021 21:27:54 -0500 (2 days, 40 minutes, 7 seconds ago)") Message-ID: <86sfy2hoep.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 50595@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631914874; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=Y3aINljf0Rx1JTtCymONnGMJ/D77ANargXA6tH4DCTg=; b=jW3Yjpncpv4nw2QBQ/C/EoKj+BzWG+6ArhuRGN0i5d8vwELw/SfDRzkLRtzvIXeb4wcaKA SYb0UT6TJUwk75pKaHaGG6Hdw6QLoAtvJ/DeW471bqF7CaU893vT5A9GTGpEPf43fhVAnr ERzGAfT3GK7BWWQPhPSYgKkDpR64niurrRxtYjNDIDh3vo0NzqBva2mjS/OIH1rNNYmqQV AavK4wBIf/9utuoMS4ICyWKi4FfEScBFvqfSvNWHW7PCgoT9NnUQ88yvi+P82aqAwtWDwu jHwLfHOcifIRanAyGAgH+UYcaVw7RseCRU8QPqgwr8cAZWGrDMkBisRCoG+Hfg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631914874; a=rsa-sha256; cv=none; b=fDUyorPjjY/m+o/7vjbTf72PCWpjAaaZUcPJJMPcsXX3CRYIAyjAFtCUuTJw1ma0dWTIjB Fi3EBqIvdCJEye5F0y98pc38Ff0n3JvoUkVLJb6Cx64OIARIoyFLCqrwvkQ3SJTIJa8/7F ZfrzJPHYtSXiVd/kjGUROWuQsQgL51ilzdw/hFgZXKBv9zXDFjrFx7x3PByH3ch0kZHSyt NbsDirO+3xVAXBzYQZj9qVev4sKAq8k4BMgPSQWUwx5a4AniM0oi/SyDU5/aksm7KYoP2/ 1BAjuwAsA6o8AIDhzsNzbFvRD/fwz+r/htx38GSKzeRhw40YJkNJJaHsTx3IFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=gFX7RamN; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=gFX7RamN; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: CF1821907E X-Spam-Score: -1.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: 28P7BIcU/6ob --=-=-= Content-Type: text/plain Hello, Stephen Paul Weber writes: > Getting a similar failure here: > > $ guix import go github.com/cncf/udpa/go/ > > following redirection to `https://proxy.golang.org/github.com/cncf/udpa/go/@v/list'... > following redirection to `https://proxy.golang.org/github.com/cncf/udpa/go/@latest'... > following redirection to `https://proxy.golang.org/github.com/cncf/udpa/go/@v/v0.0.0-20210322005330-6414d713912e.mod'... > guix import: warning: Failed to import package "github.com/cncf/udpa/go/". > reason: ("vector-ref" "Wrong type argument in position 1 (expecting vector): ~S" (#f) (#f)). > guix import: error: failed to download meta-data for module 'github.com/cncf/udpa/go/' This one seems to be caused by the importer incorrectly using the repository root instead of the module path in a couple places. The attached patch fixes this. Hope that helps, -- Sarah --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-import-go-Improve-handling-of-modules-in-VCS-subdire.patch Content-Description: import: go: Import handling of modules in VCS subdirectories. >From b9ef64a641c20d331cf1886d71b85b81be910b30 Mon Sep 17 00:00:00 2001 Message-Id: From: Sarah Morgensen Date: Thu, 16 Sep 2021 18:24:40 -0700 Subject: [PATCH] import: go: Improve handling of modules in VCS subdirectories. Use the supplied module path (instead of the repository root) as the import path for everything except source and homepage URLs. For modules not in the root of a VCS repository, set #:unpack-path to the repository root by default. * guix/import/go.scm (go-module->guix-package): Use 'module-path' instead of 'root-module-path' for #:import-path. Emit #:unpack-path when #:import-path is not equal to 'root-module-path'. --- guix/import/go.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/import/go.scm b/guix/import/go.scm index c6ecdbaffd..fe7387dec2 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -619,7 +619,7 @@ hint: use one of the following available versions ~a\n" (meta-data (fetch-module-meta-data root-module-path)) (vcs-type (module-meta-vcs meta-data)) (vcs-repo-url (module-meta-data-repo-url meta-data goproxy)) - (synopsis (go-package-synopsis root-module-path)) + (synopsis (go-package-synopsis module-path)) (description (go-package-description module-path)) (licenses (go-package-licenses module-path))) (values @@ -630,7 +630,10 @@ hint: use one of the following available versions ~a\n" ,(vcs->origin vcs-type vcs-repo-url version*)) (build-system go-build-system) (arguments - '(#:import-path ,root-module-path)) + '(#:import-path ,module-path + ,@(if (string=? module-path root-module-path) + '() + `(#:unpack-path ,root-module-path)))) ,@(maybe-propagated-inputs (map (match-lambda ((name version) base-commit: 72297993a174586ee0a23b95b6b9ee2f3db34cf1 -- 2.33.0 --=-=-=--