Re: [protobuf] Re: Bazel build ?

2016-07-19 Thread Ina Krazosi
Where do I put these files? Just putting them in the root of the repo (where the WORKSPACE) files is and putting load("grpc_proto.bzl", all the various entry points) here gives me errors about targets being incorrectly specified. On Sunday, May 3, 2015 at 8:34:37 AM UTC-4, Animesh Huseh wrote

[protobuf] Determining global vs local enum in plugin

2016-07-19 Thread kristen
I've been working on writing my own plugin and I've been looking at the code example from the following blog for guidance: http://www.expobrain.net/2015/09/13/create-a-plugin-for-google-protocol-buffer/ While parsing the request in this block of code: if isinstance(item, DescriptorProto):

Re: [protobuf] C++ Linux Google Protocol Buffers - having trouble replicating the tutorial

2016-07-19 Thread 'Adam Cozzette' via Protocol Buffers
I think the reason for the error you're getting is that your third command does not provide the compiled code from addressbook.proto or the libprotobuf library. I would recommend going into the examples/ directory and running "make cpp"; that will build and run the example code for you and should w

Re: [protobuf] message wrapped enums

2016-07-19 Thread 'Feng Xiao' via Protocol Buffers
On Tue, Jul 19, 2016 at 11:53 AM, Mohamed Koubaa wrote: > Hi Feng, > > I didn't think about the use case of passing empty messages. No, I have > not measured the binary size impact. Actually I was more annoyed by my IDE > suggesting all of the inherited message methods when I really only wanted

Re: [protobuf] Is there a hashing function for each supported language? Does it produce the same output across each?

2016-07-19 Thread 'Feng Xiao' via Protocol Buffers
On Tue, Jul 19, 2016 at 11:46 AM, Alex Shaver wrote: > (proto3 question) > > Suppose I have some messages Foo and Bar, where Bar represents data for > objects that are related to some Foo. I send the whole bunch of them in > some set like so: > message MyMessage{ > repeated Foo = 1; > repeate

Re: [protobuf] message wrapped enums

2016-07-19 Thread Mohamed Koubaa
Hi Feng, I didn't think about the use case of passing empty messages. No, I have not measured the binary size impact. Actually I was more annoyed by my IDE suggesting all of the inherited message methods when I really only wanted to see the enum values. If a binary size impact is measurable and

[protobuf] Is there a hashing function for each supported language? Does it produce the same output across each?

2016-07-19 Thread Alex Shaver
(proto3 question) Suppose I have some messages Foo and Bar, where Bar represents data for objects that are related to some Foo. I send the whole bunch of them in some set like so: message MyMessage{ repeated Foo = 1; repeated Bar = 2; } What I'd like is for Bar to have a structure like: mes

Re: [protobuf] message wrapped enums

2016-07-19 Thread 'Feng Xiao' via Protocol Buffers
On Tue, Jul 19, 2016 at 7:38 AM, Mohamed Koubaa wrote: > Hello, > > In my cpp proto3 project I am using enums that are wrapped in messages to > avoid namespace collisions. See for example: > > message Physics { > enum Enum { > STRUCTURAL = 0; > THERMAL = 1; > } > } > > In c++ I can

[protobuf] Re: Error when I run: python setup.py test --cpp_implementation

2016-07-19 Thread Oi Lee
Solution: pip install pytz --upgrade On Tuesday, July 19, 2016 at 9:24:32 AM UTC-6, Oi Lee wrote: > > Had to install python setuptools. But I now have a version conflict. > > pkg_resources.VersionConflict: (pytz 2012d (/usr/lib/python2.7/site- > packages), Requirement.parse('pytz>=2010')) > > Any

[protobuf] Re: Error when I run: python setup.py test --cpp_implementation

2016-07-19 Thread Oi Lee
Had to install python setuptools. But I now have a version conflict. pkg_resources.VersionConflict: (pytz 2012d (/usr/lib/python2.7/site-packages ), Requirement.parse('pytz>=2010')) Any suggestions? On Monday, July 18, 2016 at 4:01:50 PM UTC-6, Oi Lee wrote: > > Using CENToS and protobuf 2.6.1

Re: [protobuf] Compiling protobuf with GOOGLE_PROTOBUF_NO_THREAD_SAFETY macro

2016-07-19 Thread Igor Gatis
I'm using -DGOOGLE_PROTOBUF_NO_THREAD_SAFETY but I'm hitting the following errors: "src/google/protobuf/stubs/atomic_sequence_num.h", line 43: Error: #20: identifier "AtomicWord" is undefined AtomicWord GetNext() { ^ "src/google/protobuf/stubs/atomic_sequence_num.h", line 47: Error: #2

[protobuf] message wrapped enums

2016-07-19 Thread Mohamed Koubaa
Hello, In my cpp proto3 project I am using enums that are wrapped in messages to avoid namespace collisions. See for example: message Physics { enum Enum { STRUCTURAL = 0; THERMAL = 1; } } In c++ I can refer to it by Physics::STRUCTURAL which is great. In this case, the Physics m

[protobuf] Re: why does uint64, fixed64 map to string when converted to JSON

2016-07-19 Thread 'Jon Skeet' via Protocol Buffers
On Monday, 18 July 2016 18:25:41 UTC+1, Shashwat Agarwal wrote: > > I was looking at this document: > https://developers.google.com/protocol-buffers/docs/proto3#json and > noticed that int64, fixed64, uint64 are mapped to string when converting to > JSON. Any specific reason why this is done? Th