Re: [protobuf] optional vs required

2015-06-09 Thread Colin Deasy
On Tuesday, 9 June 2015 01:27:24 UTC+1, Feng Xiao wrote: On Mon, Jun 8, 2015 at 7:43 AM, Colin Deasy cde...@demonware.net javascript: wrote: Hey, When reading https://developers.google.com/protocol-buffers/docs/proto#simple I see a stark warning indicating that Required is Forever

Re: [protobuf] Re: Issue 491 in protobuf: Optional field throws NullPointerException when not set values.

2015-06-09 Thread Josh Humphries
As a work-around, you can implement a simple protoc plugin that will generate additional null-friendly methods into the classes already created by the Java codegen built into protoc. That's actually what we've done at Square. As you point out, the null-unfriendliness is particularly burdensome

Re: [protobuf] protobuf 3 without threadlocal

2015-06-09 Thread 'Feng Xiao' via Protocol Buffers
On Mon, Jun 8, 2015 at 6:57 PM, Austin Schuh austin.li...@gmail.com wrote: Pull request sent. I felt a lot better putting the logic in google/protobuf/stubs/platform_macros.h, so I put it there. The NO_THREADLOCAL macro does not belong to platform_macros.h. It will not work either because

Re: [protobuf] Dynamic/run-time decoding

2015-06-09 Thread 'Feng Xiao' via Protocol Buffers
On Mon, Jun 8, 2015 at 10:23 PM, Jan KyjovskĆ½ jan.kyjov...@tieto.com wrote: I have remade code so I now add into descriptor database all protofiles specified by directory. There is but little problem with error handling. From nature how I am handling errors it seems that message is possible to

Re: [protobuf] optional vs required

2015-06-09 Thread 'Feng Xiao' via Protocol Buffers
On Tue, Jun 9, 2015 at 2:29 AM, Colin Deasy cde...@demonware.net wrote: On Tuesday, 9 June 2015 01:27:24 UTC+1, Feng Xiao wrote: On Mon, Jun 8, 2015 at 7:43 AM, Colin Deasy cde...@demonware.net wrote: Hey, When reading https://developers.google.com/protocol-buffers/docs/proto#simple I