-
-
Notifications
You must be signed in to change notification settings - Fork 675
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
how to build protobufs with gogoproto ? #1364
Comments
Now, i meet this error
use under command to generate golang code
how to configure it in the go_proto_compiler ? |
Sorry for the lack of proto documentation. I'm hoping to get to that this week. In the mean time, here's a quick example: hello.proto
BUILD.bazel
Some notes:
|
@jayconrod I have solved the problem by your help. Thank you very much. |
Glad to hear it. I'll close this issue now. The tracking issue for documenting |
sorry, i meet new problem. I need to put gogo/protobuf into vendor. a proto in my project use gogo/protobuf/gogoproto/gogo.proto so i write BUILD as follow:
and /vendor/github.com/gogo/protobuf/gogoproto/BUILD as follow
but it meet a error as follow
Have i configured gogoproto_proto? |
There are a couple problems with vendoring protos. First, Bazel requires that protos are imported with paths relative to the root of a repository. This means you would have to import "vendor/github.com/gogo/protobuf/gogoproto/gogo.proto". Because of this, vendored protos can't import other vendored protos without modification. Bazel folks are working on adding an attribute to Second, |
i have another question. i have some code as follow subject.go
dm.proto
BUILD
it will meet a error
|
What target hits the error exactly? |
我是搜go-common/net/http/blademaster找到这里的,路过打扰了.... |
I also struggled with this recently. The gogo proto is not intuitively located in |
For those who are still struggling. Here is one simple trick
|
please update the document about Protobuf rules , I cannot know how to configure the bazel to build protobufs with gogoproto. Hope to solve as soon as possible.
The text was updated successfully, but these errors were encountered: