【发布时间】:2021-11-19 03:33:28
【问题描述】:
我开始使用 bazel,并尝试为 RPC 服务生成 golang 的 protobuf 代码。
当我尝试构建它时,我收到以下错误:
bazel-out/k8-fastbuild/bin/examples/grpc/protos/helloworld_go_proto_/examples/grpc/protos/helloworld.pb.go:229:7: undefined: grpc.ClientConnInterface
bazel-out/k8-fastbuild/bin/examples/grpc/protos/helloworld_go_proto_/examples/grpc/protos/helloworld.pb.go:233:11: undefined: grpc.SupportPackageIsVersion6
bazel-out/k8-fastbuild/bin/examples/grpc/protos/helloworld_go_proto_/examples/grpc/protos/helloworld.pb.go:243:5: undefined: grpc.ClientConnInterface
bazel-out/k8-fastbuild/bin/examples/grpc/protos/helloworld_go_proto_/examples/grpc/protos/helloworld.pb.go:246:26: undefined: grpc.ClientConnInterface
完整的构建日志:https://app.buildbuddy.io/invocation/c3773978-22dd-44c8-b977-13967a1953b7
这里是代码:https://github.com/juanique/example-go-grpc。我正在尝试包含尽可能少的代码以使该目标正常工作。
由于BUILD 文件是由gazelle 生成的,我怀疑问题出在WORKSPACE 文件中:https://raw.githubusercontent.com/juanique/example-go-grpc/main/WORKSPACE。我只是在做我在https://github.com/bazelbuild/rules_go中找到的东西
【问题讨论】:
标签: go protocol-buffers grpc bazel