Go version: go1.13
Problem: when I run go get -u github.com/micro/go-micro I get the following error:
# github.com/coreos/etcd/clientv3
src/github.com/coreos/etcd/clientv3/auth.go:121:72: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.AuthEnable
src/github.com/coreos/etcd/clientv3/auth.go:126:74: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.AuthDisable
src/github.com/coreos/etcd/clientv3/auth.go:131:152: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserAdd
src/github.com/coreos/etcd/clientv3/auth.go:136:144: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserAdd
src/github.com/coreos/etcd/clientv3/auth.go:141:86: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserDelete
src/github.com/coreos/etcd/clientv3/auth.go:146:122: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserChangePassword
src/github.com/coreos/etcd/clientv3/auth.go:151:104: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserGrantRole
src/github.com/coreos/etcd/clientv3/auth.go:156:80: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserGet
src/github.com/coreos/etcd/clientv3/auth.go:161:72: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserList
src/github.com/coreos/etcd/clientv3/auth.go:166:106: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserRevokeRole
src/github.com/coreos/etcd/clientv3/auth.go:166:106: too many errors
We first saw this error when our CI build began to fail, and at first couldn't reproduce it locally, but then were able to by adding the -u to the command. Alternately, here's a simple Dockerfile that demonstrates the issue when building it.
This seems to be caused by the moving of github.com/coreos/etcd to github.com/etcd-io/etcd, as described here: https://github.com/etcd-io/etcd/pull/10044#issuecomment-417125341
That change and the issue are from last year, so I'm not sure why this is just showing up now, but my colleagues and I (and our CI) can all reproduce the problem now.
I will look into creating a PR that changes the imports from coreos/etcd to etcd-io/etcd.
We would appreciate a PR to fix the imports. This does however work with go mod if you are using it. Which we'd otherwise also recommend.
export GO111MODULE=on
use command : go get -u github.com/micro/go-micro/
report the error:
GoWork/pkg/mod/github.com/lucas-clemente/[email protected]/internal/handshake/crypto_setup.go:501:72: undefined: qtls.CipherSuite
GoWork/pkg/mod/github.com/lucas-clemente/[email protected]/internal/handshake/crypto_setup.go:523:73: undefined: qtls.CipherSuite
In the go.mod file, there is a line which is "github.com/coreos/etcd v3.3.15+incompatible".
No "go.etcd.io/etcd" in this file.
Please do not run go get -u as this updates the dependencies
I install micro toolkit by the command go get github.com/micro/micro and get the same error:
# github.com/coreos/etcd/clientv3
coreos/etcd/clientv3/auth.go:121:72: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.AuthEnable
coreos/etcd/clientv3/auth.go:126:74: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.AuthDisable
coreos/etcd/clientv3/auth.go:131:152: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserAdd
coreos/etcd/clientv3/auth.go:136:144: cannot use auth.callOpts (type []"github.com/coreos/etcd/vendor/google.golang.org/grpc".CallOption) as type []"go.etcd.io/etcd/vendor/google.golang.org/grpc".CallOption in argument to auth.remote.UserAdd
...
What can I do now?
FYI I tried putting together a quick PR that just swaps out the old imports for the new ones, however I was getting build problems; for some reason at least when I was running it locally it was pulling some old dependencies. I'll try to dig into it some more at some point, but I have to work on other things for now.
Here are the changes I tried, in case anyone else wants to look at it.
There should not be "github.com" in that import if you check your GOPATH.
Replace "github.com/etcd-io/" with "etcd-io/" and give it a go? It worked for me.
If we fix source codes, it will bring discord. Just suggest host fixes this to modify go file or go.mod simply, and moreover, it`s convenient to jump to declarations.
So changing the imports will not help due to the way etcd does vendoring. They say they'll be fixing some of this post 3.4 release. For the time being the best approach is go modules. @newrelic-eheinlein does your build system use go modules? If not you should enable these.
Can anyone provide enough information to move forward with this? Like exact detail on how to get past this?
Please use Go 1.13 and Go modules. If you're in your go path use export GO111MODULE=on to enable go modules. Then run go get without the -u flag.
It all worked! Thanks for solving the problem.
i've got the same problem and i'm not able to solve it
Please use Go 1.13 and Go modules. If you're in your go path use
export GO111MODULE=onto enable go modules. Then rungo getwithout the -u flag.
worked - could you add this information to the docs?
i meet a problem
export GO111MODULE=on then go get github.com/micro/micro
[~/work/golang]$ go get github.com/micro/micro
go: finding github.com/micro/micro v1.18.0
go: downloading github.com/micro/micro v1.18.0
go: extracting github.com/micro/micro v1.18.0
verifying gopkg.in/src-d/go-git.[email protected]/go.mod: checksum mismatch
downloaded: h1:G7mAYYxgmS0lVkHyy2hEOLQCFB0DlQFTMLWggykrydY=
sum.golang.org: h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8=
SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.
For more information, see 'go help module-auth'.
Please use Go 1.13 and Go modules. If you're in your go path use
export GO111MODULE=onto enable go modules. Then rungo getwithout the -u flag
I run go get without the -u flag and it succeed, but I get the error again where I run my code
Please always use go modules and go get for our project.
Most helpful comment
Please use Go 1.13 and Go modules. If you're in your go path use
export GO111MODULE=onto enable go modules. Then rungo getwithout the -u flag.