unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49202: guix import go type error (failed regex match?)
@ 2021-06-23 23:32 raingloom
  2021-06-24 14:02 ` zimoun
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: raingloom @ 2021-06-23 23:32 UTC (permalink / raw)
  To: 49202

When I run
guix import go -r github.com/golang-migrate/migrate/v4
it works for a looong time (something else to work on I guess. maybe
fetching every git repo is not the best solution.) and then gives this
error:

In procedure vector-ref: Wrong type argument in position 1 (expecting
vector): #f


Trace:

```
following redirection to `https://go.mongodb.org/mongo-driver/'...
following redirection to `https://github.com/moby/moby?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 (("github.com/cznic/mathutil" #f) ("github.…" …) …))
   586:17 13 (map1 (("github.com/containerd/containerd" #f) ("…" …) …))
In guix/import/utils.scm:
   466:33 12 (lookup-node "github.com/containerd/containerd" #f)
In guix/import/go.scm:
    646:5 11 (_ _ #:version _ #:repo _)
In ice-9/boot-9.scm:
  1752:10 10 (with-exception-handler _ _ #:unwind? _ # _)
In guix/import/go.scm:
   656:11  9 (_)
In guix/memoization.scm:
     98:0  8 (mproc "github.com/containerd/containerd" #:goproxy "h…" …)
In unknown file:
           7 (_ #<procedure 7fc8fd914c60 at guix/memoization.scm:17…> …)
In guix/import/go.scm:
   589:32  6 (go-module->guix-package "github.com/containerd/contai…" …)
In ice-9/ports.scm:
    472:4  5 (with-input-from-string _ _)
In guix/import/go.scm:
   359:10  4 (_)
In unknown file:
           3 (_ #<procedure 7fc90098cf30 at guix/import/go.scm:326:…> …)
In guix/import/go.scm:
   334:24  2 (replace-directive (("k8s.io/utils" "v0.0.0-20201…") …) …)
In ice-9/regex.scm:
   118:20  1 (match:substring #f _)
In ice-9/boot-9.scm:
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure vector-ref: Wrong type argument in position 1 (expecting
vector): #f
```




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#49202: guix import go type error (failed regex match?)
  2021-06-23 23:32 bug#49202: guix import go type error (failed regex match?) raingloom
@ 2021-06-24 14:02 ` zimoun
  2021-06-24 15:17   ` Sarah Morgensen via Bug reports for GNU Guix
  2021-06-25 16:40 ` zimoun
  2021-08-19  5:25 ` Sarah Morgensen
  2 siblings, 1 reply; 9+ messages in thread
From: zimoun @ 2021-06-24 14:02 UTC (permalink / raw)
  To: raingloom; +Cc: 49202

Hi,

Thanks for the report.

On Thu, 24 Jun 2021 at 02:11, raingloom <raingloom@riseup.net> wrote:

> When I run
> guix import go -r github.com/golang-migrate/migrate/v4
> it works for a looong time (something else to work on I guess. maybe
> fetching every git repo is not the best solution.) and then gives this
> error:
>
> In procedure vector-ref: Wrong type argument in position 1 (expecting
> vector): #f

I seems to work without the option recursive '-r'.  So, I guess it is
related to the patch [1] and issues with the recursive importers, see
[2].

1: <http://issues.guix.gnu.org/issue/49196>
2: <http://issues.guix.gnu.org/issue/45984>


All the best,
simon




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#49202: guix import go type error (failed regex match?)
  2021-06-24 14:02 ` zimoun
@ 2021-06-24 15:17   ` Sarah Morgensen via Bug reports for GNU Guix
  2021-06-24 21:20     ` Sarah Morgensen via Bug reports for GNU Guix
  2021-08-19  3:20     ` Maxim Cournoyer
  0 siblings, 2 replies; 9+ messages in thread
From: Sarah Morgensen via Bug reports for GNU Guix @ 2021-06-24 15:17 UTC (permalink / raw)
  To: zimoun; +Cc: 49202, raingloom

zimoun <zimon.toutoune@gmail.com> writes:

> Hi,
>
> Thanks for the report.
>
> On Thu, 24 Jun 2021 at 02:11, raingloom <raingloom@riseup.net> wrote:
>
>> When I run
>> guix import go -r github.com/golang-migrate/migrate/v4
>> it works for a looong time (something else to work on I guess. maybe
>> fetching every git repo is not the best solution.) and then gives this
>> error:
>>
>> In procedure vector-ref: Wrong type argument in position 1 (expecting
>> vector): #f
>
> I seems to work without the option recursive '-r'.  So, I guess it is
> related to the patch [1] and issues with the recursive importers, see
> [2].

I do not think it is related to recursive import... I was able to narrow
down the repro to

guix import go github.com/containerd/containerd

with the same trace. The offending go.mod:

--8<---------------cut here---------------start------------->8---
module github.com/containerd/containerd

go 1.16

require (
	github.com/Microsoft/go-winio v0.5.0
	github.com/Microsoft/hcsshim v0.8.17
	github.com/containerd/aufs v1.0.0
	github.com/containerd/btrfs v1.0.0
	github.com/containerd/cgroups v1.0.1
	github.com/containerd/console v1.0.2
	github.com/containerd/continuity v0.1.0
	github.com/containerd/fifo v1.0.0
	github.com/containerd/go-cni v1.0.2
	github.com/containerd/go-runc v1.0.0
	github.com/containerd/imgcrypt v1.1.1
	github.com/containerd/nri v0.1.0
	github.com/containerd/ttrpc v1.0.2
	github.com/containerd/typeurl v1.0.2
	github.com/containerd/zfs v1.0.0
	github.com/containernetworking/plugins v0.9.1
	github.com/coreos/go-systemd/v22 v22.3.2
	github.com/davecgh/go-spew v1.1.1
	github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c
	github.com/docker/go-metrics v0.0.1
	github.com/docker/go-units v0.4.0
	github.com/emicklei/go-restful v2.9.5+incompatible
	github.com/fsnotify/fsnotify v1.4.9
	github.com/gogo/googleapis v1.4.0
	github.com/gogo/protobuf v1.3.2
	github.com/google/go-cmp v0.5.5
	github.com/google/uuid v1.2.0
	github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
	github.com/hashicorp/go-multierror v1.0.0
	github.com/imdario/mergo v0.3.11
	github.com/klauspost/compress v1.11.13
	github.com/moby/locker v1.0.1
	github.com/moby/sys/mountinfo v0.4.1
	github.com/moby/sys/symlink v0.1.0
	github.com/opencontainers/go-digest v1.0.0
	github.com/opencontainers/image-spec v1.0.1
	github.com/opencontainers/runc v1.0.0
	github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417
	github.com/opencontainers/selinux v1.8.2
	github.com/pelletier/go-toml v1.8.1
	github.com/pkg/errors v0.9.1
	github.com/prometheus/client_golang v1.7.1
	github.com/prometheus/procfs v0.6.0 // indirect; temporarily force v0.6.0, which was previously defined in imgcrypt as explicit version
	github.com/satori/go.uuid v1.2.0 // indirect
	github.com/sirupsen/logrus v1.8.1
	github.com/stretchr/testify v1.6.1
	github.com/tchap/go-patricia v2.2.6+incompatible
	github.com/urfave/cli v1.22.2
	go.etcd.io/bbolt v1.3.5
	golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
	golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
	golang.org/x/sys v0.0.0-20210426230700-d19ff857e887
	google.golang.org/grpc v1.38.0
	google.golang.org/protobuf v1.26.0
	gotest.tools/v3 v3.0.3
	k8s.io/api v0.20.6
	k8s.io/apimachinery v0.20.6
	k8s.io/apiserver v0.20.6
	k8s.io/client-go v0.20.6
	k8s.io/component-base v0.20.6
	k8s.io/cri-api v0.20.6
	k8s.io/klog/v2 v2.4.0
	k8s.io/utils v0.0.0-20201110183641-67b214c5f920
)

// When updating replace rules, make sure to also update the rules in integration/client/go.mod
replace (
	// prevent transitional dependencies due to containerd having a circular
	// dependency on itself through plugins. see .empty-mod/go.mod for details
	github.com/containerd/containerd => ./.empty-mod/
	github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2
	// urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092
	github.com/urfave/cli => github.com/urfave/cli v1.22.1
	google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63
)
--8<---------------cut here---------------end--------------->8---

Based on the trace it seems like it's treating the k8s.io/utils require
as a replace directive, but I have no idea why.

>
> 1: <http://issues.guix.gnu.org/issue/49196>
> 2: <http://issues.guix.gnu.org/issue/45984>
>
>
> All the best,
> simon

Sarah




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#49202: guix import go type error (failed regex match?)
  2021-06-24 15:17   ` Sarah Morgensen via Bug reports for GNU Guix
@ 2021-06-24 21:20     ` Sarah Morgensen via Bug reports for GNU Guix
  2021-08-19  3:20     ` Maxim Cournoyer
  1 sibling, 0 replies; 9+ messages in thread
From: Sarah Morgensen via Bug reports for GNU Guix @ 2021-06-24 21:20 UTC (permalink / raw)
  To: zimoun; +Cc: 49202, raingloom

Sarah Morgensen <iskarian@mgsn.dev> writes:

>
> // When updating replace rules, make sure to also update the rules in integration/client/go.mod
> replace (
> 	// prevent transitional dependencies due to containerd having a circular
> 	// dependency on itself through plugins. see .empty-mod/go.mod for details
> 	github.com/containerd/containerd => ./.empty-mod/
> 	github.com/gogo/googleapis => github.com/gogo/googleapis v1.3.2
> 	// urfave/cli must be <= v1.22.1 due to a regression: https://github.com/urfave/cli/issues/1092
> 	github.com/urfave/cli => github.com/urfave/cli v1.22.1
> 	google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63
> )
>
> Based on the trace it seems like it's treating the k8s.io/utils require
> as a replace directive, but I have no idea why.
>

Looking at this again, I realize I misread the code: the "k8s.io/utils"
etc. is actually the head of the already-parsed requirements list.

Instead, when the error is thrown, we are in replace-directive, which is
called by in-replace...

--8<---------------cut here---------------start------------->8---
  (define (in-replace requirements replaced)
    (let ((line (read-line)))
      (cond
       ((eof-object? line)
        ;; this should never happen here but we ignore silently
        (values requirements replaced))
       ((string=? line ")")
        ;; end of block, coming back to toplevel
        (toplevel requirements replaced))
       (#t
        (call-with-values (lambda ()
                            (replace-directive requirements replaced line))
          in-replace)))))
--8<---------------cut here---------------end--------------->8---

...which does not handle comments. (Even the top-level parser doesn't
explicitly handle comments, it just discards any line that does not
start with "require" or "replace.")

Looks like the parser could use a little more robustness! :)

Hope that helps,
Sarah





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#49202: guix import go type error (failed regex match?)
  2021-06-23 23:32 bug#49202: guix import go type error (failed regex match?) raingloom
  2021-06-24 14:02 ` zimoun
@ 2021-06-25 16:40 ` zimoun
  2021-06-28 16:18   ` zimoun
  2021-08-19  5:25 ` Sarah Morgensen
  2 siblings, 1 reply; 9+ messages in thread
From: zimoun @ 2021-06-25 16:40 UTC (permalink / raw)
  To: raingloom; +Cc: 49202, iskarian

Hi,

On jeu., 24 juin 2021 at 01:32, raingloom <raingloom@riseup.net> wrote:
> When I run
> guix import go -r github.com/golang-migrate/migrate/v4
> it works for a looong time (something else to work on I guess. maybe
> fetching every git repo is not the best solution.) and then gives this
> error:
>
> In procedure vector-ref: Wrong type argument in position 1 (expecting
> vector): #f

Using v3 from patch#49196 [1], I get the piece below.  As mentioned by
Sarah, the parser seems poor for some dependencies.

1: <http://issues.guix.gnu.org/issue/49196#6>

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix import go -r github.com/golang-migrate/migrate/v4
following redirection to `https://go.mongodb.org/mongo-driver/'...
following redirection to `https://github.com/moby/moby?go-get=1'...
guix import: warning: Something went wrong with ("github.com/containerd/containerd" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/cockroachdb/cockroach-go" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/bmizerany/assert" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("cloud.google.com/go/storage" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("cloud.google.com/go/spanner" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("go.opentelemetry.io/otel/sdk" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("go.opentelemetry.io/otel/metric" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/go-gl/glfw/v3.3/glfw" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("dmitri.shuralyov.com/gpu/mtl" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/hudl/fargo" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
following redirection to `https://github.com/HdrHistogram/hdrhistogram-go?go-get=1'...
guix import: warning: Failed to import package "github.com/cncf/udpa/go".
reason: "https://pkg.go.dev/github.com/cncf/udpa" could not be fetched: HTTP error 404 ("Not Found").
This package and its dependencies won't be imported.
guix import: warning: Something went wrong with ("go.opentelemetry.io/proto/otlp" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Failed to import package "github.com/cncf/xds/go".
reason: "https://pkg.go.dev/github.com/cncf/xds" could not be fetched: HTTP error 404 ("Not Found").
This package and its dependencies won't be imported.
following redirection to `https://github.com/jtolio/gls?go-get=1'...
guix import: warning: Something went wrong with ("github.com/neelance/sourcemap" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/neelance/astrewrite" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/jcmturner/dnsutils/v2" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/shirou/gopsutil/v3" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
following redirection to `https://github.com/openhistogram/circonusllhist?go-get=1'...
guix import: warning: Something went wrong with ("gonum.org/v1/gonum" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
following redirection to `https://proxy.golang.org/@v/list'...
guix import: warning: Failed to import package "//".
reason: "https://proxy.golang.org/@v/list" could not be fetched: HTTP error 410 ("Gone").
This package and its dependencies won't be imported.
guix import: warning: Something went wrong with ("github.com/chzyer/test" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/chzyer/logex" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("google.golang.org/grpc/cmd/protoc-gen-go-grpc" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/gobuffalo/gogen" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/markbates/safe" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/markbates/oncer" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/markbates/errx" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/gobuffalo/github_flavored_markdown" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/aws/aws-sdk-go-v2/service/s3" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Something went wrong with ("github.com/aws/aws-sdk-go-v2/feature/s3/manager" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
guix import: warning: Failed to import package "github.com/apache/arrow/go/arrow".
reason: "https://pkg.go.dev/github.com/apache/arrow" could not be fetched: HTTP error 404 ("Not Found").
This package and its dependencies won't be imported.
guix import: warning: Something went wrong with ("github.com/Azure/go-autorest/autorest/adal" #:goproxy "https://proxy.golang.org" #:version #f #:pin-versions? #f).
(define-public go-github-com-cloudflare-golz4
  (package
    (name "go-github-com-cloudflare-golz4")
    (version "0.0.0-20150217214814-ef862a3cdc58")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://github.com/cloudflare/golz4")
               (commit (go-version->git-ref version))))
        (file-name (git-file-name name version))
        (sha256
          (base32
            "0ckiwp3aa010sdnki6vd32f0n08768ppnggc8d7syzh3kkn9zvn1"))))
    (build-system go-build-system)
    (arguments
      '(#:import-path "github.com/cloudflare/golz4"))
    (home-page "https://github.com/cloudflare/golz4")
    (synopsis "golz4")
    (description
      "Package lz4 implements compression using lz4.c and lz4hc.c
")
    (license license:bsd-3)))

[...]


(define-public go-github-com-golang-migrate-migrate-v4
  (package
    (name "go-github-com-golang-migrate-migrate-v4")
    (version "4.14.1")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://github.com/golang-migrate/migrate")
               (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
          (base32
            "1mgs3bngghmirmn0pw351m54darv8d5iymlxcjqw3vr0cyn5aqj0"))))
    (build-system go-build-system)
    (arguments
      '(#:import-path
        "github.com/golang-migrate/migrate"))
    (propagated-inputs
      `(("go-modernc-org-zappy" ,go-modernc-org-zappy)
        ("go-modernc-org-strutil"

[...]

        ("go-cloud-google-com-go"
         ,go-cloud-google-com-go)))
    (home-page
      "https://github.com/golang-migrate/migrate")
    (synopsis "migrate")
    (description
      "Package migrate reads migrations from sources and runs them against databases.
Sources are defined by the `source.Driver` and databases by the `database.Driver`
interface.  The driver interfaces are kept \"dumb\", all migration logic is kept
in this package.
")
    (license license:expat)))
--8<---------------cut here---------------end--------------->8---


Hope that helps,
simon




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#49202: guix import go type error (failed regex match?)
  2021-06-25 16:40 ` zimoun
@ 2021-06-28 16:18   ` zimoun
  2021-06-30 21:12     ` raingloom
  0 siblings, 1 reply; 9+ messages in thread
From: zimoun @ 2021-06-28 16:18 UTC (permalink / raw)
  To: raingloom; +Cc: 49202, iskarian

Hi,

On ven., 25 juin 2021 at 18:40, zimoun <zimon.toutoune@gmail.com> wrote:
> On jeu., 24 juin 2021 at 01:32, raingloom <raingloom@riseup.net> wrote:
>> When I run
>> guix import go -r github.com/golang-migrate/migrate/v4
>> it works for a looong time (something else to work on I guess. maybe
>> fetching every git repo is not the best solution.) and then gives this
>> error:
>>
>> In procedure vector-ref: Wrong type argument in position 1 (expecting
>> vector): #f
>
> Using v3 from patch#49196 [1], I get the piece below.  As mentioned by
> Sarah, the parser seems poor for some dependencies.
>
> 1: <http://issues.guix.gnu.org/issue/49196#6>

With v4 from patch#4916 [1], I get this messages and the reports seems
clear enough.  I propose to close this bug and open individual issues to
tackle each; for instance:

 - github.com/containerd/containerd
 - github.com/cockroachdb/cockroach-go
 - dmitri.shuralyov.com/gpu/mtl

WDYT?

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix import go -r github.com/golang-migrate/migrate/v4
following redirection to `https://go.mongodb.org/mongo-driver/'...
following redirection to `https://github.com/moby/moby?go-get=1'...
guix import: warning: Failed to import package "github.com/containerd/containerd".
reason: ("vector-ref" "Wrong type argument in position 1 (expecting vector): ~S" (#f) (#f)).
guix import: warning: Failed to import package "github.com/cockroachdb/cockroach-go".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v2.0.1' not found" class: 4>).
following redirection to `https://pkg.go.dev/github.com/bmizerany/assert'...
guix import: warning: Failed to import package "cloud.google.com/go/storage".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v1.15.0' not found" class: 4>).
guix import: warning: Failed to import package "cloud.google.com/go/spanner".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v1.21.0' not found" class: 4>).
guix import: warning: Failed to import package "go.opentelemetry.io/otel/metric".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v0.21.0' not found" class: 4>).
guix import: warning: Failed to import package "dmitri.shuralyov.com/gpu/mtl".
reason: ("struct-vtable" "Wrong type argument in position 1 (expecting struct): ~S" (#f) (#f)).
following redirection to `https://pkg.go.dev/github.com/hudl/fargo'...
following redirection to `https://github.com/HdrHistogram/hdrhistogram-go?go-get=1'...
guix import: warning: Failed to import package "github.com/cncf/udpa/go".
reason: "https://pkg.go.dev/github.com/cncf/udpa" could not be fetched: HTTP error 404 ("Not Found").
This package and its dependencies won't be imported.
guix import: warning: Failed to import package "github.com/cncf/xds/go".
reason: "https://pkg.go.dev/github.com/cncf/xds" could not be fetched: HTTP error 404 ("Not Found").
This package and its dependencies won't be imported.
following redirection to `https://github.com/jtolio/gls?go-get=1'...
following redirection to `https://github.com/openhistogram/circonusllhist?go-get=1'...
warning: TLS non-fatal error: Ressource temporairement indisponible. Réessayer.
warning: TLS non-fatal error: Ressource temporairement indisponible. Réessayer.
warning: TLS non-fatal error: Ressource temporairement indisponible. Réessayer.
following redirection to `https://www.gonum.org/v1/gonum?go-get=1'...
warning: TLS non-fatal error: Ressource temporairement indisponible. Réessayer.
warning: TLS non-fatal error: Ressource temporairement indisponible. Réessayer.
warning: TLS non-fatal error: Ressource temporairement indisponible. Réessayer.
guix import: warning: Failed to import package "gonum.org/v1/gonum".
reason: "https://www.gonum.org/v1/gonum?go-get=1" could not be fetched: HTTP error 404 ("Not Found").
This package and its dependencies won't be imported.
following redirection to `https://proxy.golang.org/@v/list'...
guix import: warning: Failed to import package "//".
reason: "https://proxy.golang.org/@v/list" could not be fetched: HTTP error 410 ("Gone").
This package and its dependencies won't be imported.
guix import: warning: Failed to import package "cloud.google.com/go/storage".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v1.15.0' not found" class: 4>).
following redirection to `https://pkg.go.dev/github.com/chzyer/logex'...
guix import: warning: Failed to import package "google.golang.org/grpc/cmd/protoc-gen-go-grpc".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v1.1.0' not found" class: 4>).
following redirection to `https://pkg.go.dev/github.com/gobuffalo/github_flavored_markdown'...
guix import: warning: Failed to import package "github.com/aws/aws-sdk-go-v2/service/s3".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v1.11.0' not found" class: 4>).
guix import: warning: Failed to import package "github.com/apache/arrow/go/arrow".
reason: "https://pkg.go.dev/github.com/apache/arrow" could not be fetched: HTTP error 404 ("Not Found").
This package and its dependencies won't be imported.
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.14' not found" class: 4>).
guix import: warning: Failed to import package "cloud.google.com/go/storage".
reason: (#<<git-error> code: -3 message: "reference 'refs/tags/v1.15.0' not found" class: 4>).
guix import: warning: Failed to import package "github.com/containerd/containerd".
reason: ("vector-ref" "Wrong type argument in position 1 (expecting vector): ~S" (#f) (#f)).
(define-public go-github-com-cloudflare-golz4
  (package

[...]
--8<---------------cut here---------------end--------------->8---

WDYT?

All the best,
simon




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#49202: guix import go type error (failed regex match?)
  2021-06-28 16:18   ` zimoun
@ 2021-06-30 21:12     ` raingloom
  0 siblings, 0 replies; 9+ messages in thread
From: raingloom @ 2021-06-30 21:12 UTC (permalink / raw)
  To: zimoun; +Cc: 49202, iskarian

On Mon, 28 Jun 2021 18:18:17 +0200
zimoun <zimon.toutoune@gmail.com> wrote:

> Hi,
> 
> On ven., 25 juin 2021 at 18:40, zimoun <zimon.toutoune@gmail.com>
> wrote:
> > On jeu., 24 juin 2021 at 01:32, raingloom <raingloom@riseup.net>
> > wrote:  
> >> When I run
> >> guix import go -r github.com/golang-migrate/migrate/v4
> >> it works for a looong time (something else to work on I guess.
> >> maybe fetching every git repo is not the best solution.) and then
> >> gives this error:
> >>
> >> In procedure vector-ref: Wrong type argument in position 1
> >> (expecting vector): #f  
> >
> > Using v3 from patch#49196 [1], I get the piece below.  As mentioned
> > by Sarah, the parser seems poor for some dependencies.
> >
> > 1: <http://issues.guix.gnu.org/issue/49196#6>  
> 
> With v4 from patch#4916 [1], I get this messages and the reports seems
> clear enough.  I propose to close this bug and open individual issues
> to tackle each; for instance:
> 
>  - github.com/containerd/containerd
>  - github.com/cockroachdb/cockroach-go
>  - dmitri.shuralyov.com/gpu/mtl
> 
> WDYT?

Fine by me. I turned to a different migrations library in the end, so
this bug isn't very pressing for me, and it's clear that yall know much
more about how the importer works. So however you wanna structure the
bugs, it's fine.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#49202: guix import go type error (failed regex match?)
  2021-06-24 15:17   ` Sarah Morgensen via Bug reports for GNU Guix
  2021-06-24 21:20     ` Sarah Morgensen via Bug reports for GNU Guix
@ 2021-08-19  3:20     ` Maxim Cournoyer
  1 sibling, 0 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2021-08-19  3:20 UTC (permalink / raw)
  To: Sarah Morgensen; +Cc: 49202

Hello,

Sarah Morgensen <iskarian@mgsn.dev> writes:

> zimoun <zimon.toutoune@gmail.com> writes:
>
>> Hi,
>>
>> Thanks for the report.
>>
>> On Thu, 24 Jun 2021 at 02:11, raingloom <raingloom@riseup.net> wrote:
>>
>>> When I run
>>> guix import go -r github.com/golang-migrate/migrate/v4
>>> it works for a looong time (something else to work on I guess. maybe
>>> fetching every git repo is not the best solution.) and then gives this
>>> error:
>>>
>>> In procedure vector-ref: Wrong type argument in position 1 (expecting
>>> vector): #f
>>
>> I seems to work without the option recursive '-r'.  So, I guess it is
>> related to the patch [1] and issues with the recursive importers, see
>> [2].
>
> I do not think it is related to recursive import... I was able to narrow
> down the repro to
>
> guix import go github.com/containerd/containerd
>
> with the same trace. The offending go.mod:
>
> module github.com/containerd/containerd

Since Sarah's improved go.mod parser has been merged, the above Go
module can now be imported.

So we're down to:

--8<---------------cut here---------------start------------->8---
$ guix import go github.com/cockroachdb/cockroach-go
Backtrace:
           9 (primitive-load "/home/maxim/.config/guix/current/bin/guix")
In guix/ui.scm:
   2185:7  8 (run-guix . _)
  2148:10  7 (run-guix-command _ . _)
In guix/scripts/import.scm:
   120:11  6 (guix-import . _)
In guix/scripts/import/go.scm:
   115:27  5 (guix-import-go . _)
In guix/import/go.scm:
   531:18  4 (go-module->guix-package _ #:goproxy _ #:version _ #:pin-versions? _)
In guix/git.scm:
    247:4  3 (update-cached-checkout _ #:ref _ #:recursive? _ #:check-out? _ #:starting-commit _ # _ # _)
   236:18  2 (resolve _)
In git/reference.scm:
     60:8  1 (_ _ _)
In git/bindings.scm:
     77:2  0 (raise-git-error _)
--8<---------------cut here---------------end--------------->8---


--8<---------------cut here---------------start------------->8---
$ guix import go dmitri.shuralyov.com/gpu/mtl
Backtrace:
           5 (primitive-load "/home/maxim/.config/guix/current/bin/guix")
In guix/ui.scm:
   2185:7  4 (run-guix . _)
  2148:10  3 (run-guix-command _ . _)
In guix/scripts/import.scm:
   120:11  2 (guix-import . _)
In guix/scripts/import/go.scm:
   115:27  1 (guix-import-go . _)
In guix/import/go.scm:
   615:19  0 (go-module->guix-package "dmitri.shuralyov.com/gpu/mtl" #:goproxy _ #:version _ # _)

guix/import/go.scm:615:19: In procedure go-module->guix-package:
In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f
--8<---------------cut here---------------end--------------->8---

Thanks,

Maxim




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#49202: guix import go type error (failed regex match?)
  2021-06-23 23:32 bug#49202: guix import go type error (failed regex match?) raingloom
  2021-06-24 14:02 ` zimoun
  2021-06-25 16:40 ` zimoun
@ 2021-08-19  5:25 ` Sarah Morgensen
  2 siblings, 0 replies; 9+ messages in thread
From: Sarah Morgensen @ 2021-08-19  5:25 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 49202

Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> So we're down to:
>
> $ guix import go github.com/cockroachdb/cockroach-go
> Backtrace:
>            9 (primitive-load "/home/maxim/.config/guix/current/bin/guix")
> In guix/ui.scm:
>    2185:7  8 (run-guix . _)
>   2148:10  7 (run-guix-command _ . _)
> In guix/scripts/import.scm:
>    120:11  6 (guix-import . _)
> In guix/scripts/import/go.scm:
>    115:27  5 (guix-import-go . _)
> In guix/import/go.scm:
>    531:18  4 (go-module->guix-package _ #:goproxy _ #:version _ #:pin-versions? _)
> In guix/git.scm:
>     247:4  3 (update-cached-checkout _ #:ref _ #:recursive? _ #:check-out? _ #:starting-commit _ # _ # _)
>    236:18  2 (resolve _)
> In git/reference.scm:
>      60:8  1 (_ _ _)
> In git/bindings.scm:
>      77:2  0 (raise-git-error _)

This one is happening because the go.mod served by pkg.go.dev reports
that the module version is "2.0.1+incompatible".  This is because the
proper import path is "github.com/cockroachdb/cockroach-go/v2" as the
first line of the project's go.mod states.  An import for that path is
successful.

>
> $ guix import go dmitri.shuralyov.com/gpu/mtl
> Backtrace:
>            5 (primitive-load "/home/maxim/.config/guix/current/bin/guix")
> In guix/ui.scm:
>    2185:7  4 (run-guix . _)
>   2148:10  3 (run-guix-command _ . _)
> In guix/scripts/import.scm:
>    120:11  2 (guix-import . _)
> In guix/scripts/import/go.scm:
>    115:27  1 (guix-import-go . _)
> In guix/import/go.scm:
>    615:19  0 (go-module->guix-package "dmitri.shuralyov.com/gpu/mtl" #:goproxy _ #:version _ # _)
>
> guix/import/go.scm:615:19: In procedure go-module->guix-package:
> In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f

This one is happening because the url

   "dmitri.shuralyov.com/gpu/mtl?go-get=1"

which is used to determine the VCS type and location, does not actually
have the headers it is supposed to (instead, they are written in text on
the body of the page...)  It should be addressed upstream, but we should
also have a better error than a backtrace.

>
> Thanks,
>
> Maxim




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-19  5:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 23:32 bug#49202: guix import go type error (failed regex match?) raingloom
2021-06-24 14:02 ` zimoun
2021-06-24 15:17   ` Sarah Morgensen via Bug reports for GNU Guix
2021-06-24 21:20     ` Sarah Morgensen via Bug reports for GNU Guix
2021-08-19  3:20     ` Maxim Cournoyer
2021-06-25 16:40 ` zimoun
2021-06-28 16:18   ` zimoun
2021-06-30 21:12     ` raingloom
2021-08-19  5:25 ` Sarah Morgensen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).