[protobuf] bazel rules_protobuf (java)

2016-08-01 Thread Paul Johnston
I've been struggling to find a clean way to generate protobufs for java (with gRPC support) with bazel, so I just released rules_protobuf at https://github.com/pubref/rules_protobuf/tree/0.1.1. If you are new to http://bazel.io, this might be a good way to try it out. As it will automaticall

Re: [protobuf] Trying to use C++ implementation of python but api_implementation.Type() still returns 'python' instead of 'cpp'

2016-08-01 Thread Paul Johnston
"--cpp_implementaion" misspelled, should be "--cpp_implementation" On Monday, August 1, 2016 at 1:28:29 PM UTC-6, Oi Lee wrote: > > When I do > [localhost python]$ sudo python setup.py build --cpp_implementaion > > Installed [...]/protobuf-2.6.1/python/.eggs/google_apputils-0.4.2-py2.7.egg > Sear

[protobuf] Re: Compiling Protobuf on VxWorks C++

2016-08-04 Thread Paul Johnston
https://github.com/google/protobuf/blob/master/BUILD I have protobuf available in my workspace as @com_github_google_protobuf This reports the (file) dependencies required to build the :protobuf rule: $ bazel query "deps(@com_github_google_protobuf//:protobuf)" HTH, Paul *@com_github_google_p

[protobuf] Re: Compiling Protobuf on VxWorks C++

2016-08-04 Thread Paul Johnston
Sorry, that paste was incomplete. Try this one. *@com_github_google_protobuf//:protobuf* *@com_github_google_protobuf//:src/google/protobuf/wrappers.pb.cc* *@com_github_google_protobuf//:src/google/protobuf/wire_format.cc* *@com_github_google_protobuf//:src/google/protobuf/util/type_resolver_util

[protobuf] Re: service without gRPC

2016-08-05 Thread Paul Johnston
You need to invoke the grpc plugin. The default protoc tool does not generate gRPC stubs on it's own. Here's what it looks like: $ protoc --cpp_out=outdir \ --plugin=protoc-gen-grpc=path/to/the/grpc-cpp-plugin \ --grpc_out=outdir \ path/to/your/helloworld.proto # Generated by protoc

[protobuf] Re: what to put in WORKSPACE and/or BUILD files to enable the cc_proto_library rule?

2016-08-05 Thread Paul Johnston
1. During the loading phase, bring the google/protobuf into your WORKSPACE so you can refer to it as @com_github_google_protobuf later. The bazel convention is to have fully qualified names, flattening special characters to underscore. git_repository( name = "com_github_google_protobuf", r

[protobuf] Re: Confused about directory structure from generated Go code

2016-09-01 Thread Paul Johnston
Consider using the import map feature of the protoc-gen-go plugin. Looks something like this: MAPPING_1="foo/bar.proto=github.com/foo/bar" MAPPING_1="foo/baz.proto=github.com/foo/baz" MAPPINGS="MAPPING_1,MAPPING_2