grpc-gateway: third_party/googleapis is missing from package

I’m installing the latest packages. third_party/googleapis is missing from the package:

$ ls github.com/grpc-ecosystem/grpc-gateway/       
LICENSE.txt             internal                protoc-gen-swagger      runtime                 utilities

So I can’t compile anything because it depends on those files existing:

protoc -I/usr/local/include -I. \
  -I$GOPATH/src \
  -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
  --ruby_out=. \
  path/to/your_service.proto

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15

Commits related to this issue

Most upvoted comments

Okay, then the instructions on the website need to be corrected. They don’t mention this step at all and I wasted a bunch of time trying to figure out what I was doing wrong.

Plus, I think it’s a silly decision since you can’t use the grpc-gateway without them. Just makes everything harder for no reason.

this is an ugly solution, and is turning me away from working with protobuf/grpc in general

Yes these files are not tracked by go since they are proto files. The recommendation is to manually include them in your repository. Alternatively you can use bazel which solves most of this.

I’m sorry that the instructions were lacking in this case, would you be interested in contributing some better instructions to help the next person? I’d be happy to help you get a PR in.

As for this being a “silly decision”, it’s unfortunately out of our hands, there’s no way to track proto files with go modules. Maybe you know a better way?

I was able to resolve this by doing: -I=$GOPATH/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.12.1/third_party/googleapis

That version number will change depending on what you have installed.

Hi everyone. We recently updated the repository to use buf to manage the protobuf dependencies, which should make this much easier. Have you tried going through the README recently?

EDIT: Disclaimer: I work at buf.

I have to admit is really hard to work with this sort of changes, each time I want to use it I have to invest time to fix it first 😦 pretty disappointed