[protobuf] Re: Numeric range not supported?

2011-06-02 Thread Ben Wright
You can use custom field options to support validation of this type. Take a look at extending com.google.FieldOptions You can create an option field like "max_inclusive" and then access it at run-time from the FieldDescriptor and use the information for validation. Unfortunately this is still ju

Re: [protobuf] Numeric range not supported?

2011-06-02 Thread Wenbo Zhu
On Thu, Jun 2, 2011 at 5:55 PM, Wenbo Zhu wrote: > > On Thu, Jun 2, 2011 at 3:41 AM, Pherl Liu wrote: > >> We also have another internal thread talking about the "restriction" >> support for protobuf. Basically we think the restriction or value validation >> function of protobuf should be implem

[protobuf] Re: Issue 296 in protobuf: Deploy protobuf-java 2.4.1 JAR to Maven Repository

2011-06-02 Thread protobuf
Comment #5 on issue 296 by sergei.s...@gmail.com: Deploy protobuf-java 2.4.1 JAR to Maven Repository http://code.google.com/p/protobuf/issues/detail?id=296 Please have a look at the following guide: http://maven.apache.org/guides/mini/guide-central-repository-upload.html You may want to regi

[protobuf] Re: Issue 294 in protobuf: PyIter_Next returns a "New Reference" so you must Py_DECREF it when done

2011-06-02 Thread protobuf
Updates: Cc: f...@google.com Comment #1 on issue 294 by liuj...@google.com: PyIter_Next returns a "New Reference" so you must Py_DECREF it when done http://code.google.com/p/protobuf/issues/detail?id=294 Thanks for reporting this. Adding Frank to take a look. -- You received this mes

[protobuf] Re: Issue 296 in protobuf: Deploy protobuf-java 2.4.1 JAR to Maven Repository

2011-06-02 Thread protobuf
Updates: Owner: g...@google.com Cc: liuj...@google.com Comment #4 on issue 296 by liuj...@google.com: Deploy protobuf-java 2.4.1 JAR to Maven Repository http://code.google.com/p/protobuf/issues/detail?id=296 Gregory, would you please help deploy the 2.4.1 jar file into the mav

[protobuf] Re: Issue 296 in protobuf: Deploy protobuf-java 2.4.1 JAR to Maven Repository

2011-06-02 Thread protobuf
Comment #3 on issue 296 by sergei.s...@gmail.com: Deploy protobuf-java 2.4.1 JAR to Maven Repository http://code.google.com/p/protobuf/issues/detail?id=296 Hardly surprising, given that maven ecosystem is systematically neglected by protobuf team. Protoc maven plugin is effectively abandone

[protobuf] Re: Issue 296 in protobuf: Deploy protobuf-java 2.4.1 JAR to Maven Repository

2011-06-02 Thread protobuf
Comment #2 on issue 296 by george.c...@gmail.com: Deploy protobuf-java 2.4.1 JAR to Maven Repository http://code.google.com/p/protobuf/issues/detail?id=296 protobuf 2.4.1 came out at the end of April. Is there an issue with the Java package that's holding up a corresponding Maven release? I

Re: [protobuf] Best Practices on updating generated Message object

2011-06-02 Thread Pherl Liu
You can probably use sub-builders in this case: e.g. myBuilder.getPriceBuilder().setValue(123); See http://code.google.com/apis/protocolbuffers/docs/reference/java-generated.html#messagein sub builders section. On Thu, May 26, 2011 at 2:58 PM, veaven wrote: > Hi, > > What's the best practices

Re: [protobuf] Problem with reading class

2011-06-02 Thread Pherl Liu
That one will parse from binary encoded data. Looks like your sample_message.txt is in ASCII format. In short: Binary format: serialize: msg.writeTo() / msg.toByteArray() parsing: MyMessage.parseFrom() / builder.mergeFrom() ASCII format: serialize: msg.toString() / TextFormat.printToString() parsi

Re: [protobuf] Numeric range not supported?

2011-06-02 Thread Pherl Liu
We also have another internal thread talking about the "restriction" support for protobuf. Basically we think the restriction or value validation function of protobuf should be implemented in the upper layer due to various concerns.. On Mon, May 30, 2011 at 6:54 PM, Marco Tedone wrote: > Hi all,

Re: [protobuf] How can I set multi proto_path

2011-06-02 Thread Pherl Liu
Yes, you can. See: http://code.google.com/apis/protocolbuffers/docs/proto.html#generating On Wed, Jun 1, 2011 at 2:39 PM, jonason wrote: > can I set multi proto_path? > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this

Re: [protobuf] Optional,Repated fields and Submessages

2011-06-02 Thread Pherl Liu
So are you using a 3rd party C protobuf plugin? Then my previous reply may not be applicable for that implementation. You may want to contact the plugin author directly for these questions. On Thu, Jun 2, 2011 at 6:14 PM, AARADHANA SRIDHARAN wrote: > I am working on a C code base... INIT function

Re: [protobuf] Optional,Repated fields and Submessages

2011-06-02 Thread AARADHANA SRIDHARAN
I am working on a C code base... INIT functions are used in this case instead of a constructor in C++. Thanks for your reply. On Thu, Jun 2, 2011 at 3:33 PM, Pherl Liu wrote: > > > On Wed, Jun 1, 2011 at 3:45 PM, aara wrote: > >> I actually have 3 questions. >> >> 1.When we specify default va

Re: [protobuf] Optional,Repated fields and Submessages

2011-06-02 Thread Pherl Liu
On Wed, Jun 1, 2011 at 3:45 PM, aara wrote: > I actually have 3 questions. > > 1.When we specify default values for optional fields,the default value > gets assigned automatically when we ourselves dont assign it a value. > But why doesnt the has_member field get set to 1??? It still remains > ze