At Dgraph, we use gRPC for communication between the server and our Go client. Now if someone tries to use our Go client in their project, they get this error
./main.go:55: cannot use conn (type *"google.golang.org/grpc".ClientConn) as type *"github.com/dgraph-io/dgraph/vendor/google.golang.org/grpc".ClientConn in argument to graph.NewDgraphClient
./main.go:122: cannot use conn (type *"google.golang.org/grpc".ClientConn) as type *"github.com/dgraph-io/dgraph/vendor/google.golang.org/grpc".ClientConn in argument to graph.NewDgraphClient
because Go considers the version of gRPC that is vendored in with Dgraph and the one in your GOPATH to be different even if it is the same.
Is there any way to get around this, apart from not vendoring in the grpc dependency?
Thanks for looking at it @dfc. Actually Dgraph itself is a server and not a library and thus would be used directly by end users. It has gRPC vendored in.
Though when I try to use it with the client which is a library (it does not have gRPC vendored), I get this error.
Another interesting thing is that if someones forks Dgraph into their own repo, it doesn’t build and has a bunch of errors. Any ideas why that might be happening?