GNU bug report logs - #52362
guix import go error

Previous Next

Package: guix;

Reported by: Stephen Paul Weber <singpolyma <at> singpolyma.net>

Date: Tue, 7 Dec 2021 22:09:02 UTC

Severity: normal

To reply to this bug, email your comments to 52362 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Tue, 07 Dec 2021 22:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Paul Weber <singpolyma <at> singpolyma.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 07 Dec 2021 22:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: bug-guix <at> gnu.org
Subject: guix import go error
Date: Tue, 7 Dec 2021 17:08:19 -0500
[Message part 1 (text/plain, inline)]
$ guix import go github.com/Azure/go-autorest/autorest

guix import: warning: Failed to import package "github.com/Azure/go-autorest/autorest".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v0.11.22' not found" class: 4>).
guix import: error: failed to download meta-data for module 'github.com/Azure/go-autorest/autorest'.

Similarly:

$ guix import go github.com/Azure/go-autorest/autorest/adal

guix import: warning: Failed to import package "github.com/Azure/go-autorest/autorest/adal".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v0.9.17' not found" class: 4>).
guix import: error: failed to download meta-data for module 'github.com/Azure/go-autorest/autorest/adal'.

And, from a different package but seems also similar:

$ guix import go cloud.google.com/go/storage

guix import: warning: Failed to import package "cloud.google.com/go/storage".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v1.18.2' not found" class: 4>).
guix import: error: failed to download meta-data for module 'cloud.google.com/go/storage'.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Wed, 12 Jan 2022 03:59:02 GMT) Full text and rfc822 format available.

Message #8 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: 52362 <at> debbugs.gnu.org
Subject: Re: guix import go error
Date: Tue, 11 Jan 2022 22:58:49 -0500
[Message part 1 (text/plain, inline)]
Ran into another like this today:

    guix import go github.com/aws/aws-sdk-go-v2/service/s3

Gives:

Backtrace:
          14 (primitive-load "/gnu/store/6rjb4c80l53n98cl6h0s3q1zmkg…")
In guix/ui.scm:
   2209:7 13 (run-guix . _)
  2172:10 12 (run-guix-command _ . _)
In guix/scripts/import.scm:
   124:11 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:
   519:18  6 (go-module->guix-package "github.com/aws/aws-sdk-go-v2…" …)
In guix/git.scm:
    277:4  5 (update-cached-checkout _ #:ref _ #:recursive? _ # _ # _ …)
   266:18  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.23.0' not found
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Wed, 12 Jan 2022 04:29:01 GMT) Full text and rfc822 format available.

Message #11 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: 52362 <at> debbugs.gnu.org
Subject: Re: guix import go error
Date: Tue, 11 Jan 2022 23:28:12 -0500
[Message part 1 (text/plain, inline)]
Alright, I think I have found the issue.  https://go.dev/ref/mod says:

> If a module is defined in a subdirectory within the repository, that is,
> the module subdirectory portion of the module path is not empty, then each
> tag name must be prefixed with the module subdirectory, followed by a slash.
> For example, the module golang.org/x/tools/gopls is defined in the gopls
> subdirectory of the repository with root path golang.org/x/tools. The version
> v0.4.0 of that module must have the tag named gopls/v0.4.0 in that repository.

Right now the importer code assumes that either we have a pseudo version (and
thus can extract a raw commit hash) or else that the tag will be exactly
(string-append "v" version) but this does not take into account the rule about
subdirectory packages.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Sat, 15 Jan 2022 01:44:02 GMT) Full text and rfc822 format available.

Message #14 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: 52362 <at> debbugs.gnu.org
Cc: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Subject: [PATCH] guix: import: go: Use correct tag for go module in
 subdirectory.
Date: Fri, 14 Jan 2022 20:43:33 -0500
https://go.dev/ref/mod says a module in a subdirectory has a tag prefixed with
the subdirectory.

* guix/import/go.scm (version+subdirectory->tag-name): New variable.
(vcs->origin): New argument module-path-subdirectory.
---
 guix/import/go.scm | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index d00c13475a..6fae1994b8 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -521,28 +521,30 @@ tag."
                                           `(tag-or-commit . ,reference)))))
     (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
 
-(define (vcs->origin vcs-type vcs-repo-url version)
+(define (version+subdirectory->tag-name version subdirectory)
+  (if (string=? subdirectory "")
+      version
+      (string-append (substring subdirectory 1) "/" 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 ((git-commit (if (string=? version (go-version->git-ref version))
+                           (version+subdirectory->tag-name
+                              version module-path-subdirectory)
+                           (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)
-                             '(go-version->git-ref version)))))
+                (commit ,git-commit)))
           (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,6 +623,8 @@ When VERSION is unspecified, the latest version available is used."
           (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))
+         (module-path-subdirectory
+           (substring module-path (string-length root-module-path)))
          ;; 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))
@@ -634,7 +638,7 @@ When VERSION is unspecified, the latest version available is used."
         (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.30.2




Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Sat, 15 Jan 2022 01:57:02 GMT) Full text and rfc822 format available.

Message #17 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: 52362 <at> debbugs.gnu.org
Subject: Re: [PATCH] guix: import: go: Use correct tag for go module in
 subdirectory.
Date: Fri, 14 Jan 2022 20:56:06 -0500
[Message part 1 (text/plain, inline)]
Somebody claiming to be Stephen Paul Weber wrote:
>https://go.dev/ref/mod says a module in a subdirectory has a tag prefixed with
>the subdirectory.

Dang.  This patch as written causes import of guix import go
github.com/jackc/pgx/v4 to fail. The /v4 suffix in this case appears to refer to
a branch and not a subdirectory, but the syntax is identical?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Sun, 16 Jan 2022 02:57:01 GMT) Full text and rfc822 format available.

Message #20 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: 52362 <at> debbugs.gnu.org
Cc: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Subject: [PATCH v2] guix: import: go: Use correct tag for go module in
 subdirectory.
Date: Sat, 15 Jan 2022 21:56:34 -0500
https://go.dev/ref/mod says a module in a subdirectory has a tag prefixed with
the subdirectory.

* guix/import/go.scm (version+subdirectory->tag-prefix): New variable.
(vcs->origin): New argument module-path-subdirectory.
---
 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 d00c13475a..b6f8686c0d 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -521,28 +521,37 @@ tag."
                                           `(tag-or-commit . ,reference)))))
     (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
 
-(define (vcs->origin vcs-type vcs-repo-url version)
+(define (version+subdirectory->tag-prefix subdirectory)
+  (if (string=? subdirectory "")
+      ""
+      (string-append (substring subdirectory 1) "/")))
+
+(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))
+            (tag-prefix     (version+subdirectory->tag-prefix
+                             module-path-subdirectory))
+            (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)
+                             (if (string=? module-path-subdirectory "")
+                                 '(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
@@ -618,9 +627,13 @@ When VERSION is unspecified, the latest version available is used."
                            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))
+         (module-path-subdirectory
+           (substring module-path-sans-suffix (string-length root-module-path)))
          ;; 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))
@@ -634,7 +647,7 @@ When VERSION is unspecified, the latest version available is used."
         (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.30.2




Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Sun, 16 Jan 2022 03:33:02 GMT) Full text and rfc822 format available.

Message #23 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: 52362 <at> debbugs.gnu.org
Cc: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Subject: [PATCH v3] guix: import: go: Use correct tag for go module in
 subdirectory.
Date: Sat, 15 Jan 2022 22:32:08 -0500
https://go.dev/ref/mod says a module in a subdirectory has a tag prefixed with
the subdirectory.

* guix/import/go.scm (version+subdirectory->tag-prefix): New variable.
(vcs->origin): New argument module-path-subdirectory.
---
 guix/import/go.scm | 36 +++++++++++++++++++++++++-----------
 1 file changed, 25 insertions(+), 11 deletions(-)

diff --git a/guix/import/go.scm b/guix/import/go.scm
index d00c13475a..f2ea9dbbae 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -521,28 +521,37 @@ tag."
                                           `(tag-or-commit . ,reference)))))
     (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
 
-(define (vcs->origin vcs-type vcs-repo-url version)
+(define (version+subdirectory->tag-prefix subdirectory)
+  (if (string=? subdirectory "")
+      ""
+      (string-append (substring subdirectory 1) "/")))
+
+(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))
+            (tag-prefix     (version+subdirectory->tag-prefix
+                             module-path-subdirectory))
+            (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)
+                             (if (string=? module-path-subdirectory "")
+                                 '(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
@@ -618,12 +627,17 @@ When VERSION is unspecified, the latest version available is used."
                            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))
@@ -634,7 +648,7 @@ When VERSION is unspecified, the latest version available is used."
         (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.30.2




Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Mon, 28 Feb 2022 23:56:01 GMT) Full text and rfc822 format available.

Message #26 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: 52362 <at> debbugs.gnu.org
Subject: Re: [PATCH v3] guix: import: go: Use correct tag for go module in
 subdirectory.
Date: Tue, 01 Mar 2022 00:55:22 +0100
Hello,

I tested v3 of this change, which looks great.

Unfortunately, when running

  ./pre-inst-env guix import go --recursive rclone

I get the following backtrace:

--8<---------------cut here---------------start------------->8---
following redirection to `https://github.com/qingstor/qingstor-sdk-go?go-get=1'...
Backtrace:
In ice-9/boot-9.scm:
  1752:10 19 (with-exception-handler _ _ #:unwind? _ # _)
In guix/scripts/import/go.scm:
   114:22 18 (_)
In guix/import/utils.scm:
   509:23 17 (recursive-import _ #:repo->guix-package _ #:guix-name _ …)
In srfi/srfi-1.scm:
   586:29 16 (map1 _)
   586:29 15 (map1 _)
   586:29 14 (map1 _)
   586:29 13 (map1 _)
   586:29 12 (map1 _)
   586:29 11 (map1 _)
   586:17 10 (map1 (("github.com/yunify/qingstor-sdk-go/v3" #f) (…) …))
In guix/import/utils.scm:
   497:33  9 (lookup-node "github.com/yunify/qingstor-sdk-go/v3" #f)
In guix/memoization.scm:
     98:0  8 (mproc "github.com/yunify/qingstor-sdk-go/v3" #:version …)
In unknown file:
           7 (_ #<procedure 7f09be40e0c0 at guix/memoization.scm:17…> …)
           6 (_ #<procedure 7f09be40e080 at ice-9/eval.scm:330:13 ()> …)
In ice-9/boot-9.scm:
    724:2  5 (call-with-prompt _ _ #<procedure 7f09be413e20 at ice-9…>)
  1752:10  4 (with-exception-handler _ _ #:unwind? _ # _)
In ice-9/eval.scm:
   293:34  3 (_ #(#(#(#(#(#(#(#(#(#(#(#) …) …) …) …) …) …) …) …) …) …))
In unknown file:
           2 (substring "github.com/yunify/qingstor-sdk-go" 35 #<und…>)
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:
Value out of range 0 to< 33: 35
--8<---------------cut here---------------end--------------->8---

Do you know why it is failing like this?

Regards,
-- 
Nicolas Goaziou




Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Wed, 13 Apr 2022 14:28:02 GMT) Full text and rfc822 format available.

Message #29 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Attila Lendvai <attila <at> lendvai.name>
To: "52362 <at> debbugs.gnu.org" <52362 <at> debbugs.gnu.org>
Subject: another patchset
Date: Wed, 13 Apr 2022 14:26:51 +0000
FYI,

i have extensive fixes to the go importer that i'm preparing for submission:

https://github.com/attila-lendvai-patches/guix/tree/import

it fixes this issue, and it can also recursively import rclone (and go-ethereum for that matter):

./pre-inst-env guix import go --recursive github.com/rclone/rclone

emits 100+ packages.

unfortunately, it fails on/skips:

guix import go github.com/billziss-gh/cgofuse

i suspect that it's probably because that module is not adhering to the git tag name rules.

-- 
- attila
PGP: 5D5F 45C7 DFCD 0A39




Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Thu, 25 May 2023 18:34:02 GMT) Full text and rfc822 format available.

Message #32 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 52362 <at> debbugs.gnu.org
Subject: Re: bug#52362: guix import go error
Date: Thu, 25 May 2023 16:21:17 +0200
Hi,


On mar., 01 mars 2022 at 00:55, Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote:

>   ./pre-inst-env guix import go --recursive rclone

Using Guix 14c0380, I get:

--8<---------------cut here---------------start------------->8---
$ guix import go --recursive rclone
guix import: warning: Failed to import package "rclone".
reason: "https://proxy.golang.org/rclone/@v/list" could not be fetched: HTTP error 404 ("Not Found").
This package and its dependencies won't be imported.
--8<---------------cut here---------------end--------------->8---

Moreover, instead of the patch in this thread, I am proposing #63647 [1]
which warns by handling the error, for instance, it displays using
another example from the thread,

--8<---------------cut here---------------start------------->8---
guix import: warning: Git error: reference 'refs/tags/v0.11.29' not found in https://github.com/Azure/go-autorest
(define-public go-github-com-azure-go-autorest-autorest
  (package
    (name "go-github-com-azure-go-autorest-autorest")
    (version "0.11.29")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/Azure/go-autorest")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0000000000000000000000000000000000000000000000000000"))))
    (build-system go-build-system)
    (arguments
     '(#:import-path "github.com/Azure/go-autorest/autorest"
       #:unpack-path "github.com/Azure/go-autorest"))
    (propagated-inputs `(("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
                         ("go-github-com-golang-jwt-jwt-v4" ,go-github-com-golang-jwt-jwt-v4)
                         ("go-github-com-azure-go-autorest-tracing" ,go-github-com-azure-go-autorest-tracing)
                         ("go-github-com-azure-go-autorest-logger" ,go-github-com-azure-go-autorest-logger)
                         ("go-github-com-azure-go-autorest-autorest-mocks" ,go-github-com-azure-go-autorest-autorest-mocks)
                         ("go-github-com-azure-go-autorest-autorest-adal" ,go-github-com-azure-go-autorest-autorest-adal)
                         ("go-github-com-azure-go-autorest" ,go-github-com-azure-go-autorest)))
    (home-page "https://github.com/Azure/go-autorest")
    (synopsis #f)
    (description
     "Package autorest implements an HTTP request pipeline suitable for use across
multiple go-routines and provides the shared routines relied on by AutoRest (see
@@url{https://github.com/Azure/autorest/,https://github.com/Azure/autorest/})
generated Go code.")
    (license license:asl2.0)))
--8<---------------cut here---------------end--------------->8---

Aside, indeed the proposed patch in this thread could also be merged.

1: https://issues.guix.gnu.org/issue/63647


Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Thu, 25 May 2023 18:34:03 GMT) Full text and rfc822 format available.

Message #35 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Cc: 52362 <at> debbugs.gnu.org
Subject: Re: bug#52362: guix import go error
Date: Thu, 25 May 2023 18:13:19 +0200
Hi,

Sorry for the delay.  Thanks for this contribution.  I included this
patch in the series #63647 [1].  Therefore, I guess this bug report can
be close.  WDYT?

1: https://issues.guix.gnu.org/issue/63647#6


Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Thu, 25 May 2023 18:59:02 GMT) Full text and rfc822 format available.

Message #38 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Simon Tournier <zimon.toutoune <at> gmail.com>
Cc: 52362 <at> debbugs.gnu.org
Subject: Re: bug#52362: guix import go error
Date: Thu, 25 May 2023 20:58:31 +0200
Hello,

Simon Tournier <zimon.toutoune <at> gmail.com> writes:

> On mar., 01 mars 2022 at 00:55, Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote:
>
>>   ./pre-inst-env guix import go --recursive rclone
>
> Using Guix 14c0380, I get:
>
> --8<---------------cut here---------------start------------->8---
> $ guix import go --recursive rclone
> guix import: warning: Failed to import package "rclone".
> reason: "https://proxy.golang.org/rclone/@v/list" could not be fetched: HTTP error 404 ("Not Found").
> This package and its dependencies won't be imported.
> --8<---------------cut here---------------end--------------->8---

Oops! For the record, I meant:

   guix import go --recursive github.com/rclone/rclone

Regards,
-- 
Nicolas Goaziou




Information forwarded to bug-guix <at> gnu.org:
bug#52362; Package guix. (Fri, 26 May 2023 11:26:02 GMT) Full text and rfc822 format available.

Message #41 received at 52362 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 52362 <at> debbugs.gnu.org
Subject: Re: bug#52362: guix import go error
Date: Thu, 25 May 2023 21:08:55 +0200
Hi,

On jeu., 25 mai 2023 at 20:58, Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote:

> Oops! For the record, I meant:
>
>    guix import go --recursive github.com/rclone/rclone

I get:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix import go --recursive github.com/rclone/rclone
following redirection to `https://github.com/storj/eventkit?go-get=1'...
following redirection to `https://goftp.io/server/?go-get=1'...
following redirection to `https://github.com/qingstor/qingstor-sdk-go?go-get=1'...
Backtrace:
In srfi/srfi-1.scm:
   586:29 19 (map1 _)
   586:29 18 (map1 _)
   586:29 17 (map1 _)
   586:29 16 (map1 _)
   586:29 15 (map1 _)
   586:29 14 (map1 _)
   586:29 13 (map1 _)
   586:29 12 (map1 _)
   586:29 11 (map1 _)
   586:17 10 (map1 (("github.com/yunify/qingstor-sdk-go/v3" #f) ("github.com/youmark/pkcs8" #f) ("github.com/winfsp/cgofuse" #f) ("github.com/t3rm1…" …) …))
In guix/import/utils.scm:
   630:33  9 (lookup-node "github.com/yunify/qingstor-sdk-go/v3" #f)
In guix/memoization.scm:
     98:0  8 (mproc "github.com/yunify/qingstor-sdk-go/v3" #:repo->guix-package #<procedure mproc args> #:guix-name #<procedure go-module->guix-package-…> …)
In unknown file:
           7 (_ #<procedure 7f95e4ebcfc0 at guix/memoization.scm:179:32 ()> #<procedure list _> (this is nothing))
In guix/import/go.scm:
   708:10  6 (_ _ #:version _ #:repo _)
In ice-9/exceptions.scm:
   406:15  5 (go-module->guix-package* . _)
In ice-9/boot-9.scm:
  1752:10  4 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/import/go.scm:
   641:11  3 (go-module->guix-package "github.com/yunify/qingstor-sdk-go/v3" #:goproxy _ #:version _ #:pin-versions? _)
In unknown file:
           2 (substring "github.com/yunify/qingstor-sdk-go" 35 #<undefined>)
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:
Value out of range 0 to< 33: 35
--8<---------------cut here---------------end--------------->8---

which is a bug but another one. :-)

Well, we can keep this bug open in order to address this other bug or
close it – since the issue with labels is done by Stephen’s patch – and
then open another one for tackle the issue above.

For instance, it reads,

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix import go github.com/yunify/qingstor-sdk-go
Backtrace:
In ice-9/boot-9.scm:
  1752:10 14 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
          13 (apply-smob/0 #<thunk 7fa1f7e7d2a0>)
In ice-9/boot-9.scm:
    724:2 12 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8 11 (_ #(#(#<directory (guile-user) 7fa1f7e82c80>)))
In guix/ui.scm:
   2300:7 10 (run-guix . _)
  2263:10  9 (run-guix-command _ . _)
In guix/scripts/import.scm:
    89:11  8 (guix-import . _)
In ice-9/boot-9.scm:
  1752:10  7 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/scripts/import/go.scm:
   116:29  6 (_)
In ice-9/exceptions.scm:
   406:15  5 (go-module->guix-package* . _)
In ice-9/boot-9.scm:
  1752:10  4 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/import/go.scm:
   598:11  3 (go-module->guix-package "github.com/yunify/qingstor-sdk-go" #:goproxy _ #:version _ #:pin-versions? _)
In unknown file:
           2 (regexp-exec #<regexp 7fa1ec976580> #f #<undefined> #<undefined>)
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:
In procedure regexp-exec: Wrong type argument in position 2 (expecting string): #f
--8<---------------cut here---------------end--------------->8---


Cheers,
simon




This bug report was last modified 2 years and 21 days ago.

Previous Next


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