protoc-gen-go-grpc: program not found or is not executable

前端 未结 5 1884
野趣味
野趣味 2020-12-16 01:34

go version: go version go1.14 linux/amd64

go.mod

module [redacted]

go 1.14

require (
    github.com/golang/protobuf v1.4.0-rc.2
    go         


        
5条回答
  •  独厮守ぢ
    2020-12-16 02:08

    OK, just found out, as per https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.20.0

    The v1.20 protoc-gen-go does not support generating gRPC service definitions. In the future, gRPC service generation will be supported by a new protoc-gen-go-grpc plugin provided by the Go gRPC project.

    The github.com/golang/protobuf version of protoc-gen-go continues to support gRPC and will continue to do so for the foreseeable future.

    EDIT 29/05/2020:

    Following an update from @Mark in the comments, according to the Tracking issue on github, protoc-gen-go-grpc has now been merged. However, according to the same issue:

    Even with this merged, it is unreleased (v0.0) and subject to change. We do plan to add a requirement that the Unimplemented service implementation be included in all registered services, with an escape hatch in the form of a command-line arg as suggested by @neild.

提交回复
热议问题