[protobuf] Re: Issue 188 in protobuf: protobuf fails to link after compiling with LDFLAGS=-Wl,--as-needed because of missing -lpthread

2010-12-22 Thread protobuf
Comment #31 on issue 188 by xarthisius.kk: protobuf fails to link after compiling with LDFLAGS=-Wl,--as-needed because of missing -lpthread http://code.google.com/p/protobuf/issues/detail?id=188 For comparison, the Free Software Foundation has... I've contributed to several FSF projects in

[protobuf] Re: Reducing code size of protocol buffers

2010-12-22 Thread Tim Turner
This is C++. I had not tried optimizing for CODE_SIZE. I understood that CODE_SIZE was the precursor to and not as compact as LITE_RUNTIME. Yes, I believe they are tag numbers, the enumeration-style numbering of each possible response or request. -- You received this message because you are

[protobuf] Re: Issue 188 in protobuf: protobuf fails to link after compiling with LDFLAGS=-Wl,--as-needed because of missing -lpthread

2010-12-22 Thread protobuf
Comment #32 on issue 188 by ken...@google.com: protobuf fails to link after compiling with LDFLAGS=-Wl,--as-needed because of missing -lpthread http://code.google.com/p/protobuf/issues/detail?id=188 It looks like our CLA form may in fact be broken. :( I'll try to get it fixed. I'm as

Re: [protobuf] Sorting Protocol Buffers with Hadoop MapReduce

2010-12-22 Thread Kenton Varda
Hmm, you might want to consider parsing both messages into DynamicMessages (or into the generated message classes if you have them compiled in) and then using a protobuf-reflection-based algorithm (not to be confused with Java reflection; see Message#getField()). Your current code is very much

Re: [protobuf] Why not allow null values in Java for scalar types?

2010-12-22 Thread Kenton Varda
There are problems with this: 1) Boxing and unboxing primitives is relatively expensive, compared to just passing them as primitives. If performance matters to you at all (and for many protobuf users, it does), you probably don't want this. 2) If you accept messages from untrusted sources, your

Re: [protobuf] ambiguous Builder errors when compiling a Maven project

2010-12-22 Thread Kenton Varda
I've never seen this error. It doesn't make much sense -- protobuf generated code should not contain any imports. Are you modifying the generated code in some way? On Sun, Dec 19, 2010 at 11:47 PM, Xiao Ling bardm...@gmail.com wrote: Hi All, I have a generated protobuf java file which

[protobuf] Re: Issue 188 in protobuf: protobuf fails to link after compiling with LDFLAGS=-Wl,--as-needed because of missing -lpthread

2010-12-22 Thread protobuf
Comment #33 on issue 188 by ken...@google.com: protobuf fails to link after compiling with LDFLAGS=-Wl,--as-needed because of missing -lpthread http://code.google.com/p/protobuf/issues/detail?id=188 The issue should be fixed now. Sounds like it's too late, though. :( -- You received this

Re: [protobuf] ambiguous Builder errors when compiling a Maven project

2010-12-22 Thread Xiao Ling
You're right. There is no imports in the code. The message was printed out by maven. As said, the file compiles ok by its own. Here is the situation: I have both scala and java code in my project. As long as there is some scala code calls the protobuf code (which is in java), the

Re: [protobuf] Reading and writing multiple messages to a file

2010-12-22 Thread Kenton Varda
You can only have one CodedInputStream wrapping a ZeroCopyInputStream at a time, otherwise they will confuse each other with buffering conflicts. CodedInputStreams are cheap to construct, so you can just make one on the stack in a block, like: { CodedInputStream

Re: [protobuf] ambiguous Builder errors when compiling a Maven project

2010-12-22 Thread Kenton Varda
Sorry, I don't know how the scala plugin works. It sounds like it has a bug. Perhaps it generates its own code based on the Java code, and somehow that code ends up broken given this particular input... On Wed, Dec 22, 2010 at 4:39 PM, Xiao Ling bardm...@gmail.com wrote: You're right. There

Re: [protobuf] ambiguous Builder errors when compiling a Maven project

2010-12-22 Thread Xiao Ling
I agree. I'm going to ask the maven-scala-plugin guys then. Thanks, --Xiao On Wed, Dec 22, 2010 at 4:53 PM, Kenton Varda ken...@google.com wrote: Sorry, I don't know how the scala plugin works.  It sounds like it has a bug.  Perhaps it generates its own code based on the Java code, and