-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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 Client Package can't be used in applications importing golang.org/x/net/trace #7884
Comments
Thanks for your report, @zgiber ! |
@jackysp Thanks for looking into it. We're at a point where we'd like to decide whether to go with TiKV or an alternative, this seems to be a showstopper. It would be a big help if |
@zgiber What's your go version? |
@shenli go version go1.11.1 darwin/amd64 recently upgraded from 1.10.2 both versions can reproduce the issue. |
@zgiber Could you post the error message here? It will be really helpful. |
I'm asking the golang team how to handle this case. golang/go#28207 |
Sure, (the error message got slightly improved in 1.11):
(updated initial post with error message) |
Using go modules or even Gopkg could fix this. Gopkg seemed to hang forever on
|
Yes go modules is a feasible workaround would be better though if it wasn't necessary. |
Is that an issue for tidb or golang? We can do the switch to gomodules for tidb ourselves if that fixes the issue. We are already starting the switch to gomodules in the pd repo, but it probably wouldn't be part of an official release until 2.1 at the earliest. |
@gregwebs |
I think we would just need to check in parser.go and vendor all tooling with retool. But that also shouldn't be a dependency for the TiKV client, so its also possible to look at making the TiKV client available separately. |
The go team think current behavior is intended, so there is no better choice but some workarounds:
This modification is quick and dirty, package
TiDB put all things in vendor, if a project imports TiKV client from TiDB, it also need a vendor and maybe tools like The vendor works like a virus, if one import a project with vendor, his project probably need one.
TiDB haven't employ the Go1.11 module yet, and |
I think being able to use tikv standalone would be great. |
tikv/tikv#3828 @zgiber
|
FYI @disksing |
Yep, all good, thank you! |
Bug Report
Please answer these questions before submitting your issue. Thanks!
What did you do?
Developing a GRPC application which also requires to use tikv client.
What did you expect to see?
No errors were expected on importing packages.
What did you see instead?
The GRPC package indirectly imports
golang.org/x/net/trace
which clashes with the vendored version used by the tikv client.tidb-server -V
or runselect tidb_version();
on TiDB)?TIKV client from tip
d21f294393f5c6cb442cd6eb16e0a468f2d1483c
You can easily reproduce the issue by running the following code (it's non functional, but crashes before application logic is executed):
The text was updated successfully, but these errors were encountered: