bug#52362: guix import go error
Hi, On jeu., 25 mai 2023 at 20:58, Nicolas Goaziou 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 # #:guix-name #guix-package-…> …) In unknown file: 7 (_ # # (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 #) 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 #) In ice-9/boot-9.scm: 724:2 12 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 11 (_ #(#(#))) 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 # #f # #) 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
bug#52362: guix import go error
Hello, Simon Tournier writes: > On mar., 01 mars 2022 at 00:55, Nicolas Goaziou > 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
bug#52362: guix import go error
Hi, On mar., 01 mars 2022 at 00:55, Nicolas Goaziou 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 "" (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
bug#52362: guix import go error
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
bug#52362: guix import go error
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 Description: PGP signature
bug#52362: guix import go error
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 Description: PGP signature
bug#52362: guix import go error
$ guix import go github.com/Azure/go-autorest/autorest guix import: warning: Failed to import package "github.com/Azure/go-autorest/autorest". reason: (#< 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: (#< 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: (#< 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 Description: PGP signature