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

Fresh install no longer generates necessary google/api/annotations.pb.go & google/api/http.pb.go files. #327

Closed
marcusljx opened this issue Mar 15, 2017 · 8 comments

Comments

@marcusljx
Copy link
Contributor

Fresh install no longer generates necessary google/api/annotations.pb.go & google/api/http.pb.go files.

Action

go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get -u github.com/golang/protobuf/protoc-gen-go

generate a proto project someproject.pb.go file, which contains

import _ "github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api"

Expected
annotations.pb.go and http.pb.go generated successfully in github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api, and compilation completes properly.

Actual
Files not generated, and compilation fails with the error:

...../grpc-gateway/third_party/googleapis/google/api' has no buildable Go source files.
@tmc
Copy link
Collaborator

tmc commented Mar 15, 2017

@marcusljx thank you for your issue report. can you share your full protoc invocation (privately if . needed) as you should get lines more like import _ "google.golang.org/genproto/googleapis/api/annotations"

@tmc
Copy link
Collaborator

tmc commented Mar 15, 2017

Just to be clear we intentionally moved to the published go code published at https://godoc.org/google.golang.org/genproto to prevent re-registration of descriptors.

@dong77
Copy link

dong77 commented Mar 15, 2017

I'm having this very issue right now. How to fix it ?

@tmc
Copy link
Collaborator

tmc commented Mar 15, 2017

@dong77 thanks for chiming in -- if your generated go files have github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api references then you're using an outdated protoc-gen-grpc-gateway

@unship
Copy link

unship commented Mar 16, 2017

@tmc

go get -u github.com/philips/grpc-gateway-example
grpc-gateway-example serve

screenshot
no buildable Go source files

unship added a commit to unship/grpc-gateway-example that referenced this issue Mar 16, 2017
grpc-ecosystem/grpc-gateway#327
solve grpc-gateway/third_party/googleapis/google/api' has no buildable Go source files
@unship
Copy link

unship commented Mar 16, 2017

its philips/grpc-gateway-example's makefile not update, my problem solved

@tmc
Copy link
Collaborator

tmc commented Mar 17, 2017

I opened philips/grpc-gateway-example#15 to reflect this change.

@marcusljx
Copy link
Contributor Author

marcusljx commented Mar 17, 2017

As stated in the above makefile example, this was due to an outdated go_out= parameter in makefiles or //go:generate commands.

@tamalsaha tamalsaha mentioned this issue Mar 30, 2017
1 task
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

4 participants