-
Notifications
You must be signed in to change notification settings - Fork 157
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
Go support: can't import generated protobuf file output #1
Comments
Looping in @hochhaus (bazelbuild/rules_closure#89) for possible review. |
@pcj What are your goals for this project? Are you looking for full gRPC support or just basic go protobuf support for interop with rules_closure style JS? If the latter, it might be easier to use a very light weight stub. For example, I'm using:
with a BUILD file that looks like
and then importing that package in go with:
(Obviously name it something better than "pb".) I'm hesitant to put much time into a code review until we have a plan for where it can be upstreamed for general use. For example, if @yugui would consider accepting However, based upon bazelbuild/rules_closure#89 I think all of the bazel protobuf support will land in upstream protobuf eventually. So I'm not sure if it makes sense to store in rules_go for the time being. What are your thoughts Yuki Yugui Sonoda? |
Thanks @hochhaus. My goal is ultimately to provide comprehensive protobuf support for multiple languages, with gRPC support. Based on my review of sources in getting this started, it's a highly fragmented area given the diversity of tools and existing build infrastructures. As for golang, I'm still getting my head around how package names, import statements, go_prefix, and go_library all interact. Specifically, the protoc-gen-go plugin has this concept of an ImportMap that is exposed via the option format It's not too hard to generate the |
Andy @hochhaus if you send email to pcj@pubref.org I will cc: you on email thread with @yugui. |
Note: golang support is now provided, but there are some limitations. See #4. |
fix travis-ci builds by removing old bazel versions and allow os x to fail
rules_protobuf go support is being developed on the "go" branch and originally based on @yugui https://github.com/grpc-ecosystem/grpc-gateway/blob/e958c5db30f7b99e1870db42dd5624322f112d0c/grpc-gateway.bzl.
Protocol buffer sources
*.pb.go
are successfully generated, but other go code that attempts to import the generated files fails:$ git clone https://github.com/pubref/rules_protobuf $ cd rules_protobuf $ git checkout go $ bazel build --verbose_failures examples/helloworld/go/client
The text was updated successfully, but these errors were encountered: