From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <bug-guix-bounces+larch=yhetil.org@gnu.org>
Received: from mp1.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms8.migadu.com with LMTPS
	id eCkJIwyG7GXQUQEA62LTzQ:P1
	(envelope-from <bug-guix-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sat, 09 Mar 2024 16:53:48 +0100
Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp1.migadu.com with LMTPS
	id eCkJIwyG7GXQUQEA62LTzQ
	(envelope-from <bug-guix-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sat, 09 Mar 2024 16:53:48 +0100
X-Envelope-To: larch@yhetil.org
Authentication-Results: aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=skyscraper-nu.20230601.gappssmtp.com header.s=20230601 header.b=wxEyW7eB;
	spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org";
	dmarc=none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1709999628;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:resent-cc:
	 resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to:
	 references:references:list-id:list-help:list-unsubscribe:
	 list-subscribe:list-post:dkim-signature;
	bh=hx6MQtGL3pUh+fLtzADVCTvDHSmpTKGoOg6Zz0pqwT8=;
	b=TB2MWm1ewUvCKoFbGPBGxreWtZ4tcBd0EKFH+/5Gysgww9FthpbKdh9TEopVnwoS9eqL2I
	yLXjo5Uqdus0hWEhp78l8ar9gu5ATqln7nees09kOykTn4ciAhj+hOuyDUDN0ERNyhC2Pf
	QPogobDTqOa+AoFpISL4RtJwqrei3b7vgfnyuOGtH+Lyv9sJXymhiKlkS7PLI4Y6UlAazQ
	l2JFEoj5zjKNHI+suNFmEEA5piv2KXxcCX/bXK6xcMufeuk2Qew4aoJxuMIrVxIUkopT+i
	hJ4oGI+NztUwa/U+iWMD3LU0e6XnZe1O6Ei0JiYLw6iz3Rn58wMAO4gKglLBYg==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=skyscraper-nu.20230601.gappssmtp.com header.s=20230601 header.b=wxEyW7eB;
	spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org";
	dmarc=none
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709999628; a=rsa-sha256; cv=none;
	b=duKC70Pi4KSHZg1sS1xSaHsrl/dkat0S6wLVmidDTrlGB+u0dOkYcixAFxmDthto6NTZ6S
	F1kst7dmrE9lVlCKQIy/xEhYM3UuUiYkOOf/2iDOudqpWvAhbdKjWTvfmmeOBEa3tgUq8v
	37goPhvJj76u+9Hu701hwNg1pCtTsj1FJ81WPyipKEXuHL1Z9erh38jkY2uAocoFbSW9Be
	kPYdLIcos0S5E+dtFzOPNM6UPhfL/D8AaZzXKzlQjVNS+pan20f7O8s77HmMKWK+WK1ZRf
	ARiqqdjg6/EuJr07y6+Fb07G8RiFhwDvoqQRsdXj0oNnhiy4X3U/GJ4T6+LZog==
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id 314E516F23
	for <larch@yhetil.org>; Sat,  9 Mar 2024 16:53:47 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-guix-bounces@gnu.org>)
	id 1riz0u-0006B1-Gq; Sat, 09 Mar 2024 10:53:32 -0500
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 <Debian-debbugs@debbugs.gnu.org>)
 id 1riz0r-0006Ad-Tb
 for bug-guix@gnu.org; Sat, 09 Mar 2024 10:53:31 -0500
Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1riz0r-0003QU-LB
 for bug-guix@gnu.org; Sat, 09 Mar 2024 10:53:29 -0500
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1riz1O-0002Am-A2
 for bug-guix@gnu.org; Sat, 09 Mar 2024 10:54:02 -0500
X-Loop: help-debbugs@gnu.org
Subject: bug#69617: guix go import fails on some version tags
Resent-From: Ryan Barber <rfb@skyscraper.nu>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-guix@gnu.org
Resent-Date: Sat, 09 Mar 2024 15:54:02 +0000
Resent-Message-ID: <handler.69617.B.17099996108315@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 69617
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Tomas Volf <~@wolfsden.cz>
Cc: 69617@debbugs.gnu.org
X-Debbugs-Original-Cc: bug-guix@gnu.org
Received: via spool by submit@debbugs.gnu.org id=B.17099996108315
 (code B ref -1); Sat, 09 Mar 2024 15:54:02 +0000
Received: (at submit) by debbugs.gnu.org; 9 Mar 2024 15:53:30 +0000
Received: from localhost ([127.0.0.1]:34659 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1riz0r-0002A1-5s
 for submit@debbugs.gnu.org; Sat, 09 Mar 2024 10:53:30 -0500
Received: from lists.gnu.org ([209.51.188.17]:47244)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rfb@skyscraper.nu>) id 1riyz8-000279-72
 for submit@debbugs.gnu.org; Sat, 09 Mar 2024 10:51:45 -0500
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 <rfb@skyscraper.nu>) id 1riyyb-0005nF-3Y
 for bug-guix@gnu.org; Sat, 09 Mar 2024 10:51:09 -0500
Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <rfb@skyscraper.nu>) id 1riyyY-0003Fz-FZ
 for bug-guix@gnu.org; Sat, 09 Mar 2024 10:51:08 -0500
Received: by mail-ej1-x62e.google.com with SMTP id
 a640c23a62f3a-a450bedffdfso396805166b.3
 for <bug-guix@gnu.org>; Sat, 09 Mar 2024 07:51:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=skyscraper-nu.20230601.gappssmtp.com; s=20230601; t=1709999463; x=1710604263;
 darn=gnu.org; 
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=hx6MQtGL3pUh+fLtzADVCTvDHSmpTKGoOg6Zz0pqwT8=;
 b=wxEyW7eBt+ksDhsoq00YCFfqxOqyg6+Y+jSV97Oam55XWYrkYa1Vq32Sioqhct8W7n
 WeeFz0mcM6+OjDUVfMRRJKek3Vlr4+37qyTnfbE8m7/WQ5Jb1JZZQJtcrNNVoAQGSbLr
 +71U2LlTDb9F9IWf2GqqrAwRsRVFzIAOGnNX5KTiKND8eqh3xO7JSapK9y0Rk0fAo0Lo
 y0QfjBzr77atViYzDKh0CYss7xd1t7vTZrJicV4zwmFf4pwPuYXWKeu7StG12rw0EOy3
 9qT3fTZYvCSkmxrj5Cd9ljqsezIkNXGx8i4H92qTj5hznlSgThZmvrezamwgyZkxPk/e
 O9eA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1709999463; x=1710604263;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=hx6MQtGL3pUh+fLtzADVCTvDHSmpTKGoOg6Zz0pqwT8=;
 b=GaGSBM+mIEVsO3w4KxLwG2oRBf2ik6tszD9QiJqGYKkBLQ6fnmOcuL8BTXs5nrLxMn
 7VWjbvDL6Ib6yhIUTPqa4CuEYsZKTxc2XAD/nniWDe5u+cCGgBZ5QOlKfaWgQ633pLS1
 PEob416J9h/UFWAbqLGPa1e53RnG7H8FeCq5T2RIwz99EZ+x5vEx6iZCFN19Anu5miLZ
 k45tVnfZ3XBtWzHrExRWaQXwUIfIltPWvRQD0EE83BbdRua0KbOwngj90vuNgUkY5tkG
 ow6wNuwnWjwm7ty/IW5GRBRrS0jTfnnfvHGh8rRtNy0Oe48TDTXoKYGtOzu5BAYed3Be
 vIKg==
X-Gm-Message-State: AOJu0YxznhvDCSqaPYnFHMJAXtsgGVdBOI6DX/n7cPT/ODSawph4Tbjc
 SPg4zGNfuiuu+7YSON7nsETDffXKRLVTcibIKv2HtUxYW3V2CQ+VgEbfSA+b1X7Q/qHN9SvwNSG
 b0fpSKN0ejiZSWMjVukFUkPfSOeRSJwYdVzkdhreKYjw6C6N8tCuqew==
X-Google-Smtp-Source: AGHT+IGwA+IblO1ylB0svsGXQu7FdnXdVK5+zzO4MzDwxqh/eKexyCF5YN8Jub2xRVJWfTlgm+tZKuAA3Bu/hT9XhPM=
X-Received: by 2002:a17:906:a287:b0:a44:7ad0:8069 with SMTP id
 i7-20020a170906a28700b00a447ad08069mr1184198ejz.72.1709999463334; Sat, 09 Mar
 2024 07:51:03 -0800 (PST)
MIME-Version: 1.0
References: <CAC1NScJ4M1FiWrA0g0AkvXxU_xR+f1Td0GYLazGekKMmQ5c_Rw@mail.gmail.com>
 <Zest843Gjt-grkw4@ws>
In-Reply-To: <Zest843Gjt-grkw4@ws>
From: Ryan Barber <rfb@skyscraper.nu>
Date: Sat, 9 Mar 2024 07:50:52 -0800
Message-ID: <CAC1NSc+5u=i_FimoGQV3jub3tiNk2AHZO9m9gZeF4TkHpU7BJg@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: none client-ip=2a00:1450:4864:20::62e;
 envelope-from=rfb@skyscraper.nu; helo=mail-ej1-x62e.google.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Mailman-Approved-At: Sat, 09 Mar 2024 10:53:28 -0500
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-guix@gnu.org
List-Id: Bug reports for GNU Guix <bug-guix.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-guix>,
 <mailto:bug-guix-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-guix>
List-Post: <mailto:bug-guix@gnu.org>
List-Help: <mailto:bug-guix-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-guix>,
 <mailto:bug-guix-request@gnu.org?subject=subscribe>
Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org
Sender: bug-guix-bounces+larch=yhetil.org@gnu.org
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
X-Migadu-Spam-Score: -5.48
X-Spam-Score: -5.48
X-Migadu-Queue-Id: 314E516F23
X-Migadu-Scanner: mx13.migadu.com
X-TUID: xOr4ZOQp1bkJ

Hi Tomas,

A little background on what I'm trying to accomplish: I have been
trying to create a package for github.com/kopia/kopia@latest. Kopia is
a multi-cloud encrypted backup thing and with that it has a sprawling
list of dependencies to handle different backends. I've been using 'go
import guix' with the -r option to attempt to recursively collect all
the dependencies. That's where I found the exception with
azure-sdk-for-go.

The approach I came up with is to retrieve the version tag from the
proxy, falling back on the prior method of generating the version tag
if it is not provided. This got me past the azure-sdk-for-go issue,
but now I'm encountering modules where the version ref is not
predictable or listed in the proxy.

I haven't encountered the problem of overlapping paths - yet!

As for my goal of building a package for kopia, I will probably hand
assemble the dependencies.

-Ryan


-Ryan

On Fri, Mar 8, 2024 at 7:25=E2=80=AFAM Tomas Volf <~@wolfsden.cz> wrote:
>
> On 2024-03-07 10:18:52 -0800, Ryan Barber wrote:
> > In some cases the "guix import go" command fails when attempting to
> > checkout the source for a module using a tag which does not exist in
> > the repo.
> >
> > Upon further investigation, I have found guix/import/go.scm will use
> > the version string as tag. While this works most of the time, some
> > module vendors use a different tagging scheme. For example, the
> > azure-sdk-for-go repository contains many modules and the version tags
> > are namespaced by module name.
> >
> > The tag for version v1.3.0 of azure-sdk-for-go/sdk/storage/azblob is
> > storage/azblob/v1.3.0.
> >
> > $ curl -s 'https://proxy.golang.org/github.com/!azure/azure-sdk-for-go/=
sdk/storage/azblob/@v/v1.3.0.info'
> > | jq
> > {
> >   "Version": "v1.3.0",
> >   "Time": "2024-02-12T16:20:44Z",
> >   "Origin": {
> >     "VCS": "git",
> >     "URL": "https://github.com/Azure/azure-sdk-for-go",
> >     "Subdir": "sdk/storage/azblob",
> >     "Ref": "refs/tags/sdk/storage/azblob/v1.3.0",
> >     "Hash": "d5dfa9296a115cc5094b14198b7114a64a490994"
> >   }
> > }
> >
> > I have a patch to fix this, but I would like to discuss the approach
> > before submitting it. Should I reply to this bug report with the
> > patch?
>
> I wonder, even if you manage to import it, will go-build-system be able t=
o build
> it?  That was what stopped me last time I looked into this, I reached the
> conclusion that current go-build-system cannot handle multiple go modules=
 with
> overlapping paths.
>
> Out of curiosity, what was your approach to this issue?
>
> >
> > Here is the backtrace when attempting to run import on storage/azblob
> >
> > $ guix import go github.com/Azure/azure-sdk-for-go/sdk/storage/azblob
> > Backtrace:
> >           14 (primitive-load "/home/rfb/.config/guix/current/bin/guix")
> > In guix/ui.scm:
> >    2324:7 13 (run-guix . _)
> >   2287:10 12 (run-guix-command _ . _)
> > In guix/scripts/import.scm:
> >      80:6 11 (guix-import . _)
> > In ice-9/boot-9.scm:
> >   1752:10 10 (with-exception-handler _ _ #:unwind? _ # _)
> > 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? _ # _)
> > In guix/import/go.scm:
> >    532:19  6 (go-module->guix-package "github.com/Azure/azure-sdk-f=E2=
=80=A6" =E2=80=A6)
> > In guix/git.scm:
> >     295:4  5 (update-cached-checkout _ #:ref _ #:recursive? _ # _ # _ =
=E2=80=A6)
> >    281: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/v1.3.1' not found
> >
>
> Have a nice day,
> Tomas Volf
>
> --
> There are only two hard things in Computer Science:
> cache invalidation, naming things and off-by-one errors.