Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go get not getting latest version - v2.9.0 #77

Closed
rof20004 opened this issue Oct 13, 2019 · 12 comments · Fixed by #112
Closed

go get not getting latest version - v2.9.0 #77

rof20004 opened this issue Oct 13, 2019 · 12 comments · Fixed by #112

Comments

@rof20004
Copy link

I am trying to get faunadb-go with go get ./... but it always get this:

github.com/fauna/faunadb-go v2.0.0+incompatible // indirect
gopkg.in/fauna/faunadb-go.v2 v2.0.0
@leonidboykov
Copy link

@rof20004 you can try to get the latest version by providing a tag

go get github.com/fauna/faunadb-go@2.9.0

but thanks to Go Modules versions must have v prefix.

That would be nice to have a v2.9.0 tag for the latest version.

@rof20004
Copy link
Author

@leonidboykov Thanks for information.

I tried this and got same version, I think the problem is like you explained, the v prefix.

@camilopayan
Copy link

This is still happening with the v2.10.0 tag unfortunately. I'm not sure how to import the module so that the right version lands in go.mod. I've tried something like import "github.com/fauna/faunadb-go/v2/faunadb" but that doesn't function. Any insights into how to import this module to get the latest?

@trevorsibanda
Copy link

@camilopayan try using in the meantime, whilst I sort this out.
go get gopkg.in/fauna/faunadb-go.v2

import "gopkg.in/fauna/faunadb-go.v2"

@camilopayan
Copy link

Thanks for the response. For now I'm sticking with 2.0, unfortunately.

When I tried import "gopkg.in/fauna/faunadb-go.v2" I got this message:

build command-line-arguments: cannot load gopkg.in/fauna/faunadb-go.v2: module gopkg.in/fauna/faunadb-go.v2@latest found (v2.0.0), but does not contain package gopkg.in/fauna/faunadb-go.v2
make: *** [build] Error 1

@exul
Copy link

exul commented Jan 10, 2020

The tag is now correct (having the v prefix), but the go.mod file is still wrong. According to https://golang.org/cmd/go/#hdr-Module_compatibility_and_semantic_versioning the first line has to be github.com/fauna/faunadb-go/v2 instead of github.com/fauna/faunadb-go.
With the current version this leads to the followin error:

go get github.com/fauna/faunadb-go@v2.10.0
go: finding github.com/fauna/faunadb-go v2.10.0
go get github.com/fauna/faunadb-go@v2.10.0: github.com/fauna/faunadb-go@v2.10.0: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

@trevorsibanda
Copy link

@exul that is correct. We have a release scheduled soon which will address this and update the documentation. > 2.10.0 all releases will follow go modules import compatibility rules.

See https://github.com/fauna/faunadb-go/tree/fix-semver

@mwildehahn
Copy link

➜ go get github.com/fauna/faunadb-go@v2
go: extracting github.com/fauna/faunadb-go v2.0.0+incompatible
➜ go get gopkg.in/fauna/faunadb-go.v2
go: extracting gopkg.in/fauna/faunadb-go.v2 v2.0.0

both of these install v2.0.0 which seems to be the version from 2018 without functions for Collection among other things.

@mwildehahn
Copy link

Ah I guess you can use Class in place of Collection for the time being. FWIW this is really confusing and frustrating for someone just trying to get started with fauna.

@StarpTech
Copy link

Hi, I have the same issue as @mwildehahn described.

@StarpTech
Copy link

StarpTech commented Mar 24, 2020

It looks like the current approach isn't correct:

See: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Error:

go get github.com/fauna/faunadb-go@v2.11.0: github.com/fauna/faunadb-go@v2.11.0: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2

golang/go#35732

@yonnic
Copy link

yonnic commented Aug 13, 2020

this issue cost me nearly 3 hours to find and it still persists in the latest version.
go.mod loads by default version 2.0.0 from 2018 with nonexisting f.Collection and the latest v2.12.1 version is v1.0.1-0 in go.mod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants