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

Failed to compile proto_go_library() #298

Closed
gou4shi1 opened this issue Nov 2, 2022 · 2 comments
Closed

Failed to compile proto_go_library() #298

gou4shi1 opened this issue Nov 2, 2022 · 2 comments

Comments

@gou4shi1
Copy link
Contributor

gou4shi1 commented Nov 2, 2022

The proto_go_library() was generated by gazelle.

$ bazel run xxx
compilepkg: missing strict dependencies:
	/dev/shm/bazel-sandbox.xxx/processwrapper-sandbox/2/execroot/.../proto/api_grpc_grpc.pb.go: import of "google.golang.org/grpc"
	/dev/shm/bazel-sandbox.xxx/processwrapper-sandbox/2/execroot/.../proto/api_grpc_grpc.pb.go: import of "google.golang.org/grpc/codes"
	/dev/shm/bazel-sandbox.xxx/processwrapper-sandbox/2/execroot/.../proto/api_grpc_grpc.pb.go: import of "google.golang.org/grpc/status"

I have

    go_repository(
        name = "org_golang_google_grpc",
        importpath = "google.golang.org/grpc",
        tag = "v1.32.0",
    )

in my WORKSPACE, it works for go_proto_library().

@gou4shi1
Copy link
Contributor Author

gou4shi1 commented Nov 2, 2022

I noticed that proto_go_library() is disabled in examples, is it ready to use?

@gou4shi1
Copy link
Contributor Author

gou4shi1 commented Nov 2, 2022

Fixed by

# gazelle:proto_plugin protoc-gen-go implementation golang:protobuf:protoc-gen-go
# gazelle:proto_plugin protoc-gen-go-grpc implementation grpc:grpc-go:protoc-gen-go-grpc
# gazelle:proto_plugin protoc-gen-go-grpc deps @org_golang_google_grpc//:go_default_library
# gazelle:proto_plugin protoc-gen-go-grpc deps @org_golang_google_grpc//codes
# gazelle:proto_plugin protoc-gen-go-grpc deps @org_golang_google_grpc//grpclog
# gazelle:proto_plugin protoc-gen-go-grpc deps @org_golang_google_grpc//metadata
# gazelle:proto_plugin protoc-gen-go-grpc deps @org_golang_google_grpc//reflection
# gazelle:proto_plugin protoc-gen-go-grpc deps @org_golang_google_grpc//status
# gazelle:proto_plugin protoc-gen-grpc-gateway implementation grpc-ecosystem:grpc-gateway:protoc-gen-grpc-gateway
# gazelle:proto_plugin protoc-gen-grpc-gateway deps @grpc_ecosystem_grpc_gateway//runtime
# gazelle:proto_plugin protoc-gen-grpc-gateway deps @grpc_ecosystem_grpc_gateway//utilities
# gazelle:proto_rule proto_go_library implementation stackb:rules_proto:proto_go_library
# gazelle:proto_rule proto_go_library deps @org_golang_google_protobuf//proto
# gazelle:proto_rule proto_go_library deps @org_golang_google_protobuf//reflect/protoreflect
# gazelle:proto_rule proto_go_library deps @org_golang_google_protobuf//runtime/protoimpl
# gazelle:proto_language go plugin protoc-gen-go
# gazelle:proto_language go plugin protoc-gen-go-grpc
# gazelle:proto_language go plugin protoc-gen-grpc-gateway
# gazelle:proto_language go rule proto_compile
# gazelle:proto_language go rule proto_go_library

@gou4shi1 gou4shi1 closed this as completed Nov 2, 2022
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

1 participant