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

There is a dependency problem which complains some undefined options #16

Open
Martin91 opened this issue May 18, 2021 · 3 comments
Open

Comments

@Martin91
Copy link

When I run go get github.com/WangXiangUSTC/tidb-lite, I got the below error:

go.etcd.io/etcd/clientv3/balancer/picker

/Users/martinhong/go/pkg/mod/go.etcd.io/[email protected]/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions
/Users/martinhong/go/pkg/mod/go.etcd.io/[email protected]/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions

go.etcd.io/etcd/clientv3/balancer/resolver/endpoint

/Users/martinhong/go/pkg/mod/go.etcd.io/[email protected]/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption
/Users/martinhong/go/pkg/mod/go.etcd.io/[email protected]/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption

It prevented me from launch unit tests.

@sdismo
Copy link

sdismo commented Jun 9, 2021

I encountered something similar. It seems like the undefined stuff above has been removed in some newer version of grpc. My workaround was to lock/replace the grpc version in go.mod by adding:

replace google.golang.org/grpc => google.golang.org/grpc v1.26.0

For other reasons I already had to lock/replace the protobuf version.

replace google.golang.org/protobuf => google.golang.org/protobuf v1.26.0

@jlk
Copy link

jlk commented May 20, 2022

FYI attempting to pin grpc to v1.26.0 no longer works, at least to me. something else is pushing for 1.46.

I'm interested in trying this for unit tests, so if I get some time I'll see if I can figure out a more up to date fix...

@anirudhm-qualtrics
Copy link

The combination that worked for me:

go get github.com/WangXiangUSTC/tidb-lite v0.0.0-20211231154503-f1bd5ebe02f6
go mod edit -replace="google.golang.org/grpc=google.golang.org/[email protected]"
go mod edit -replace="google.golang.org/protobuf=google.golang.org/[email protected]"
go mod tidy

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

No branches or pull requests

4 participants