GNU bug report logs - #69617
guix go import fails on some version tags

Previous Next

Package: guix;

Reported by: Ryan Barber <rfb <at> skyscraper.nu>

Date: Thu, 7 Mar 2024 18:27:01 UTC

Severity: normal

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ryan Barber <rfb <at> skyscraper.nu>
Subject: bug#69617: closed (guix go import fails on some version tags)
Date: Tue, 04 Feb 2025 08:28:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#69617: guix go import fails on some version tags

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 69617 <at> debbugs.gnu.org.

-- 
69617: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69617
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 69617-done <at> debbugs.gnu.org
Subject: guix go import fails on some version tags
Date: Tue, 04 Feb 2025 08:26:49 +0000
[Message part 3 (text/plain, inline)]
Hi,

There are adjustmets in go-importer which fixed this issue.

To note.
This is not expected mudle name - azure-sdk-for-go/sdk/storage/azblob

This IS expected module name, as seen in go.mod github.com/Azure/azure-sdk-for-go/sdk/storage/azblob
<https://raw.githubusercontent.com/Azure/azure-sdk-for-go/refs/tags/sdk/storage/azblob/v1.6.0/sdk/storage/azblob/go.mod>

Importer produces a valid package template with correct tag extracted by
Golang rules for monorepos:
--8<---------------cut here---------------start------------->8---
guix time-machine --commit=2574ae3733637ead786fb3dc454369590794bc51 -- import go github.com/Azure/azure-sdk-for-go/sdk/storage/azblob
guix import: Importing package "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"...
(define-public go-github-com-azure-azure-sdk-for-go-sdk-storage-azblob
  (package
    (name "go-github-com-azure-azure-sdk-for-go-sdk-storage-azblob")
    (version "1.6.0")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/Azure/azure-sdk-for-go")
             (commit (go-version->git-ref version
                                          #:subdir "sdk/storage/azblob"))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "00l5xj1cgnkljxxynasfji51bvwfbbnvxzlz2ky6kjc5fgw44c78"))))
    (build-system go-build-system)
    (arguments
     (list
      #:import-path "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
      #:unpack-path "github.com/Azure/azure-sdk-for-go"))
    (propagated-inputs (list go-github-com-stretchr-testify
                        go-github-com-azure-azure-sdk-for-go-sdk-resourcemanager-storage-armstorage
                        go-github-com-azure-azure-sdk-for-go-sdk-internal
                        go-github-com-azure-azure-sdk-for-go-sdk-azidentity
                        go-github-com-azure-azure-sdk-for-go-sdk-azcore))
    (home-page "https://github.com/Azure/azure-sdk-for-go")
    (synopsis "Azure Blob Storage module for Go")
    (description
     "Azure Blob Storage is Microsoft's object storage solution for the cloud.  Blob
Storage is optimized for storing massive amounts of unstructured data - data
that does not adhere to a particular data model or definition, such as text or
binary data.  For more information, see
@@url{https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction,Introduction
to Azure Blob Storage}.")
    (license license:expat)))
--8<---------------cut here---------------end--------------->8---

Closing as resolved.

--
Oleg
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Ryan Barber <rfb <at> skyscraper.nu>
To: bug-guix <at> gnu.org
Subject: guix go import fails on some version tags
Date: Thu, 7 Mar 2024 10:18:52 -0800
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?

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…" …)
In guix/git.scm:
    295:4  5 (update-cached-checkout _ #:ref _ #:recursive? _ # _ # _ …)
   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



This bug report was last modified 164 days ago.

Previous Next


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