GNU bug report logs - #63647
[PATCH 0/2] Fix annoyance with "guix import go"

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Simon Tournier <zimon.toutoune@HIDDEN>; Keywords: moreinfo patch; dated Mon, 22 May 2023 16:06:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.
Added tag(s) moreinfo. Request was from Christopher Baines <mail@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 16 Aug 2023 17:11:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 16 13:11:59 2023
Received: from localhost ([127.0.0.1]:41959 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qWK3r-0005Q4-1w
	for submit <at> debbugs.gnu.org; Wed, 16 Aug 2023 13:11:59 -0400
Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:40280)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>)
 id 1qWK3i-0005NC-4w; Wed, 16 Aug 2023 13:11:51 -0400
Received: by mail-wm1-x331.google.com with SMTP id
 5b1f17b1804b1-3fe8d816a40so10390875e9.1; 
 Wed, 16 Aug 2023 10:11:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1692205904; x=1692810704;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=mPduG9+ksRVkvzA0Qa/2RSlV1qAxQ2THAGkRputDeZg=;
 b=kf/zrJ6sn6Ce3Oq1u2FvdL+MYum7ZsmvPAkyQHUiLrEjBKympdHsgZynQfGScDOF1o
 2BQN3fnzh1HRd5aoaYx6fyircREuPP8gLC31ioVVkE2SHrQCYUrIz3EfnUcQZgFCTfOU
 W/Y3aGZF9huYCSkRkYqx6mvoQF6bySXdDMOfY2ACbEldc2UDi+q9eMPT79htVNY+gXll
 3ZVxKoslNjhu0CxRLF2h7CVmH6wdTAXRGJHYAExX/B7fHK064983xkbUAQCQU/H9C0jW
 rz9bi0xkre8fRvpLGsZKeLUXkAKkidUp5wBb7pTpW6gQu/2K2y0sNrDOGMmt3LUXh5vR
 q2mg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1692205904; x=1692810704;
 h=mime-version:message-id:date:references:in-reply-to:subject:cc:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=mPduG9+ksRVkvzA0Qa/2RSlV1qAxQ2THAGkRputDeZg=;
 b=VbPNIfHCRrbiXpqYynSpl0ik5yE8GIx7z+1CNuj0/hN6YZc58ajBxNUCkVyNRwaVZW
 MBnYJrkYr/MS65yZiGeImwmxLM+gAftZ04zo2Tx6BfUiHTF/APQaZ7tQIPELMDdZ4T8j
 Vzd5fDpmJ62US3rgA7P8e+a4JJRNOve+ATE0a6o9kQJ8+0g7Z06xfnyyjt+wO/Nn+7ik
 zu3kzGUwNzR5YnjaWlu1Jd/Dh9FVd43Z4ion6/xOPPT/itrYscnsYH+3hi40NCST/SUI
 dGX9TdM+VGd2TpOd/dKSDat7P/xchu+fKQhYUEGH0F7r+BkGCK9fc3+hdnNC6A6RelEi
 Kfrg==
X-Gm-Message-State: AOJu0YyIpJnqhljehCVLaRbnZsK6h/L6ypcU6041Rj8HMugICWyzb1Ph
 2wDUzxu6SM07+1vKGCIctrUhy1hzX7w=
X-Google-Smtp-Source: AGHT+IHmilbFgjYL6fX4qMtQ41+nKvDUIBegmVp8/JhAgr/rcW2U0mhfwGfdJpaohGClqYJCSLltpQ==
X-Received: by 2002:a5d:67cc:0:b0:317:3d36:b2c1 with SMTP id
 n12-20020a5d67cc000000b003173d36b2c1mr1874230wrw.7.1692205904567; 
 Wed, 16 Aug 2023 10:11:44 -0700 (PDT)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 e15-20020adff34f000000b0031980ae286asm8026512wrp.70.2023.08.16.10.11.43
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 16 Aug 2023 10:11:44 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: Timo Wilken <guix@HIDDEN>, Ludovic =?utf-8?Q?Court=C3=A8s?=
 <ludo@HIDDEN>
Subject: Re: bug#63001: bug#63631: [PATCH] import: go: Handle subpackage
 versioning correctly.
In-Reply-To: <CTF06XBYWPT0.1MV6QA1B2OB98@HIDDEN>
References: <6dd1de3dd4d968876fa55f5126056834c77b0244.1684703258.git.guix@HIDDEN>
 <87pm5xrbsg.fsf@HIDDEN> <CTF06XBYWPT0.1MV6QA1B2OB98@HIDDEN>
Date: Wed, 16 Aug 2023 17:59:53 +0200
Message-ID: <875y5ff05i.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63647
Cc: 63631 <at> debbugs.gnu.org, 64036 <at> debbugs.gnu.org, 63647 <at> debbugs.gnu.org,
 64035 <at> debbugs.gnu.org, 63001 <at> debbugs.gnu.org, 54097 <at> debbugs.gnu.org,
 wolf@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Timo,

On Sat, 17 Jun 2023 at 17:12, "Timo Wilken" <guix@HIDDEN> wrote:

>> What would you suggest?  Simon?
>
> Here's a brief comparison between Simon's patches and mine -- Simon's seem to
> contain fixes for a couple more things than mine currently does:
>
> 1. Simon sorts available versions in an error message; this can presumably be
>    merged independently since it doesn't conflict with other patches.
>
> 2. Simon always prepends a "SUBDIR/" prefix to the tag if found, whereas I try
>    to find the plain "vX" tag first, then fall back to "SUBDIR/vX". Judging by
>    https://go.dev/ref/mod#vcs-version, Simon's approach seems more correct.
>    I'll change my implementation to match and try it out.
>
> 3. For detecting the `module-path-subdirectory' in Simon's patches: that's the
>    same approach I used initially, but I found I have to try `(substring
>    module-path (string-length import-prefix))' first (to handle e.g.
>    cloud.google.com/go/*). This is one of the things I haven't submitted
>    yet...

Sorry if I have missed some patches or overlooked something.  Do you
plan to send another patch series handling all?


Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 17 Jun 2023 15:13:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 17 11:13:58 2023
Received: from localhost ([127.0.0.1]:52281 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qAXcj-0000Eu-My
	for submit <at> debbugs.gnu.org; Sat, 17 Jun 2023 11:13:58 -0400
Received: from mx2.mythic-beasts.com ([46.235.227.24]:35093)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <timo@HIDDEN>)
 id 1qAXcc-0000EB-Cs; Sat, 17 Jun 2023 11:13:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=twilken.net
 ; s=mythic-beasts-k1; h=To:From:Subject:Date;
 bh=pLlAjfqsoe+3U3a73MQeHAaM/uSI+UrqGsrVeSKy1QM=; b=zI4HPa8dV46Hjnio0YDducSSwZ
 M29u2+iSJgjnWkngcWfT9SjYDe9ZLcVAF6i1Ndo75UO/OHkpFsGhXUIm1L8Fz/B5Y6Tg3zjvoVFmy
 d2/oqU7XiJvDOnOICpI3cx5UJO/54X/q5T9ko6ub0/iW9+KHQrST+7gIUbsLEFePPVSChBnKxzIj0
 6vl4AibdV6yP/bGdLIvjcfMXs4yCOg/+eCxfY8y0t1VVKYU/YVdRUrSzYPgPYv7nhW0qOEJZKfPL7
 6rRHFmKh51WiRPEO/oUchLlUi9MFuV/F8pPh+ZAd9D/fTIovUzVWesUglqbjMlC1UubueYwa/EPQC
 NdDeVMug==;
Received: by mailhub-hex-d.mythic-beasts.com with esmtpsa (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2)
 (envelope-from <timo@HIDDEN>)
 id 1qAXcS-004VRH-W7; Sat, 17 Jun 2023 16:13:41 +0100
Content-Type: multipart/signed;
 boundary=dc3bfcd0ce40fc9a1a65ded3476be064f73442d113438739c89741eeba4a;
 micalg=pgp-sha256; protocol="application/pgp-signature"
Date: Sat, 17 Jun 2023 17:12:58 +0200
Subject: Re: bug#63631: [PATCH] import: go: Handle subpackage versioning
 correctly.
From: "Timo Wilken" <guix@HIDDEN>
To: =?utf-8?q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Message-Id: <CTF06XBYWPT0.1MV6QA1B2OB98@HIDDEN>
X-Mailer: aerc 0.14.0
References: <6dd1de3dd4d968876fa55f5126056834c77b0244.1684703258.git.guix@HIDDEN>
 <87pm5xrbsg.fsf@HIDDEN>
In-Reply-To: <87pm5xrbsg.fsf@HIDDEN>
X-BlackCat-Spam-Score: 16
X-Spam-Status: No, score=1.6
X-Spam-Score: 0.1 (/)
X-Debbugs-Envelope-To: 63647
Cc: 63631 <at> debbugs.gnu.org, 64036 <at> debbugs.gnu.org,
 Simon Tournier <zimon.toutoune@HIDDEN>, 63647 <at> debbugs.gnu.org,
 64035 <at> debbugs.gnu.org, 63001 <at> debbugs.gnu.org, 54097 <at> debbugs.gnu.org,
 wolf@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.9 (/)

--dc3bfcd0ce40fc9a1a65ded3476be064f73442d113438739c89741eeba4a
Mime-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8

Hi Ludo', (hi everyone,)

On Wed Jun 14, 2023 at 11:09 PM CEST, Ludovic Court=C3=A8s wrote:
> Timo Wilken <guix@HIDDEN> skribis:
> > Here's a patch that fixes the reported issue (bug#54097) for me. I've o=
nly
> > tested this on the github.com/googleapis/google-cloud-go/compute packag=
e so
> > far, though it seems to work there. Perhaps others have more testcases?
> >
> > I don't know enough about Go tooling to use it, so I've just patched th=
e Guile
> > logic of the importer. (I don't write Go, I just want to package stuff =
written
> > in it.) In terms of performance, at least the repo contents are apparen=
tly
> > cached by the first `git-checkout-hash' call, even if it fails, so the =
second
> > call doesn't have to redownload them.

I've been testing my patch further this weekend, and I have a couple more
patches in the pipeline; I suppose I ought to clean those up and submit the=
m.

In particular, I've got fixes for the following queued up locally:

1. Finding the `module-path-subdir' needs another case for e.g.
   cloud.google.com/go/*.

2. My patch sometimes generates an unnecessary `go-version->git-ref' call.

3. Go versions need to be parsed from go.mod, since some packages require a
   newer Go compiler than our default. This I've got a patch for, but this =
Go
   version also ought to propagate up the dependency tree. I haven't found =
an
   easy way to do that, since the importer seems to generate top-level
   packages first, before descending the dep tree...

4. `fetch-module-meta-data' ought to ignore 4xx HTTP errors to follow the
   spec; gonum.org/v1/gonum specifically depends on this behaviour.

I've been trying to recursively import github.com/matrix-org/dendrite, whic=
h
has a particularly large and hairy dependency tree. While I can now import =
it
without crashes, I can't build it from the imported package definitions yet=
 --
mainly because of lots of dependency cycles in the generated packages, but
there may be more issues hidden beneath that.

Still, I can recommend it as a test of everyone's importer patches, since
it'll find a lot of edge cases in importing alone!

> What you propose looks similar to part of the work Simon Tournier
> submitted at <https://issues.guix.gnu.org/63647>.

It seems lots of people have been working on the same problem -- in additio=
n
to Simon's patches, I found a patch submitted by Elbek (issues 64035 & 6403=
6;
Cc'd). I also forgot about the issue I submitted months ago (63001)...

> What would you suggest?  Simon?

Here's a brief comparison between Simon's patches and mine -- Simon's seem =
to
contain fixes for a couple more things than mine currently does:

1. Simon sorts available versions in an error message; this can presumably =
be
   merged independently since it doesn't conflict with other patches.

2. Simon always prepends a "SUBDIR/" prefix to the tag if found, whereas I =
try
   to find the plain "vX" tag first, then fall back to "SUBDIR/vX". Judging=
 by
   https://go.dev/ref/mod#vcs-version, Simon's approach seems more correct.
   I'll change my implementation to match and try it out.

3. For detecting the `module-path-subdirectory' in Simon's patches: that's =
the
   same approach I used initially, but I found I have to try `(substring
   module-path (string-length import-prefix))' first (to handle e.g.
   cloud.google.com/go/*). This is one of the things I haven't submitted
   yet...

> Thanks for the patch, Timo!

Thanks for your work in sorting through all of this, Ludo'!

Cheers,
Timo

--dc3bfcd0ce40fc9a1a65ded3476be064f73442d113438739c89741eeba4a
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEU+w8BoVog92SNVvCL8eFBGgfabAFAmSNzaUACgkQL8eFBGgf
abDEaA//Y6k/Uckhvq+wllES0TjACxVG+2bY2E/wLZNoQShXF5Tn3ZQ9o2HOU7Gr
p8er/t/JkPLYm9w2MidUtvTms6qxp8H/YIZ12gzZ+GP/eoKa/iiqt42+KZvLS/Is
B2JWEcaJLFYy0w9nuubeuQpgcWEmxyk7/zb++GovD0tfYgczII3N1Z5fhRmeAj0N
FbKqfkBocxruYvBfcI5KhMV6Q1TjCwuAH+j2iwNmsiSnm7NTKbJxfCyO9+p5UF9w
O/em01p9J+Cg6EEFunwoi1pjoEAkVZCRtgaiP1SMgapq74UKKagvsWqMoW+JHpDf
uuiaVn1sLuTt+u9KGamYqaCj1NRcCfN7SjPxS7oTM4hsytVDmUB/eIHD6t3HntCP
Ev43fJKJwLoybQV0ptajnJggEEaEY1cegQG683jsD0ycrToh4YEhLe5fQsGhaLMA
7MSLjjf0K73BoFyZi+wYyfDPYqXRQmpb3Z6cKJPlF3v4IF13UtSxP0yBRdz930aI
1b1Q5khLQzQBI0fvxMNcZGPeA2RjPyNsXE8pKn9zEkIunzX9VYN8az++EjX928Ox
mmgjEUsLWMPCSMwGcEoZye6R5wJUG34LEkoQTbySf+314hlELPuGcLCatFgZZbXq
1Hn1upt13XYRYVCX/SXIpBJL9gdNbi2sSg8FVm4Aq+sQQqZzAKs=
=fjJn
-----END PGP SIGNATURE-----

--dc3bfcd0ce40fc9a1a65ded3476be064f73442d113438739c89741eeba4a--




Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 14 Jun 2023 21:09:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 14 17:09:46 2023
Received: from localhost ([127.0.0.1]:45546 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q9XkQ-0004qq-FG
	for submit <at> debbugs.gnu.org; Wed, 14 Jun 2023 17:09:46 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42742)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1q9XkO-0004qY-TB; Wed, 14 Jun 2023 17:09:45 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1q9XkH-0004vN-UY; Wed, 14 Jun 2023 17:09:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=dSdA3DtXQsPoFBK1nu9YIiRoX1fKSVyF3CAiTtvJ3Ag=; b=CSYzUy1OF3nQO6NYSypv
 HM4AwqDmPv33nptVZL1fr7W5XOseD1w1xaNRsa2+4oU7CPI9nCPyU0pAw2znjTXABMLXtxUh7KB8g
 3YvHHDk9o9kCOfw67oScqWX4OvzO6KbdbdBwgXuy2Y+n3MaIvUxg7t/cA5BPmD4GoA+JIiDKzpsZu
 FPXcPxB7WqzRONx0siODTV+zZXwuGnqo7sZudo+QUKX9PggRa2sbxDUfXm7w+bzXUNO61YVCZHVAw
 5WmT8xUC+nNmZf0jDcT4lKabL2lgwg68LEi3RSZL64iwnfgPI4Y4TE4pOZUU2RqYhmklchuOcvk/K
 j36GpFdqYdnThA==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1q9XkH-0001Z1-FY; Wed, 14 Jun 2023 17:09:37 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Timo Wilken <guix@HIDDEN>
Subject: Re: bug#63631: [PATCH] import: go: Handle subpackage versioning
 correctly.
References: <6dd1de3dd4d968876fa55f5126056834c77b0244.1684703258.git.guix@HIDDEN>
Date: Wed, 14 Jun 2023 23:09:35 +0200
In-Reply-To: <6dd1de3dd4d968876fa55f5126056834c77b0244.1684703258.git.guix@HIDDEN>
 (Timo Wilken's message of "Sun, 21 May 2023 23:18:08 +0200")
Message-ID: <87pm5xrbsg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: 63647
Cc: 63647 <at> debbugs.gnu.org, 63631 <at> debbugs.gnu.org,
 Simon Tournier <zimon.toutoune@HIDDEN>, 54097 <at> debbugs.gnu.org,
 wolf@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi Timo,

Timo Wilken <guix@HIDDEN> skribis:

> Some Go source repositories (notably the Google Cloud SDK) contain multip=
le
> submodules and use a `refs/tags/<submodule>/<version>' tagging scheme.
>
> Fixes <https://bugs.gnu.org/54097>.
>
> * guix/import/go.scm (vcs->origin): Accept a module-path-suffix.
> (go-module->guix-package): Use the new parameter.
> ---
> Here's a patch that fixes the reported issue (bug#54097) for me. I've only
> tested this on the github.com/googleapis/google-cloud-go/compute package =
so
> far, though it seems to work there. Perhaps others have more testcases?
>
> I don't know enough about Go tooling to use it, so I've just patched the =
Guile
> logic of the importer. (I don't write Go, I just want to package stuff wr=
itten
> in it.) In terms of performance, at least the repo contents are apparently
> cached by the first `git-checkout-hash' call, even if it fails, so the se=
cond
> call doesn't have to redownload them.

What you propose looks similar to part of the work Simon Tournier
submitted at <https://issues.guix.gnu.org/63647>.

What would you suggest?  Simon?

Thanks for the patch, Timo!

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 6 Jun 2023 15:42:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 06 11:42:16 2023
Received: from localhost ([127.0.0.1]:52846 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q6Yp6-0004qU-3p
	for submit <at> debbugs.gnu.org; Tue, 06 Jun 2023 11:42:16 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59612)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1q6Yp3-0004qH-NE
 for 63647 <at> debbugs.gnu.org; Tue, 06 Jun 2023 11:42:14 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1q6Yox-0000MA-RZ; Tue, 06 Jun 2023 11:42:07 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=Gw7SjnVboGcgXoi8hGUHj5N9TWBTd+OI9MpjSw7nI7U=; b=eWqd7hnVFnd2cRyeoKi2
 sB+UOta0GkrOrcGRQ8t4nN5aupgIWeng5H9a3jDcv5lIvy60ZNctg2bpFVN8P4lj8YMjwBGcqibKP
 dqWq9F/homOBzFf5UyBHuTlpxDl6wj9rIuccdazj1ZvV8jxAt0f9IxcPGakyw7b6QMlurAV6lQc6V
 6O/08mWSGJCLGFrGNj+YciwnlSNjOXcCaQDAMov60yhgo8D0Yb/e/hs6tgvqPwQ3+xibaLYME+GzJ
 hW4D9lpvaitj1Dl2Th7K+5Nr+3m/tcRPrmW/fHzHGSw6H+gpVy6roC8U63GvjsgC4DTmXS1t4I1mR
 eC96Rn/0PYNBJw==;
Received: from [193.50.110.155] (helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1q6Yot-0000oa-Eu; Tue, 06 Jun 2023 11:42:04 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Simon Tournier <zimon.toutoune@HIDDEN>
Subject: Re: [bug#63647] [PATCH 0/2] Fix annoyance with "guix import go"
References: <a520128590d4b67af4c2b22ae167590b99e449dd.1685030838.git.zimon.toutoune@HIDDEN>
 <f699a25c43805136ada95ef7c7213a78abf5909e.1685030838.git.zimon.toutoune@HIDDEN>
 <87o7luhybt.fsf_-_@HIDDEN> <86cz29nm9n.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Octidi 18 Prairial an 231 de la =?utf-8?Q?R=C3=A9vol?=
 =?utf-8?Q?ution=2C?= jour du Pavot
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: Tue, 06 Jun 2023 17:42:00 +0200
In-Reply-To: <86cz29nm9n.fsf@HIDDEN> (Simon Tournier's message of "Tue, 06
 Jun 2023 08:21:56 +0200")
Message-ID: <87zg5c61iv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: 63647
Cc: 63647 <at> debbugs.gnu.org, Felix Lechner <felix.lechner@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello!

Simon Tournier <zimon.toutoune@HIDDEN> skribis:

> On Mon, 05 Jun 2023 at 14:45, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:
>> Simon Tournier <zimon.toutoune@HIDDEN> skribis:
>>
>>> * guix/import/go.scm (git-checkout-hash): Catch Git error.
>>
>> [...]
>>
>>> +  (catch 'git-error
>>> +    (lambda _
>>> +      (let-values (((checkout commit _)
>>> +                    (parameterize ((%repository-cache-directory cache))
>>> +                      (update-cached-checkout url
>>> +                                              #:ref
>>> +                                              `(tag-or-commit . ,refer=
ence)))))
>>> +        (file-hash* checkout #:algorithm algorithm #:recursive? #true)=
))
>>> +    (lambda (key error . rest)
>>> +      (warning (G_ "Git error: ~a in ~a~%") (git-error-message error) =
url)
>>> +      (nix-base32-string->bytevector
>>> +       "0000000000000000000000000000000000000000000000000000"))))
>>
>> I=E2=80=99d rather let the exception through.  How about adding
>> =E2=80=98with-git-error-handling=E2=80=99 at the UI level, in (guix scri=
pts import go)?
>
> What do you mean by =E2=80=9Clet the exception through=E2=80=9D?  It seem=
s better to be
> non-blocking and thus catch the exception then raise a meaningful
> warning; it=E2=80=99s required when running with the option recursive.

I thought it would be more appropriate to error out as soon as we have a
Git problem, rather than print a warning and emit an incorrect hash.

I understand that, when using =E2=80=98--recursive=E2=80=99, this means abo=
rting the
whole process without producing anything.  But maybe that=E2=80=99s better =
that
producing an incorrect (origin =E2=80=A6) form?

Now, I don=E2=80=99t use =E2=80=98guix import go -r=E2=80=99 so it=E2=80=99=
s possible that I don=E2=80=99t
understand the scenario being considered here!

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 6 Jun 2023 06:22:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 06 02:22:25 2023
Received: from localhost ([127.0.0.1]:50742 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q6Q54-0001iT-EB
	for submit <at> debbugs.gnu.org; Tue, 06 Jun 2023 02:22:25 -0400
Received: from mail-wm1-f50.google.com ([209.85.128.50]:41451)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1q6Q51-0001i7-Gg
 for 63647 <at> debbugs.gnu.org; Tue, 06 Jun 2023 02:22:08 -0400
Received: by mail-wm1-f50.google.com with SMTP id
 5b1f17b1804b1-3f7373b5499so4469845e9.1
 for <63647 <at> debbugs.gnu.org>; Mon, 05 Jun 2023 23:22:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1686032522; x=1688624522;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=9Lu1G6xuXr1bPP2QgWtxn6sZ/aYqaycX+0DVOBGuttM=;
 b=gB6gnFH0BzkwrUcI+apGDdiejKA0LUynaIkkxEOMLZjSIJbYneBMDiB0cbFlnhAbV/
 oY4U41rKlqwYziGBjNUi1ooGlG/dZykrBEYj1UuKJWr+En/NHngohOziX6ftLzGgEvPZ
 23mrhkrLrCpdiwyWP84azziEtrTUg39pXeccVDtGeiEldel46ou3gsqOgQKb3NR4YxP3
 EaLLzcfushR9JmhCQEEma9xKNCoV63HA58kQmeCaahFkCktmXZzJ5kamfQWat3w129CU
 s209SBzIRtPC2t99epobYWpbBnMssDDg13tIXvgoJBnKB8BxmRGa3To/bRXZxtiGcj6I
 l4YQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1686032522; x=1688624522;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=9Lu1G6xuXr1bPP2QgWtxn6sZ/aYqaycX+0DVOBGuttM=;
 b=RToD0KwnesBJE+ZveVFvBSSTApev36P8TPoTKDKDsPIdAYmJi/DDV8e/AL9AV7GO3F
 J5JnDdJQlxKPI8zCvthFisQTLvgNLCBdh1I7WwqtJb9OdBlm3AU2afadPCRAn3V1A63S
 pxWzPHfz79ysBAZvDFij7uDXlGNPohhIRRyaDaE3OnbuKvrhLcZRM7CocGGC/9yr9jE0
 emsJsuzhBQ4fHmsQFgWBa1w+902HQWogEQWra6CzUqBp03FjKzpYB1YM/Hsjye267JYo
 6LHg0umvARYNFVnoogJO+9XnZI2eMqOP/ct2WjSDVQYy+702S/Xt1kSBvczngHxbc36O
 6VFw==
X-Gm-Message-State: AC+VfDxuvVl1ZB5iXJkZQJSxQwOWO7Y7wcJj3WOP4lycbEU/sIieN5BO
 SihQMvgGBV0gJcgqaKbZcTQ=
X-Google-Smtp-Source: ACHHUZ6uDUANrJysFjqZ2B1Q9Ls8NTH+VLv5g6Q9zwajRDxuDh+Yf2otZ0xyqcbaMonTs1IA5KCrTA==
X-Received: by 2002:a05:600c:4695:b0:3f5:ffe8:94ac with SMTP id
 p21-20020a05600c469500b003f5ffe894acmr1709365wmo.0.1686032521481; 
 Mon, 05 Jun 2023 23:22:01 -0700 (PDT)
Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e])
 by smtp.gmail.com with ESMTPSA id
 h8-20020adfe988000000b0030ae5a0516csm11590428wrm.17.2023.06.05.23.22.00
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 05 Jun 2023 23:22:01 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#63647] [PATCH 0/2] Fix annoyance with "guix import go"
In-Reply-To: <87o7luhybt.fsf_-_@HIDDEN>
References: <a520128590d4b67af4c2b22ae167590b99e449dd.1685030838.git.zimon.toutoune@HIDDEN>
 <f699a25c43805136ada95ef7c7213a78abf5909e.1685030838.git.zimon.toutoune@HIDDEN>
 <87o7luhybt.fsf_-_@HIDDEN>
Date: Tue, 06 Jun 2023 08:21:56 +0200
Message-ID: <86cz29nm9n.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63647
Cc: 63647 <at> debbugs.gnu.org, Felix Lechner <felix.lechner@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Ludo,

On Mon, 05 Jun 2023 at 14:45, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:
> Simon Tournier <zimon.toutoune@HIDDEN> skribis:
>
>> * guix/import/go.scm (git-checkout-hash): Catch Git error.
>
> [...]
>
>> +  (catch 'git-error
>> +    (lambda _
>> +      (let-values (((checkout commit _)
>> +                    (parameterize ((%repository-cache-directory cache))
>> +                      (update-cached-checkout url
>> +                                              #:ref
>> +                                              `(tag-or-commit . ,refere=
nce)))))
>> +        (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
>> +    (lambda (key error . rest)
>> +      (warning (G_ "Git error: ~a in ~a~%") (git-error-message error) u=
rl)
>> +      (nix-base32-string->bytevector
>> +       "0000000000000000000000000000000000000000000000000000"))))
>
> I=E2=80=99d rather let the exception through.  How about adding
> =E2=80=98with-git-error-handling=E2=80=99 at the UI level, in (guix scrip=
ts import go)?

What do you mean by =E2=80=9Clet the exception through=E2=80=9D?  It seems =
better to be
non-blocking and thus catch the exception then raise a meaningful
warning; it=E2=80=99s required when running with the option recursive.

Well, maybe an improvement could be in the addition of some
=E2=80=99report-git-warning=E2=80=99 and/or =E2=80=99with-git-error-handlin=
g*=E2=80=99, in (guix git);
hum, I do not know.

Last, considering that the module (guix import go) already contains 4 UI
messages (G_), trying to move this warning about Git to (guix scripts
import go) will add some complexity =E2=80=93 re-raise the exception 2 or 3
times, IIUC =E2=80=93 and thus it will not change much about the UI, IMHO. =
 I
mean, such move should be for all the messages or nothing.

Cheers,
simon




Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 5 Jun 2023 12:45:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 05 08:45:52 2023
Received: from localhost ([127.0.0.1]:48403 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q69aq-00044G-Jb
	for submit <at> debbugs.gnu.org; Mon, 05 Jun 2023 08:45:52 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57638)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1q69ap-000444-CN
 for 63647 <at> debbugs.gnu.org; Mon, 05 Jun 2023 08:45:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1q69aj-0005I0-CX; Mon, 05 Jun 2023 08:45:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=9pkxGKMbDJnOrfvpqg6pJSAYNyIn7XwXemVJvqnOofE=; b=qrKINm3T0j5Wvp3XILuf
 QfvRp1yqlVfJ/UFiGrSKxzgmswYtV4EJU7lCDax5MYbuwBUW6+XiKNPtlFb7CXgbJXqyZ/1dY2K4i
 HnnA/9XE6yzE4BD7N7GHSHbatoWs822AP4rjjKbG3iqTho8hKnGffnWObfcD11b8L6PtbhcDO+WoQ
 EmgjMDfzpnXTh3PQtTlgZYy90zqxoQOil79S9wk8yMCocwwZ2ySDOlte1bpYprhjNx6x3cJBIQ1yF
 JvwasQxcO0Kw4N8YjG0dWQrd7EkY2ky3wUiO2mtk/sgBMI4DjrWrmxkNUJRVT3YUFjB6nN1DS7PAA
 eRdoP1qZvAxFdA==;
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1q69ai-0001uo-BI; Mon, 05 Jun 2023 08:45:44 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Simon Tournier <zimon.toutoune@HIDDEN>
Subject: Re: bug#63647: [PATCH 0/2] Fix annoyance with "guix import go"
References: <a520128590d4b67af4c2b22ae167590b99e449dd.1685030838.git.zimon.toutoune@HIDDEN>
 <f699a25c43805136ada95ef7c7213a78abf5909e.1685030838.git.zimon.toutoune@HIDDEN>
Date: Mon, 05 Jun 2023 14:45:42 +0200
In-Reply-To: <f699a25c43805136ada95ef7c7213a78abf5909e.1685030838.git.zimon.toutoune@HIDDEN>
 (Simon Tournier's message of "Thu, 25 May 2023 18:07:48 +0200")
Message-ID: <87o7luhybt.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: 63647
Cc: 63647 <at> debbugs.gnu.org, Felix Lechner <felix.lechner@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Simon Tournier <zimon.toutoune@HIDDEN> skribis:

> * guix/import/go.scm (git-checkout-hash): Catch Git error.

[...]

> +  (catch 'git-error
> +    (lambda _
> +      (let-values (((checkout commit _)
> +                    (parameterize ((%repository-cache-directory cache))
> +                      (update-cached-checkout url
> +                                              #:ref
> +                                              `(tag-or-commit . ,referen=
ce)))))
> +        (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
> +    (lambda (key error . rest)
> +      (warning (G_ "Git error: ~a in ~a~%") (git-error-message error) ur=
l)
> +      (nix-base32-string->bytevector
> +       "0000000000000000000000000000000000000000000000000000"))))

I=E2=80=99d rather let the exception through.  How about adding
=E2=80=98with-git-error-handling=E2=80=99 at the UI level, in (guix scripts=
 import go)?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 5 Jun 2023 12:44:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 05 08:44:01 2023
Received: from localhost ([127.0.0.1]:48396 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q69Z3-00040g-2x
	for submit <at> debbugs.gnu.org; Mon, 05 Jun 2023 08:44:01 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57640)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1q69Z0-00040P-Q3
 for 63647 <at> debbugs.gnu.org; Mon, 05 Jun 2023 08:43:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1q69Yv-0004ri-I3; Mon, 05 Jun 2023 08:43:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=RjB5md0Ulg9/xwIW6HRLWxkvtG5srV5Ixpb9YDlz0T0=; b=buWvxf5Jt35CwuT6XjcR
 hH8xq3c+B7HIOR6BI2s5snTt9bati/t9iehVvAZc3SDpM/AVAto4wast51bFoXGYB1D1goT9sIJws
 vyyWbTZwrXGL7YzXqk8e59EmenR10wjLpMxMvDzd9RrP1zkT1L8lVZUu0BTequiJr8UbjCT7bI96f
 dEC29YI2IQ+7OvoclIkvWP+jGvTf3vgUkGPlIssJ27e9LX0uwTptTUWHO12cfqdCsu0hsYPD7O3Ac
 kj8OMZsXTDuSzf+ZVd+x6YsuG0mNapiNb612EMWFpPrZeJXOwhSYKC+k7/+L32v5rz3021qb4e66T
 PYMsS7qdnvTTmw==;
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1q69Yv-0001kV-4t; Mon, 05 Jun 2023 08:43:53 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Simon Tournier <zimon.toutoune@HIDDEN>
Subject: Re: bug#63647: [PATCH 0/2] Fix annoyance with "guix import go"
References: <cover.1684771100.git.zimon.toutoune@HIDDEN>
 <a520128590d4b67af4c2b22ae167590b99e449dd.1685030838.git.zimon.toutoune@HIDDEN>
Date: Mon, 05 Jun 2023 14:43:49 +0200
In-Reply-To: <a520128590d4b67af4c2b22ae167590b99e449dd.1685030838.git.zimon.toutoune@HIDDEN>
 (Simon Tournier's message of "Thu, 25 May 2023 18:07:47 +0200")
Message-ID: <87sfb6hyey.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: 63647
Cc: 63647 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Simon Tournier <zimon.toutoune@HIDDEN> skribis:

> * guix/import/go.scm (validate-version): Sort available versions.

LGTM!

> From: Stephen Paul Weber <singpolyma@HIDDEN>
>
> * guix/import/go.scm (vcs->origin): New argument module-path-subdirectory.
> Use it to get Git tag as described by <https://go.dev/ref/mod>.
>
> Co-authored-by: Simon Tournier <zimon.toutoune@HIDDEN>
> Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>

[...]

> -(define (vcs->origin vcs-type vcs-repo-url version)
> +(define (vcs->origin vcs-type vcs-repo-url module-path-subdirectory vers=
ion)
>    "Generate the `origin' block of a package depending on what type of so=
urce
>  control system is being used."

Maybe just =E2=80=98subdirectory=E2=80=99?  (In general =E2=80=98path=E2=80=
=99 is used for search paths,
not for file names, but I see this module already used the term with
that meaning.)

Also please mention it in the docstring.

Should there be a test, or is it too tricky?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 25 May 2023 16:08:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 25 12:08:12 2023
Received: from localhost ([127.0.0.1]:47931 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q2DVc-00021I-DG
	for submit <at> debbugs.gnu.org; Thu, 25 May 2023 12:08:12 -0400
Received: from mail-wr1-f41.google.com ([209.85.221.41]:38011)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1q2DVS-00020E-54
 for 63647 <at> debbugs.gnu.org; Thu, 25 May 2023 12:08:06 -0400
Received: by mail-wr1-f41.google.com with SMTP id
 ffacd0b85a97d-3093bf6614dso275544f8f.0
 for <63647 <at> debbugs.gnu.org>; Thu, 25 May 2023 09:08:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1685030876; x=1687622876;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=y244qRQORWlQPqsRz2FcEtZrdw2xPx9OOtmkOHi0wPs=;
 b=K56ujtPYv5xlv/OmZ8d0lNDhTYwbfwieHEbO3Mi4saVaokX6CW/nzDqXdKKl4+K48l
 ZHkFaMJ9TIqsleHc99j/jU4h53wg3mGpPMrN86rNjx2yOyO0Q/vy0P2mAITCVHoqaKol
 pn32EuN9L5FfyBR7mj7H/ndJ+vLjvEF2cdCUds+TMApDFaRHnu/QZbTQ2j3PDscRhO4n
 a0xjpThOtQHi3itLUY0noVmGYBXZgN9OGFYYIxXXSCBa50UDViAmcvJ/hkozEXUvsHbj
 4xvOCOZmaMGrKB8G3xIBFoL4F07pTeLbOuuzHsKoiTsYblKPjNm03MkStlBiTkDoiapg
 H/VQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1685030876; x=1687622876;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=y244qRQORWlQPqsRz2FcEtZrdw2xPx9OOtmkOHi0wPs=;
 b=CRkjZOZPgfOyumlPvu1VZqSh76cbqMbURxI6FyQCfkxPJLYRapqqeQi9W3tCxQ54z1
 /M7mL0ISK1HvumfS2+tw+k/yEcMrI6szK8VF00O+PUAQh5alOKYdPVgH/xI9VNHdeqSv
 yA+RGf+iiM7gZdPQfB8lwbF7sZ3XqfMlvz5XK3pTWpfm550IKoWRKB3os2JTAc3TsNTt
 9Kthz9aGGa86tzTqiGbKsiDUzdTHY3ghkPn1vy1HH59Jh1oEscLsHkUstm5cJd8Ei5V+
 /LBUcK/XueAw1niYAmiKsFADO/IdhiB8RKMliF87HUnhmz9chVe7USgaJS8N6wV5SdPL
 VSDA==
X-Gm-Message-State: AC+VfDz8t3Z+aZ3+vIfIyY5pkJHR8L+GwbI0tg5VKjqTyfnqD1ux1Tkv
 FaM3gkbbqzHTJzBzCn7FIm4BGzI9IsQ=
X-Google-Smtp-Source: ACHHUZ4toX1R49hPx7WAlG5fjKAjIqk2ouHbiis2KjuMsf0/lIwVPN3ShgF1MHsxaY8buqDvOx+b6A==
X-Received: by 2002:a5d:6691:0:b0:2f8:15d8:e627 with SMTP id
 l17-20020a5d6691000000b002f815d8e627mr4279913wru.7.1685030876290; 
 Thu, 25 May 2023 09:07:56 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 y9-20020a5d4709000000b00307d58b3da9sm2261016wrq.25.2023.05.25.09.07.55
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 25 May 2023 09:07:55 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 63647 <at> debbugs.gnu.org
Subject: [PATCH v3 1/3] guix: import: go: Sort hint about available versions.
Date: Thu, 25 May 2023 18:07:47 +0200
Message-Id: <a520128590d4b67af4c2b22ae167590b99e449dd.1685030838.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63647
Cc: Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/import/go.scm (validate-version): Sort available versions.
---
 guix/import/go.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 0357e6a1eb..1943869162 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -34,6 +34,7 @@ (define-module (guix import go)
   #:use-module (guix packages)
   #:use-module (guix http-client)
   #:use-module (guix memoization)
+  #:use-module (guix utils)
   #:autoload   (htmlprag) (html->sxml)            ;from Guile-Lib
   #:autoload   (guix base32) (bytevector->nix-base32-string)
   #:autoload   (guix build utils) (mkdir-p)
@@ -588,8 +589,9 @@ (define (validate-version version available-versions module-path)
         (condition (&fix-hint
                     (hint (format #f (G_ "Pick one of the following \
 available versions:~{ ~a~}.")
-                                  (map strip-v-prefix
-                                       available-versions)))))))))
+                                  (sort (map strip-v-prefix
+                                             available-versions)
+                                        version>?)))))))))
 
 (define* (go-module->guix-package module-path #:key
                                   (goproxy "https://proxy.golang.org")

base-commit: 99fc7e5dd3c9c92f9b6c2e51db9dc5b0481a56b2
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 25 May 2023 16:08:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 25 12:08:07 2023
Received: from localhost ([127.0.0.1]:47929 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q2DVX-000216-08
	for submit <at> debbugs.gnu.org; Thu, 25 May 2023 12:08:07 -0400
Received: from mail-wm1-f42.google.com ([209.85.128.42]:38023)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1q2DVT-00020G-0H
 for 63647 <at> debbugs.gnu.org; Thu, 25 May 2023 12:08:05 -0400
Received: by mail-wm1-f42.google.com with SMTP id
 5b1f17b1804b1-3f3284dff6cso5627645e9.0
 for <63647 <at> debbugs.gnu.org>; Thu, 25 May 2023 09:08:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1685030877; x=1687622877;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=CSnHPMzezOPOSZyv6KXp9jZFfx9VEwTPOCtQsJi6uGA=;
 b=BA8tig6pGtLxb0b6O8CnyHjZF+2Xu9OdRIw5mJc3UghGIVJC7nrcOsbPMpXds/Dh8c
 walIwaPc9c96a2JXNjFqeQvciNrVrBT/Hj8gsevWPs7qEhpwjzo5W5d59XkGsOWBFH/x
 xLHUCFN9qWVWl9ZJ4VXJPbb5yY6esVtpS/2rcLckIPCJ5daDj9fjE4VVkouf0eakHO0w
 jMUa6I1FzAXno68ZgZchLCraeerZLpZRXXfwlXVFdF1Dvp28OmACBA/exiuXYikOD/lp
 5+7pgqr7GnGaP5edB8t9gbdBfZz51IB89YgAKd9jd0bTVhe42g3UB7T89sEEdm8Bmg6r
 OCsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1685030877; x=1687622877;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=CSnHPMzezOPOSZyv6KXp9jZFfx9VEwTPOCtQsJi6uGA=;
 b=jvmAyufOwxBW1qsTYbi9VfjgIeEL8wMfzAXTQXyEktHz+2qhEBShzSQB1Ih26ePknU
 9q6hinaln/o2yKWehFfJiy21QiHwrvDe6OEjf+WFi+HfAMC3gaU2z4hBYjQaXJLe1i4B
 TQLpTL1pZ3gkawXY2NXplre2bzytCukynXiyt27FbsTOmqUU2HAGDTRgDfRXwKXjB1g9
 8Op9Zr8U48TojLYq7e4XKps+AhCx34Pm7b4LkoK5DkN6SdhcYJt4D/jPhqzjfDOWvlcz
 9topyuRnXQYp+UrwILsi4Qn500q35+vEl/anWuhILOis6ghyjyv01T2jZSL3WtS4aFtd
 nzsw==
X-Gm-Message-State: AC+VfDxssCwOAnpsYWzuQw9n4NEI5ky14PkdCAtdyYC7+bhSGLNFdsAb
 +K3bfXrAuiF6eK+fHT51W3snFiDIZKc=
X-Google-Smtp-Source: ACHHUZ6KZIyZiVmjNucfs1o7sULU76D++stJj3MwFz6VbeznpfSsH7Mx9J85r1ue6VsCbxaR6PGROg==
X-Received: by 2002:a05:600c:214c:b0:3f6:602:97af with SMTP id
 v12-20020a05600c214c00b003f6060297afmr5208997wml.3.1685030876739; 
 Thu, 25 May 2023 09:07:56 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 y9-20020a5d4709000000b00307d58b3da9sm2261016wrq.25.2023.05.25.09.07.56
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 25 May 2023 09:07:56 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 63647 <at> debbugs.gnu.org
Subject: [PATCH v3 2/3] guix: import: go: Catch Git error.
Date: Thu, 25 May 2023 18:07:48 +0200
Message-Id: <f699a25c43805136ada95ef7c7213a78abf5909e.1685030838.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <a520128590d4b67af4c2b22ae167590b99e449dd.1685030838.git.zimon.toutoune@HIDDEN>
References: <a520128590d4b67af4c2b22ae167590b99e449dd.1685030838.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63647
Cc: Felix Lechner <felix.lechner@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/import/go.scm (git-checkout-hash): Catch Git error.

Reported-by: Felix Lechner <felix.lechner@HIDDEN>.
---
 guix/import/go.scm | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 1943869162..c6258296f6 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2021-2022 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2021 Xinglu Chen <public@HIDDEN>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
-;;; Copyright © 2021 Simon Tournier <zimon.toutoune@HIDDEN>
+;;; Copyright © 2021, 2023 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,9 +36,11 @@ (define-module (guix import go)
   #:use-module (guix memoization)
   #:use-module (guix utils)
   #:autoload   (htmlprag) (html->sxml)            ;from Guile-Lib
-  #:autoload   (guix base32) (bytevector->nix-base32-string)
+  #:autoload   (guix base32) (bytevector->nix-base32-string nix-base32-string->bytevector)
   #:autoload   (guix build utils) (mkdir-p)
+  #:autoload   (guix ui) (warning)
   #:autoload   (gcrypt hash) (hash-algorithm sha256)
+  #:autoload   (git structs) (git-error-message)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:use-module (ice-9 peg)
@@ -507,12 +509,18 @@ (define* (git-checkout-hash url reference algorithm)
   ;; subsequent "guix import" invocations.
   (mkdir-p cache)
   (chmod cache #o700)
-  (let-values (((checkout commit _)
-                (parameterize ((%repository-cache-directory cache))
-                  (update-cached-checkout url
-                                          #:ref
-                                          `(tag-or-commit . ,reference)))))
-    (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
+  (catch 'git-error
+    (lambda _
+      (let-values (((checkout commit _)
+                    (parameterize ((%repository-cache-directory cache))
+                      (update-cached-checkout url
+                                              #:ref
+                                              `(tag-or-commit . ,reference)))))
+        (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
+    (lambda (key error . rest)
+      (warning (G_ "Git error: ~a in ~a~%") (git-error-message error) url)
+      (nix-base32-string->bytevector
+       "0000000000000000000000000000000000000000000000000000"))))
 
 (define (vcs->origin vcs-type vcs-repo-url version)
   "Generate the `origin' block of a package depending on what type of source
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 25 May 2023 16:08:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 25 12:08:06 2023
Received: from localhost ([127.0.0.1]:47927 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q2DVW-00020z-An
	for submit <at> debbugs.gnu.org; Thu, 25 May 2023 12:08:06 -0400
Received: from mail-wr1-f43.google.com ([209.85.221.43]:38329)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1q2DVS-00020H-Vz
 for 63647 <at> debbugs.gnu.org; Thu, 25 May 2023 12:08:05 -0400
Received: by mail-wr1-f43.google.com with SMTP id
 ffacd0b85a97d-30aa563abdaso277564f8f.1
 for <63647 <at> debbugs.gnu.org>; Thu, 25 May 2023 09:08:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1685030877; x=1687622877;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=ggyHuW7W6dj1cM2DJo0LS2NRgbC0S+NSoOr7/aVuNQ8=;
 b=jN1ac2yKpQOfOCkANizpmgEKAwubPZfjjQsW6oi9dZdm4XqNw9GDHG0hD4F7d+e8r9
 /HTyFX1vmgl6kU7SjpAA5mFLGhk28Q/39HyPufDkcIm7xS7zo6DUV3IEMrUR0a2DYwun
 oRzOOcibP5XVxjM/uYc3pvZLlTipc1wv9V6iGlyDY7qaBbciAkHjGDChsrl1w303wATk
 Fw8uBIae6ZwR8fijHvQerCan8sIVBCIvHTDc2UJHbe5ZrbVsYdFwaHn9ooJCXx4oBlv1
 lQEf7Tu6AKJdSfGSL63lmlFIvN8E+pCgSOOGqclxLDcTYbHK6r0uk2lOTaK/g3C5lWSO
 N1Cw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1685030877; x=1687622877;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=ggyHuW7W6dj1cM2DJo0LS2NRgbC0S+NSoOr7/aVuNQ8=;
 b=lYF00BKtKCUr/AiStn+YvW3KBPPi5ZfRysD/Q7AS3WPoABw47v5qapsg9v6L+1khsd
 YAy9rrhxT5j5MIwmCxOw4DoPDh3aEnHmCguv0PBtoW6T4BnRg54qJGTHrmMy7WcakZlp
 JdE8Rm42lJfrYrh5oInqmM503CXKvBGHHvmRWxzm2hmPt6K/biNgV+kmakL9Cm5rBgNu
 E5FYGKZeDH8p7isScxYu3ZQZW/eatlUVhUNFACJsS2OirW5qaDwr17YKVTl9xYRT/Utl
 i6teU/TBId53VpNhLqE1WtJBJBY39f4s82+TAnHP9Tm04inmp3Ik8XMPloWI9IPebsy3
 yLLA==
X-Gm-Message-State: AC+VfDy3FyWK3MmWEgENFmPgcpYeVJztTMGTFlFm+DCQjdr1/QUqsLTX
 9sBOrPHkG3cCHsKZIM8Qy+jPqKqlPPw=
X-Google-Smtp-Source: ACHHUZ46H/nQardfTYlQ1ZPE74pM4L7Sl/TEQEqVaz+a6KOSiH1wfBb0vczZNHaS46ezFCCxReh/IA==
X-Received: by 2002:adf:e345:0:b0:307:a582:330a with SMTP id
 n5-20020adfe345000000b00307a582330amr4093110wrj.2.1685030877123; 
 Thu, 25 May 2023 09:07:57 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 y9-20020a5d4709000000b00307d58b3da9sm2261016wrq.25.2023.05.25.09.07.56
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 25 May 2023 09:07:56 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 63647 <at> debbugs.gnu.org
Subject: [PATCH v3 3/3] guix: import: go: Use correct tag for go module in
 subdirectory.
Date: Thu, 25 May 2023 18:07:49 +0200
Message-Id: <ef9e802b1c3465665b96ec171cf2f7e9bf8f51e6.1685030838.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <a520128590d4b67af4c2b22ae167590b99e449dd.1685030838.git.zimon.toutoune@HIDDEN>
References: <a520128590d4b67af4c2b22ae167590b99e449dd.1685030838.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63647
Cc: Stephen Paul Weber <singpolyma@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Stephen Paul Weber <singpolyma@HIDDEN>

* guix/import/go.scm (vcs->origin): New argument module-path-subdirectory.
Use it to get Git tag as described by <https://go.dev/ref/mod>.

Co-authored-by: Simon Tournier <zimon.toutoune@HIDDEN>
Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/go.scm | 35 ++++++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 11 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index c6258296f6..c2f9065d94 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2021-2022 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2021 Xinglu Chen <public@HIDDEN>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
+;;; Copyright © 2022 Stephen Paul Weber <singpolyma@HIDDEN>
 ;;; Copyright © 2021, 2023 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -522,28 +523,35 @@ (define* (git-checkout-hash url reference algorithm)
       (nix-base32-string->bytevector
        "0000000000000000000000000000000000000000000000000000"))))
 
-(define (vcs->origin vcs-type vcs-repo-url version)
+(define (vcs->origin vcs-type vcs-repo-url module-path-subdirectory version)
   "Generate the `origin' block of a package depending on what type of source
 control system is being used."
   (case vcs-type
     ((git)
-     (let ((plain-version? (string=? version (go-version->git-ref version)))
-           (v-prefixed?    (string-prefix? "v" version)))
+     (let* ((plain-version? (string=? version (go-version->git-ref version)))
+            (v-prefixed?    (string-prefix? "v" version))
+            ;; A module in a subdirectory has a tag prefixed by this
+            ;; subdirectory.  See <https://go.dev/ref/mod>.
+            (tag-prefix     (if (string=? module-path-subdirectory "") ;
+                                ""
+                                (string-append
+                                 (substring module-path-subdirectory 1) "/")))
+            (prefix         (string-append tag-prefix "v"))
+            (git-commit     (if plain-version?
+                                (string-append tag-prefix version)
+                                (go-version->git-ref version))))
        `(origin
           (method git-fetch)
           (uri (git-reference
                 (url ,vcs-repo-url)
-                ;; This is done because the version field of the package,
-                ;; which the generated quoted expression refers to, has been
-                ;; stripped of any 'v' prefixed.
                 (commit ,(if (and plain-version? v-prefixed?)
-                             '(string-append "v" version)
+                             `(string-append ,prefix version)
                              '(go-version->git-ref version)))))
           (file-name (git-file-name name version))
           (sha256
            (base32
             ,(bytevector->nix-base32-string
-              (git-checkout-hash vcs-repo-url (go-version->git-ref version)
+              (git-checkout-hash vcs-repo-url git-commit
                                  (hash-algorithm sha256))))))))
     ((hg)
      `(origin
@@ -621,12 +629,17 @@ (define* (go-module->guix-package module-path #:key
                            dependencies+versions
                            (map car dependencies+versions)))
          (module-path-sans-suffix
-          (match:prefix (string-match "([\\./]v[0-9]+)?$" module-path)))
+           (if (string-prefix? "gopkg.in" module-path)
+               module-path
+               (match:prefix (string-match "([\\./]v[0-9]+)?$" module-path))))
          (guix-name (go-module->guix-package-name module-path))
-         (root-module-path (module-path->repository-root module-path))
+         (root-module-path (module-path->repository-root module-path-sans-suffix))
          ;; The VCS type and URL are not included in goproxy information. For
          ;; this we need to fetch it from the official module page.
          (meta-data (fetch-module-meta-data root-module-path))
+         (module-path-subdirectory
+           (substring module-path-sans-suffix
+             (string-length (module-meta-import-prefix meta-data))))
          (vcs-type (module-meta-vcs meta-data))
          (vcs-repo-url (module-meta-data-repo-url meta-data goproxy))
          (synopsis (go-package-synopsis module-path))
@@ -637,7 +650,7 @@ (define* (go-module->guix-package module-path #:key
         (name ,guix-name)
         (version ,(strip-v-prefix version*))
         (source
-         ,(vcs->origin vcs-type vcs-repo-url version*))
+         ,(vcs->origin vcs-type vcs-repo-url module-path-subdirectory version*))
         (build-system go-build-system)
         (arguments
          '(#:import-path ,module-path
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 25 May 2023 15:41:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 25 11:41:32 2023
Received: from localhost ([127.0.0.1]:47887 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q2D5o-000176-Ef
	for submit <at> debbugs.gnu.org; Thu, 25 May 2023 11:41:32 -0400
Received: from mail-wr1-f53.google.com ([209.85.221.53]:39216)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1q2D5j-00016P-29
 for 63647 <at> debbugs.gnu.org; Thu, 25 May 2023 11:41:27 -0400
Received: by mail-wr1-f53.google.com with SMTP id
 ffacd0b85a97d-3094ca1df73so351039f8f.1
 for <63647 <at> debbugs.gnu.org>; Thu, 25 May 2023 08:41:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1685029281; x=1687621281;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=IGxbiqGMkKYf02xQ8jmP+1cjWMBkw0vK+f7mNuPZKsU=;
 b=AwAM8Mbfox6ZsJHJ3tTx8T8cdLp4hF4jq/7MzTymlI73V+ugGVfH5O0//R7cpVJ6ni
 PUgdmp2t+H/Kad7K3vINdsc01CGxjwb2EaH3iXJLSLBPa/TMPS7evAMmuqXLSVpGmPbS
 ef8QRRNQUSx7ZUDHTAczTGPwFrVZG+jpnjmbjorUeFYWSgjMUOl1zMueH5X5NLHTa1/f
 AgKlmcqZHuJR9XAUHu89RBBPKAGZ8ODmK5UKs40EKRcQOVigM0rkX5gsdzDXUyxAViNu
 2HY2DSOiZg6Fc6zAx2gerBl9qbzsikDkl65AMYpEyPAmb+lyvsX+DO85YWWP1s+3s4rz
 ES0w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1685029281; x=1687621281;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=IGxbiqGMkKYf02xQ8jmP+1cjWMBkw0vK+f7mNuPZKsU=;
 b=It7Z4nQ/8OIdDJwLd+UU3nR95xoL6jZZEI/kuI9a/7l62sACGGNz9AGhzWtchMhIFt
 ZJwVUGA5TQLPWP4FOf8Yu3psWzfVLjJMjU9kLA26POCVaqZb4V3bxQRc3rS1IKrVzonv
 G3deyzl7yHO5PVABUJ6VocAgpRTFM0iTanT3MZD6/NHnHaURlAUvRAQmUNgZUEGBRkr5
 9EAUsQxoWtf6G1ZQ7BluQSk3henerM+nn1RgrkByTxl2Qg+lGAEU/cYK4agArcdK2lr0
 jeAE5PSO/Xy+pfHF2bHeqx7roUNJytlIVyMJjhBuicwr0DewhkHGgzzHnNXnXSjopADn
 Eemw==
X-Gm-Message-State: AC+VfDwaQzdqbY0rS7gQCqcP4oBJ57DaA2WpIHc78xk8HARHYcY9uD7v
 bFuZhPpD7pRFDS4jnUme9HVJJoc0AEs=
X-Google-Smtp-Source: ACHHUZ49WiwBhudrYrPWaB2bb2oNVSnz7fSIcpvsObs/F4GdWCP+Sj/rmmxmtEPHg/TfRStFd8ncBA==
X-Received: by 2002:a5d:6208:0:b0:2f9:59a3:eb30 with SMTP id
 y8-20020a5d6208000000b002f959a3eb30mr13358506wru.0.1685029280975; 
 Thu, 25 May 2023 08:41:20 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 q2-20020adff502000000b003062c0ef959sm2172258wro.69.2023.05.25.08.41.20
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 25 May 2023 08:41:20 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 63647 <at> debbugs.gnu.org
Subject: [PATCH v2 3/3] guix: import: go: Use correct tag for go module in
 subdirectory.
Date: Thu, 25 May 2023 17:41:12 +0200
Message-Id: <27b0652df204a77a5b38554a95128fb54ca64dd9.1685029183.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <a520128590d4b67af4c2b22ae167590b99e449dd.1685029183.git.zimon.toutoune@HIDDEN>
References: <a520128590d4b67af4c2b22ae167590b99e449dd.1685029183.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63647
Cc: Stephen Paul Weber <singpolyma@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Stephen Paul Weber <singpolyma@HIDDEN>

* guix/import/go.scm (vcs->origin): New argument module-path-subdirectory.
Use it to get Git tag as described by <https://go.dev/ref/mod>.

Signed-off-by: Simon Tournier <zimon.toutoune@HIDDEN>
---
 guix/import/go.scm | 34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index c6258296f6..f02c098f1c 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2021-2022 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2021 Xinglu Chen <public@HIDDEN>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
+;;; Copyright © 2022 Stephen Paul Weber <singpolyma@HIDDEN>
 ;;; Copyright © 2021, 2023 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -522,28 +523,34 @@ (define* (git-checkout-hash url reference algorithm)
       (nix-base32-string->bytevector
        "0000000000000000000000000000000000000000000000000000"))))
 
-(define (vcs->origin vcs-type vcs-repo-url version)
+(define (vcs->origin vcs-type vcs-repo-url module-path-subdirectory version)
   "Generate the `origin' block of a package depending on what type of source
 control system is being used."
   (case vcs-type
     ((git)
-     (let ((plain-version? (string=? version (go-version->git-ref version)))
-           (v-prefixed?    (string-prefix? "v" version)))
+     (let* ((plain-version? (string=? version (go-version->git-ref version)))
+            (v-prefixed?    (string-prefix? "v" version))
+            ;; A module in a subdirectory has a tag prefixed by this
+            ;; subdirectory.  See <https://go.dev/ref/mod>.
+            (tag-prefix     (if (string=? module-path-subdirectory "") ;
+                                ""
+                                (string-append
+                                 (substring module-path-subdirectory 1) "/")))
+            (git-commit     (if plain-version?
+                                (string-append tag-prefix version)
+                                (go-version->git-ref version))))
        `(origin
           (method git-fetch)
           (uri (git-reference
                 (url ,vcs-repo-url)
-                ;; This is done because the version field of the package,
-                ;; which the generated quoted expression refers to, has been
-                ;; stripped of any 'v' prefixed.
                 (commit ,(if (and plain-version? v-prefixed?)
-                             '(string-append "v" version)
+                             `(string-append ,tag-prefix "v" version)
                              '(go-version->git-ref version)))))
           (file-name (git-file-name name version))
           (sha256
            (base32
             ,(bytevector->nix-base32-string
-              (git-checkout-hash vcs-repo-url (go-version->git-ref version)
+              (git-checkout-hash vcs-repo-url git-commit
                                  (hash-algorithm sha256))))))))
     ((hg)
      `(origin
@@ -621,12 +628,17 @@ (define* (go-module->guix-package module-path #:key
                            dependencies+versions
                            (map car dependencies+versions)))
          (module-path-sans-suffix
-          (match:prefix (string-match "([\\./]v[0-9]+)?$" module-path)))
+           (if (string-prefix? "gopkg.in" module-path)
+               module-path
+               (match:prefix (string-match "([\\./]v[0-9]+)?$" module-path))))
          (guix-name (go-module->guix-package-name module-path))
-         (root-module-path (module-path->repository-root module-path))
+         (root-module-path (module-path->repository-root module-path-sans-suffix))
          ;; The VCS type and URL are not included in goproxy information. For
          ;; this we need to fetch it from the official module page.
          (meta-data (fetch-module-meta-data root-module-path))
+         (module-path-subdirectory
+           (substring module-path-sans-suffix
+             (string-length (module-meta-import-prefix meta-data))))
          (vcs-type (module-meta-vcs meta-data))
          (vcs-repo-url (module-meta-data-repo-url meta-data goproxy))
          (synopsis (go-package-synopsis module-path))
@@ -637,7 +649,7 @@ (define* (go-module->guix-package module-path #:key
         (name ,guix-name)
         (version ,(strip-v-prefix version*))
         (source
-         ,(vcs->origin vcs-type vcs-repo-url version*))
+         ,(vcs->origin vcs-type vcs-repo-url module-path-subdirectory version*))
         (build-system go-build-system)
         (arguments
          '(#:import-path ,module-path
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 25 May 2023 15:41:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 25 11:41:32 2023
Received: from localhost ([127.0.0.1]:47885 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q2D5o-000173-2F
	for submit <at> debbugs.gnu.org; Thu, 25 May 2023 11:41:32 -0400
Received: from mail-wr1-f51.google.com ([209.85.221.51]:39214)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1q2D5j-00016M-D1
 for 63647 <at> debbugs.gnu.org; Thu, 25 May 2023 11:41:27 -0400
Received: by mail-wr1-f51.google.com with SMTP id
 ffacd0b85a97d-3094ca1df73so351036f8f.1
 for <63647 <at> debbugs.gnu.org>; Thu, 25 May 2023 08:41:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1685029280; x=1687621280;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=y244qRQORWlQPqsRz2FcEtZrdw2xPx9OOtmkOHi0wPs=;
 b=i2aAk6pd5PF71VdqgjCnK66LFUaM++tTnsS7HLnAzxl8CChWxl0wrj/5vU5/vDalv6
 mqAbeUgYBFU+WXSj/BgrEYS1wMzLcjx8g5uLjpkEHhgg8KnL9bgtkdd73AmttJKpT0t9
 efQJP6x0OaiSxMWxiV/j/Yk7apvp3DrR/Dnv00A0WtNzMkdXtmV6CC2xLorliPlgBSne
 oMd6anZzyau64ECWxtJ2xQZQ5g3HmB970/yP0iYu2agaqS5lM0fsmH/d2jUJKHkmbqtS
 3H2qIJHw+Mi5Ao6R9fo/NxG9Lt8NrFXrkuCrR2Bh8wQ1IW4PMomKLWmbz1UVukXdQbqN
 YQlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1685029280; x=1687621280;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=y244qRQORWlQPqsRz2FcEtZrdw2xPx9OOtmkOHi0wPs=;
 b=N9qOwCulwXljWSIdt3+50QT+lX5C/2Xo0nHXx21LarMLv67mv1Z9z0tvU/qk8SD+I9
 oEK5ZH8WrSdmXVMvo9Uu4QetgvxR5cS3GVxKF744odsVbSFGM/yXYHRMhItA2aVtMm9o
 kDHI6rJNVEqducQODG8HdZWm6g6VoAk4FJGhGeKJh8UbqwVdUvtE+CNgdc1NA/x2t9/g
 NKCIZOrJAVVd3GC1Hr5BYHMGw8a1IP4WE8deBgqOR/FXE+5PEB9vlqmTdudoxW/9ivF6
 8BUhWFFjDOfjynUxT4FTIt8eesw3EMZhD88+S/gAWWD0SCgLTfxDBXJ6dUnB8CLZjZd8
 swEg==
X-Gm-Message-State: AC+VfDyRKLRx1v/MgZCRx5mpR5UWT7sWcPmE3zMmNivmJhwrhZkXTPGe
 3RVMMaFEUtUD7/EALp59zSMHdcXBN0w=
X-Google-Smtp-Source: ACHHUZ6wZz8Y7UVCODHV9Z4lEXVzcM4KQFa/PfIZ+N1oIdXDXh5hWxXAtgu+pe0JX8pcU6TkTwJXIQ==
X-Received: by 2002:a5d:6208:0:b0:2f9:59a3:eb30 with SMTP id
 y8-20020a5d6208000000b002f959a3eb30mr13358466wru.0.1685029280025; 
 Thu, 25 May 2023 08:41:20 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 q2-20020adff502000000b003062c0ef959sm2172258wro.69.2023.05.25.08.41.19
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 25 May 2023 08:41:19 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 63647 <at> debbugs.gnu.org
Subject: [PATCH v2 1/3] guix: import: go: Sort hint about available versions.
Date: Thu, 25 May 2023 17:41:10 +0200
Message-Id: <a520128590d4b67af4c2b22ae167590b99e449dd.1685029183.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63647
Cc: Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/import/go.scm (validate-version): Sort available versions.
---
 guix/import/go.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 0357e6a1eb..1943869162 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -34,6 +34,7 @@ (define-module (guix import go)
   #:use-module (guix packages)
   #:use-module (guix http-client)
   #:use-module (guix memoization)
+  #:use-module (guix utils)
   #:autoload   (htmlprag) (html->sxml)            ;from Guile-Lib
   #:autoload   (guix base32) (bytevector->nix-base32-string)
   #:autoload   (guix build utils) (mkdir-p)
@@ -588,8 +589,9 @@ (define (validate-version version available-versions module-path)
         (condition (&fix-hint
                     (hint (format #f (G_ "Pick one of the following \
 available versions:~{ ~a~}.")
-                                  (map strip-v-prefix
-                                       available-versions)))))))))
+                                  (sort (map strip-v-prefix
+                                             available-versions)
+                                        version>?)))))))))
 
 (define* (go-module->guix-package module-path #:key
                                   (goproxy "https://proxy.golang.org")

base-commit: 99fc7e5dd3c9c92f9b6c2e51db9dc5b0481a56b2
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 25 May 2023 15:41:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 25 11:41:29 2023
Received: from localhost ([127.0.0.1]:47883 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q2D5k-00016r-LO
	for submit <at> debbugs.gnu.org; Thu, 25 May 2023 11:41:29 -0400
Received: from mail-wr1-f47.google.com ([209.85.221.47]:38309)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1q2D5i-00016N-9q
 for 63647 <at> debbugs.gnu.org; Thu, 25 May 2023 11:41:27 -0400
Received: by mail-wr1-f47.google.com with SMTP id
 ffacd0b85a97d-30aa563abdaso272377f8f.1
 for <63647 <at> debbugs.gnu.org>; Thu, 25 May 2023 08:41:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1685029280; x=1687621280;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=CSnHPMzezOPOSZyv6KXp9jZFfx9VEwTPOCtQsJi6uGA=;
 b=jm4FKkxm6Cvf2ftb0Ba2nnjDJiFFYN2dvunLEbZg8ybsQnU2bb7OLBgiWYTL1+wlg2
 MiNFgOrhFMz9mBIi+PTBhUlzclTrHUAnpfzSGX9dC2Xzh2zWtBVxzf6eZpdEVUqGBPzJ
 gIaa3/HpdkoZzrdSSlwQsC4oCu4rJaD0Kd8sC1/Gvam4lyNnSBquw3uBpdes4yikJbdm
 1tczV0Lwt52ic/aKy28bAGVZs6wVw7h56U0cUdeg6z1eV4fUYXati3ntDO+a20v8gbrt
 Ze7H48cjOzJjeo7dzFCR1jKPd2rYsgpvYWiJZ2R8zUZBPzNBmixzFwsvgLazL5pk9wMI
 7mHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1685029280; x=1687621280;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=CSnHPMzezOPOSZyv6KXp9jZFfx9VEwTPOCtQsJi6uGA=;
 b=BizvC9k2ggC3iCzXskwsToWVrG8BkAqlqVhtggqOGoUYGTE4htknfWBJR2FoyGV5Bo
 oD+JOWf+r+6v315u2nsiuJQ8qQ3GLxog+WBfqkYPsTOsTqWVXcMqToyK1b7FC+kS/3Cx
 wvDBE7b6me1B2tzOfmLl7Ey391HGs9XW3A9KiKeDB5sryESXA/rovBEYdm5O7RryT4R8
 uPw35U0axmAaAZ+vuy303OByR8BVPFB1aa+DpMdynvkMD4pB9cWzctCWWeL9bGQ9EYWC
 F57J0mKLVuc3AgyK7BhaN6dKUINun1JEO2riq6HX88Pf9MdjNaJO3uE7Ku6zRbyl+6hb
 CrPA==
X-Gm-Message-State: AC+VfDwRFVThLmJ46Wp77GTeffQqMUb8TUZAVMCldsxyD2AE3PW3VIzk
 UbngsNaZ83G8jt7L5RRM0xSKXoS/iG8=
X-Google-Smtp-Source: ACHHUZ5ImuWUKoVD1rRjMDKY8Sz+OywiIkchiMpTa0IAPAcDUpAHC7Ya1DnqkfCYAKVf0n4cxuRuqQ==
X-Received: by 2002:a5d:6785:0:b0:309:22bb:e00 with SMTP id
 v5-20020a5d6785000000b0030922bb0e00mr4045628wru.5.1685029280407; 
 Thu, 25 May 2023 08:41:20 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 q2-20020adff502000000b003062c0ef959sm2172258wro.69.2023.05.25.08.41.20
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 25 May 2023 08:41:20 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 63647 <at> debbugs.gnu.org
Subject: [PATCH v2 2/3] guix: import: go: Catch Git error.
Date: Thu, 25 May 2023 17:41:11 +0200
Message-Id: <f699a25c43805136ada95ef7c7213a78abf5909e.1685029183.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <a520128590d4b67af4c2b22ae167590b99e449dd.1685029183.git.zimon.toutoune@HIDDEN>
References: <a520128590d4b67af4c2b22ae167590b99e449dd.1685029183.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63647
Cc: Felix Lechner <felix.lechner@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/import/go.scm (git-checkout-hash): Catch Git error.

Reported-by: Felix Lechner <felix.lechner@HIDDEN>.
---
 guix/import/go.scm | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 1943869162..c6258296f6 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2021-2022 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2021 Xinglu Chen <public@HIDDEN>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
-;;; Copyright © 2021 Simon Tournier <zimon.toutoune@HIDDEN>
+;;; Copyright © 2021, 2023 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,9 +36,11 @@ (define-module (guix import go)
   #:use-module (guix memoization)
   #:use-module (guix utils)
   #:autoload   (htmlprag) (html->sxml)            ;from Guile-Lib
-  #:autoload   (guix base32) (bytevector->nix-base32-string)
+  #:autoload   (guix base32) (bytevector->nix-base32-string nix-base32-string->bytevector)
   #:autoload   (guix build utils) (mkdir-p)
+  #:autoload   (guix ui) (warning)
   #:autoload   (gcrypt hash) (hash-algorithm sha256)
+  #:autoload   (git structs) (git-error-message)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:use-module (ice-9 peg)
@@ -507,12 +509,18 @@ (define* (git-checkout-hash url reference algorithm)
   ;; subsequent "guix import" invocations.
   (mkdir-p cache)
   (chmod cache #o700)
-  (let-values (((checkout commit _)
-                (parameterize ((%repository-cache-directory cache))
-                  (update-cached-checkout url
-                                          #:ref
-                                          `(tag-or-commit . ,reference)))))
-    (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
+  (catch 'git-error
+    (lambda _
+      (let-values (((checkout commit _)
+                    (parameterize ((%repository-cache-directory cache))
+                      (update-cached-checkout url
+                                              #:ref
+                                              `(tag-or-commit . ,reference)))))
+        (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
+    (lambda (key error . rest)
+      (warning (G_ "Git error: ~a in ~a~%") (git-error-message error) url)
+      (nix-base32-string->bytevector
+       "0000000000000000000000000000000000000000000000000000"))))
 
 (define (vcs->origin vcs-type vcs-repo-url version)
   "Generate the `origin' block of a package depending on what type of source
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 22 May 2023 16:08:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 22 12:08:33 2023
Received: from localhost ([127.0.0.1]:36046 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q185J-000663-13
	for submit <at> debbugs.gnu.org; Mon, 22 May 2023 12:08:33 -0400
Received: from mail-wm1-f47.google.com ([209.85.128.47]:39963)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1q185F-00065i-WA
 for 63647 <at> debbugs.gnu.org; Mon, 22 May 2023 12:08:31 -0400
Received: by mail-wm1-f47.google.com with SMTP id
 5b1f17b1804b1-3f4289f7c1cso4870825e9.0
 for <63647 <at> debbugs.gnu.org>; Mon, 22 May 2023 09:08:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1684771704; x=1687363704;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=CSnHPMzezOPOSZyv6KXp9jZFfx9VEwTPOCtQsJi6uGA=;
 b=e8W7N3UEBEgW7sFemAORqCCHRkbR7KRtymC/3lhpwPJ2dB0syMYXxYSyeZNO11oM7v
 Dsl36VfG3SubazfEodDEW5j8/00vSNNA9L4I+dFOJ/WhbdTb2hcaz6Z+KqFp59k6MmYS
 VWrzVVzbzsgkDQczc1RSKyoBlo55D6gsBbYFyeijvqsxT9I29h4irb1pqKfsCSzfBKic
 6TARPIp5yqCk5sV6MoelTpyjtG6UX4sSQ5hynmLYCBtnottRKqt++VBvmzM2zOnyQaK/
 wnpjN5d7gjt1VP/Oi1y1ARVgrr7M3X0Key2SG6Ucvo8HgGEav3h2Pshr59sF1Pi6Nk7f
 PwlQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684771704; x=1687363704;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=CSnHPMzezOPOSZyv6KXp9jZFfx9VEwTPOCtQsJi6uGA=;
 b=bm7WtVOvfBxxj0DP4oKTn9d8t4RPX+Cz2PxJGhX1JN5CeANV3k9jeJOPb37k5bnOYA
 K4+9SH+CcL4Z9viyoeQDz/h0wAzj5odSyMruJYcRNiohnULqKhoSrJO7hJIQDLZ/Abu7
 2q313p7Dtw6nbx/QDULRlQCLYuTKQ/4J0pAIT8buZ5VNYUaPHREbFxQziTfMTGmcAw0w
 prTn/tEvYcyL54x6emnbU97iJA4KZ/7Bl8oCsMi82tANwi6esjrwDoMhSagWtS5KTPfm
 nxrS2nyo0eB4DBgsBOKpoTDZOoOqDzJFWfNmKJlsY5UJpRkx5oIGtVgtNKhQX4dToy+L
 PCHg==
X-Gm-Message-State: AC+VfDyBRE8yKmX3Iu9TaivWGPxt/JBsLQHm354D+Ja4I97JeYaaRw+m
 spSatMrl6lzYL/swQZBJSwURApl1AfU=
X-Google-Smtp-Source: ACHHUZ4hQPkwRLIbZ0fDbx8xyMpq1DvaVO9NV1F9UrvLClPSPwYBhNvFxLhOTWqthml5XcJeCNhq/Q==
X-Received: by 2002:a05:600c:35c7:b0:3f4:27ec:9d12 with SMTP id
 r7-20020a05600c35c700b003f427ec9d12mr8377481wmq.4.1684771704016; 
 Mon, 22 May 2023 09:08:24 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 u3-20020a7bc043000000b003f4f89bc48dsm12025107wmc.15.2023.05.22.09.08.23
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 22 May 2023 09:08:23 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 63647 <at> debbugs.gnu.org
Subject: [PATCH 2/2] guix: import: go: Catch Git error.
Date: Mon, 22 May 2023 18:08:17 +0200
Message-Id: <307ae354ce980b521ae5878dd0710bd89f1ad0c5.1684771100.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <cover.1684771100.git.zimon.toutoune@HIDDEN>
References: <cover.1684771100.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63647
Cc: Felix Lechner <felix.lechner@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/import/go.scm (git-checkout-hash): Catch Git error.

Reported-by: Felix Lechner <felix.lechner@HIDDEN>.
---
 guix/import/go.scm | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 1943869162..c6258296f6 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2021-2022 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2021 Xinglu Chen <public@HIDDEN>
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
-;;; Copyright © 2021 Simon Tournier <zimon.toutoune@HIDDEN>
+;;; Copyright © 2021, 2023 Simon Tournier <zimon.toutoune@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,9 +36,11 @@ (define-module (guix import go)
   #:use-module (guix memoization)
   #:use-module (guix utils)
   #:autoload   (htmlprag) (html->sxml)            ;from Guile-Lib
-  #:autoload   (guix base32) (bytevector->nix-base32-string)
+  #:autoload   (guix base32) (bytevector->nix-base32-string nix-base32-string->bytevector)
   #:autoload   (guix build utils) (mkdir-p)
+  #:autoload   (guix ui) (warning)
   #:autoload   (gcrypt hash) (hash-algorithm sha256)
+  #:autoload   (git structs) (git-error-message)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
   #:use-module (ice-9 peg)
@@ -507,12 +509,18 @@ (define* (git-checkout-hash url reference algorithm)
   ;; subsequent "guix import" invocations.
   (mkdir-p cache)
   (chmod cache #o700)
-  (let-values (((checkout commit _)
-                (parameterize ((%repository-cache-directory cache))
-                  (update-cached-checkout url
-                                          #:ref
-                                          `(tag-or-commit . ,reference)))))
-    (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
+  (catch 'git-error
+    (lambda _
+      (let-values (((checkout commit _)
+                    (parameterize ((%repository-cache-directory cache))
+                      (update-cached-checkout url
+                                              #:ref
+                                              `(tag-or-commit . ,reference)))))
+        (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
+    (lambda (key error . rest)
+      (warning (G_ "Git error: ~a in ~a~%") (git-error-message error) url)
+      (nix-base32-string->bytevector
+       "0000000000000000000000000000000000000000000000000000"))))
 
 (define (vcs->origin vcs-type vcs-repo-url version)
   "Generate the `origin' block of a package depending on what type of source
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at 63647 <at> debbugs.gnu.org:


Received: (at 63647) by debbugs.gnu.org; 22 May 2023 16:08:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 22 12:08:33 2023
Received: from localhost ([127.0.0.1]:36044 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q185I-000661-Mi
	for submit <at> debbugs.gnu.org; Mon, 22 May 2023 12:08:32 -0400
Received: from mail-wm1-f42.google.com ([209.85.128.42]:41138)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1q185F-00065g-MV
 for 63647 <at> debbugs.gnu.org; Mon, 22 May 2023 12:08:31 -0400
Received: by mail-wm1-f42.google.com with SMTP id
 5b1f17b1804b1-3f5dbdbb477so3863195e9.0
 for <63647 <at> debbugs.gnu.org>; Mon, 22 May 2023 09:08:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1684771704; x=1687363704;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=I3d9niv4mWlH5hxD8Q+v9x5ZNqotjYBaQ/qiGR/672s=;
 b=gzmjQLjKnIEBo2T1Dlf9MapU3tcPdU0umIN9soCTJVt77fRFJUObG7rgyYluyeEPHO
 DgiUyAwHrBAt2fDqc4zr/raYlhwqvOzVVi3XyjMipj/PB9zVTgFKM/+cQxYBsYhL0GAI
 S/FBDF/xXuFlZnYrBiuPwc1MP9dVHLLMOk6n+aRSpqXjdCh+u075G/1WIAJtovLOPLGo
 2ItN4ftdx5K0lJ474OfsxaZeOjVJXC2Fes0ORxn9Aglt8rILpXwVt+/eEswRcEy4CFJH
 613ywU3JbKwvlLER6D1fzkdAL3gw+fPL9qFasarshA5aGI8QByuKETNqRcGVe8voxq56
 j+fw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684771704; x=1687363704;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=I3d9niv4mWlH5hxD8Q+v9x5ZNqotjYBaQ/qiGR/672s=;
 b=CGYTEdOks0H3a8rfTrcdUEcrRXXkuToAiSRR2owLlc9Qdytq97n5BxrEA4gS6uhwSX
 o/SU+owYt5wyQ85pZOIRFcUbBtz9KamIFb2TplEkvSYOdvVH90rZIYhMbg+7aBiy/NWO
 DzIk2vyFeLmlPG4iVJWUqJcEMV7dzdmNSOU8gT20reeQP8q/t67Ybu6ltJXFox/61VmR
 zXL3bwzHX/prNXl9w6rmlRK6t4SRrc6Sbh4U+QKlTnWFmXcSSf8D1blR2CNheaa3fd2o
 QdOBofFf1hrirPHwlIg2auAAWLpvEvD2bYakHBRQ7LvaHb+4Jps9SY6B1NDKP6Ez42pK
 g/kw==
X-Gm-Message-State: AC+VfDzDVX1ExnPuZBRXUXTpwtRYX37zE0y6IBHWUqdZ1iUMJpk83GCJ
 DIjiCiVBuNMpZPFEKRT0rIGYHGyv5sw=
X-Google-Smtp-Source: ACHHUZ4hqxr7fVpw5eryfs28vFrKWQbPO9Pz3Q8oXA5ODLKBXzPSe+fLLrV2dh9+sI64+VlZJikbuw==
X-Received: by 2002:a05:600c:3ba5:b0:3f5:ffe8:94ac with SMTP id
 n37-20020a05600c3ba500b003f5ffe894acmr5189617wms.0.1684771703595; 
 Mon, 22 May 2023 09:08:23 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 u3-20020a7bc043000000b003f4f89bc48dsm12025107wmc.15.2023.05.22.09.08.23
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 22 May 2023 09:08:23 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: 63647 <at> debbugs.gnu.org
Subject: [PATCH 1/2] guix: import: go: Sort hint about available versions.
Date: Mon, 22 May 2023 18:08:16 +0200
Message-Id: <5cb8f8989fccc4580d10b7e39633f8880c838236.1684771100.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <cover.1684771100.git.zimon.toutoune@HIDDEN>
References: <cover.1684771100.git.zimon.toutoune@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 63647
Cc: Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/import/go.scm (validate-version): Sort available versions.
---
 guix/import/go.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index 0357e6a1eb..1943869162 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -34,6 +34,7 @@ (define-module (guix import go)
   #:use-module (guix packages)
   #:use-module (guix http-client)
   #:use-module (guix memoization)
+  #:use-module (guix utils)
   #:autoload   (htmlprag) (html->sxml)            ;from Guile-Lib
   #:autoload   (guix base32) (bytevector->nix-base32-string)
   #:autoload   (guix build utils) (mkdir-p)
@@ -588,8 +589,9 @@ (define (validate-version version available-versions module-path)
         (condition (&fix-hint
                     (hint (format #f (G_ "Pick one of the following \
 available versions:~{ ~a~}.")
-                                  (map strip-v-prefix
-                                       available-versions)))))))))
+                                  (sort (map strip-v-prefix
+                                             available-versions)
+                                        version>?)))))))))
 
 (define* (go-module->guix-package module-path #:key
                                   (goproxy "https://proxy.golang.org")
-- 
2.38.1





Information forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 May 2023 16:05:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 22 12:05:10 2023
Received: from localhost ([127.0.0.1]:36038 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1q1821-00060m-SO
	for submit <at> debbugs.gnu.org; Mon, 22 May 2023 12:05:10 -0400
Received: from lists.gnu.org ([209.51.188.17]:54072)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1q181x-00060Z-4c
 for submit <at> debbugs.gnu.org; Mon, 22 May 2023 12:05:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@HIDDEN>)
 id 1q181v-0003aG-Tn
 for guix-patches@HIDDEN; Mon, 22 May 2023 12:05:04 -0400
Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@HIDDEN>)
 id 1q181r-0000kO-Jz
 for guix-patches@HIDDEN; Mon, 22 May 2023 12:05:03 -0400
Received: by mail-wm1-x335.google.com with SMTP id
 5b1f17b1804b1-3f50020e0f6so6179775e9.1
 for <guix-patches@HIDDEN>; Mon, 22 May 2023 09:04:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1684771498; x=1687363498;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=7/Sm6YgG1lYCUk8oHeDqaaB8zYoy7QOCsd/98gb1Qw4=;
 b=OoS7AZkPp7WxtfCdTIAujp0ZCkX7gHE/ay6HamkO2eX7TtEXob28pxUUaQwRmI5LMI
 xD2KEaHZvxBTajfsjnmOY7BZK3BAgpbk+fO0Xgc9BxzRHJ0O16B0VHFe5OYJe+gwKcHB
 gobukm2dWo5nmoG6+dgzS5EECSSMDAypmVh991wA3hHT7ztcZ0eiwHR4dLexpoy5d7kt
 pEt0vO6o8U0ye16nhNGvGDNtIXCEJ8K4QdEXaMw6l1j1GPRPSYSOquAq5A56oefzqIsX
 z4cdvUcZ6onx+RJOd9G5LzN8fm2xog7MN03bpJd9qSrSoNIWrBy2BMArnSqbG7DOb6Wm
 ib6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684771498; x=1687363498;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=7/Sm6YgG1lYCUk8oHeDqaaB8zYoy7QOCsd/98gb1Qw4=;
 b=U8D8LNH5mGRIqAWVx5jmzl5V6PvylgQgZ4dlWi53ASeQUR2pZL6jZ/+9zABfr/fUzl
 0wBVmZQ2sxZ3He7eSUZmbmJd5Lksv3m3hVkv4H1EBbWnp1pbmut61iQASxVmCbz3mLnM
 5xzMH6DhosvQfbHjTLTjTXATJsdEYkpNsNx9HfoZYE/D9ZqxNlN0juFxr8/rAYogcYMX
 Jbnl+uyuJfwiGjglVRYFtBrk8VGRCC/BxLrA4x59lmrscvnebZou3hlbB99ReaS2Cw69
 xWmBMEsHoZ/Hq+nT7rJkE2ekGmAIaTeJ6jN0MrOY25BXVK+XqWPt4Mq4e7DXympR6Z4S
 1+ew==
X-Gm-Message-State: AC+VfDz3qWEPksbCALxrMtmLCIjpUY79ovxFrMfFFaytftiFUOdJaDDo
 PsBw+hpyd5cmaE26DQ5/b0Lv0rFCbL8=
X-Google-Smtp-Source: ACHHUZ4y/HAarPRfohh0C8prEROv+qwEBaCkgsInnP7crlUOqRiPyEFO/RqtbSRq7Zxw6c929U3E7g==
X-Received: by 2002:a5d:4d4b:0:b0:2e4:aa42:7872 with SMTP id
 a11-20020a5d4d4b000000b002e4aa427872mr7345657wru.4.1684771497649; 
 Mon, 22 May 2023 09:04:57 -0700 (PDT)
Received: from localhost.localdomain ([193.48.40.241])
 by smtp.gmail.com with ESMTPSA id
 p17-20020a5d4e11000000b003063772a55bsm8110387wrt.61.2023.05.22.09.04.57
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 22 May 2023 09:04:57 -0700 (PDT)
From: Simon Tournier <zimon.toutoune@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/2] Fix annoyance with "guix import go"
Date: Mon, 22 May 2023 18:04:50 +0200
Message-Id: <cover.1684771100.git.zimon.toutoune@HIDDEN>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2a00:1450:4864:20::335;
 envelope-from=zimon.toutoune@HIDDEN; helo=mail-wm1-x335.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Simon Tournier <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hi,

As reported in [1], the Go importer returns backtrace.  This patch fixes
that.  The first patch is about sorting the versions.  The second is about
warn but not exit.  It allows to have a first draft when applying recursive
importer.

Compare (first patch),

--8<---------------cut here---------------start------------->8---
$ guix import go go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@HIDDEN
guix import: error: version v0.41 of go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc is not available

hint: Pick one of the following available versions: 0.26.0 0.36.0 0.15.0 0.41.0-rc.1 0.40.0 0.37.0 0.33.0 0.20.0 0.24.0 0.23.0 0.41.0 0.26.1 0.41.1 0.22.0
0.18.0 0.21.0 0.12.0 0.36.4 0.19.0 0.25.0 0.27.0 0.36.2 0.34.0 0.14.0 0.36.3 0.31.0 0.15.1 0.36.1 0.41.0-rc.2 0.32.0 0.28.0 0.35.0 0.42.0-rc.1 0.13.0
0.17.0 0.29.0 0.30.0 0.39.0 0.38.0 0.16.0.

$ ./pre-inst-env guix import go go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc@HIDDEN
guix import: error: version v0.41 of go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc is not available

hint: Pick one of the following available versions: 0.42.0-rc.1 0.41.1 0.41.0-rc.2 0.41.0-rc.1 0.41.0 0.40.0 0.39.0 0.38.0 0.37.0 0.36.4 0.36.3 0.36.2 0.36.1
0.36.0 0.35.0 0.34.0 0.33.0 0.32.0 0.31.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.1 0.26.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0
0.16.0 0.15.1 0.15.0 0.14.0 0.13.0 0.12.0.
--8<---------------cut here---------------end--------------->8---

Then instead of,

--8<---------------cut here---------------start------------->8---
$ guix import go go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
Backtrace:
          14 (primitive-load "/home/simon/.config/guix/current/bin/guix")
In guix/ui.scm:
   2300:7 13 (run-guix . _)
  2263:10 12 (run-guix-command _ . _)
In guix/scripts/import.scm:
    89:11 11 (guix-import . _)
In ice-9/boot-9.scm:
  1752:10 10 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/scripts/import/go.scm:
   116:29  9 (_)
In ice-9/exceptions.scm:
   406:15  8 (go-module->guix-package* . _)
In ice-9/boot-9.scm:
  1752:10  7 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/import/go.scm:
   511:19  6 (go-module->guix-package "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" #:goproxy _ #:version _ # _)
In guix/git.scm:
    291:4  5 (update-cached-checkout _ #:ref _ #:recursive? _ #:check-out? _ #:starting-commit _ #:log-port _ #:cache-directory _)
   277:19  4 (resolve _)
In git/reference.scm:
     60:8  3 (_ _ _)
In git/bindings.scm:
     77:2  2 (raise-git-error _)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1683:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1683:16: In procedure raise-exception:
Git error: reference 'refs/tags/v0.41.1' not found
--8<---------------cut here---------------end--------------->8---

Now it returns (second patch),

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix import go go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
guix import: warning: Git error: reference 'refs/tags/v0.41.1' not found in https://github.com/open-telemetry/opentelemetry-go-contrib
(define-public go-go-opentelemetry-io-contrib-instrumentation-google-golang-org-grpc-otelgrpc
  (package
    (name
     "go-go-opentelemetry-io-contrib-instrumentation-google-golang-org-grpc-otelgrpc")
    (version "0.41.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url
                     "https://github.com/open-telemetry/opentelemetry-go-contrib")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0000000000000000000000000000000000000000000000000000"))))
    (build-system go-build-system)
    (arguments
     '(#:import-path
       "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"))
    (propagated-inputs `(("go-gopkg-in-yaml-v3" ,go-gopkg-in-yaml-v3)
                         ("go-google-golang-org-genproto" ,go-google-golang-org-genproto)
                         ("go-google-golang-org-appengine" ,go-google-golang-org-appengine)
                         ("go-golang-org-x-text" ,go-golang-org-x-text)
                         ("go-golang-org-x-sys" ,go-golang-org-x-sys)
                         ("go-golang-org-x-oauth2" ,go-golang-org-x-oauth2)
                         ("go-golang-org-x-net" ,go-golang-org-x-net)
                         ("go-github-com-pmezard-go-difflib" ,go-github-com-pmezard-go-difflib)
                         ("go-github-com-golang-protobuf" ,go-github-com-golang-protobuf)
                         ("go-github-com-go-logr-stdr" ,go-github-com-go-logr-stdr)
                         ("go-github-com-go-logr-logr" ,go-github-com-go-logr-logr)
                         ("go-github-com-davecgh-go-spew" ,go-github-com-davecgh-go-spew)
                         ("go-cloud-google-com-go-compute-metadata" ,go-cloud-google-com-go-compute-metadata)
                         ("go-cloud-google-com-go-compute" ,go-cloud-google-com-go-compute)
                         ("go-google-golang-org-protobuf" ,go-google-golang-org-protobuf)
                         ("go-google-golang-org-grpc" ,go-google-golang-org-grpc)
                         ("go-go-opentelemetry-io-otel-trace" ,go-go-opentelemetry-io-otel-trace)
                         ("go-go-opentelemetry-io-otel-metric" ,go-go-opentelemetry-io-otel-metric)
                         ("go-go-opentelemetry-io-otel" ,go-go-opentelemetry-io-otel)
                         ("go-github-com-stretchr-testify" ,go-github-com-stretchr-testify)))
    (home-page
     "https://go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc")
    (synopsis #f)
    (description #f)
    (license license:asl2.0)))[env]
--8<---------------cut here---------------end--------------->8---


Cheers,
simon


Simon Tournier (2):
  guix: import: go: Sort hint about available versions.
  guix: import: go: Catch Git error.

 guix/import/go.scm | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)


base-commit: 849286ba66c96534bddc04df1a47d5692cbc977e
-- 
2.38.1





Acknowledgement sent to Simon Tournier <zimon.toutoune@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#63647; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 17 Oct 2023 08:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.