Skip to content

protoc-gen-grpc-gateway fails silently after release 1.10 #1013

Closed
@rmilejcz

Description

@rmilejcz

Bug reports:

protoc-gen-grpc-gateway doesn't build stubs after updating to release 1.10

Steps you follow to reproduce the error:

  1. 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
  1. 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
  1. 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
  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions