Closed
Description
Bug reports:
protoc-gen-grpc-gateway
doesn't build stubs after updating to release 1.10
Steps you follow to reproduce the error:
- Install plugins:
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get -u github.com/golang/protobuf/protoc-gen-go
- Make a suitable service file (copy paste this into terminal):
touch service.proto
cat <<EOF >>service.proto
syntax = "proto3";
package example;
import "google/api/annotations.proto";
message StringMessage {
string value = 1;
}
service YourService {
rpc Echo(StringMessage) returns (StringMessage) {
option (google.api.http) = {
post: "/v1/example/echo",
body: "*"
};
}
}
EOF
- In the same folder, try generating GW stubs by running:
protoc -I/usr/local/include -I. \
-I$GOPATH/src \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--grpc-gateway_out=logtostderr=true:. \
service.proto
- Observe that
service.pb.gw.go
does not exist as expected.
What did you expect to happen instead:
service.pb.gw.go
should be output in the same folder as service.proto
What's your theory on why it isn't working:
Hard to say since there is no output and I'm unfamiliar with how these tools work under the hood