I started a new project with go modules, the projects already existed. After running go mod int and go mod tidy I’m getting:
go mod tidy
go: downloading [github.com/ghodss/yaml](http://github.com/ghodss/yaml) v1.0.0
go: extracting [github.com/ghodss/yaml](http://github.com/ghodss/yaml) v1.0.0
[go.etcd.io/etcd/discoveryserver/handlers](http://go.etcd.io/etcd/discoveryserver/handlers) imports
[go.etcd.io/etcd/etcdserver/api/v2store](http://go.etcd.io/etcd/etcdserver/api/v2store): module [go.etcd.io/etcd@latest](http://go.etcd.io/etcd@latest) (v3.3.17+incompatible) found, but does not contain package [go.etcd.io/etcd/etcdserver/api/v2store](http://go.etcd.io/etcd/etcdserver/api/v2store)
I have no idea how to solve the module go.etcd.io/etcd@latest (v3.3.17+incompatible) found, but does not contain package go.etcd.io/etcd/etcdserver/api/v2store issue. I would appreciate any help.
Looks like v2store is not there. I navigate the module folder and it is not. I’m looking at another versions to see if they have the go.etcd.io/etcd/etcdserver/api/v2store package. $ echo $GO111MODULE -> empty
This was done by modifying the go.mod directly.
With go get:
go get -u go.etcd.io/etcd@v3.4.2
go: finding go.etcd.io/etcd v3.4.2
go get go.etcd.io/etcd@v3.4.2: go.etcd.io/etcd@v3.4.2: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v3
Oh yes. As expected in go1.13.X. It’s getting strict with the v1, v2, … directory approach. Currently, the project does not practice that directory approach.
Can you try replacing v3.4.2 with its commid ID: bbe86b066c0c714fa2a17ee93a37882553cf2394? They only maintain single master branch (master is always on the edge) so it’s not safe to use @master in this case.
It is suppose to be v3.4.2. Correct? Also, could you point me out to where I can read about this: As expected in go1.13.X. It’s getting strict with the v1, v2, … directory approach.
It is expected to have the pseudo-version. You can’t use the tag-version unless the project complies to the version directory approach for tag with major version higher than or equal to 2.
I’m able to get the server running. I think next thing to do is to fix the compatibility between go modules and the releases. I’ll marked this as resolved and Thank you so much @hollowaykeanho.