[protobuf] Issue 254 in protobuf: Java: CodedInputStream.readString() creates new String object

2011-02-08 Thread protobuf
Status: New Owner: ken...@google.com Labels: Type-Defect Priority-Medium New issue 254 by stefan.o...@gmail.com: Java: CodedInputStream.readString() creates new String object http://code.google.com/p/protobuf/issues/detail?id=254 Hi, I've had in my java program the use case that a protobuf

[protobuf] Re: Issue 254 in protobuf: Java: CodedInputStream.readString() creates new String object

2011-02-08 Thread protobuf
Comment #1 on issue 254 by david.yu...@gmail.com: Java: CodedInputStream.readString() creates new String object http://code.google.com/p/protobuf/issues/detail?id=254 This is use-case dependent. Using intern isn't always a good thing. See

[protobuf] Re: Circular package import problem

2011-02-08 Thread Ken
I am using protostuff-maven-plugin 1.0.0.M7. Currently I have to put all classes into one big proto file. multiple .proto files can't avoid cross referencing On Feb 7, 10:36 pm, Kenton Varda ken...@google.com wrote: With protoc (the standard compiler), this should produce a simple error.  Since

Re: [protobuf] Re: Circular package import problem

2011-02-08 Thread David Yu
On Tue, Feb 8, 2011 at 8:04 PM, Ken ke.lane@gmail.com wrote: I am using protostuff-maven-plugin 1.0.0.M7. Currently I have to put all classes into one big proto file. multiple .proto files can't avoid cross referencing You're posting in the wrong googlegroups :-) Might wanna file a bug

Re: [protobuf] Circular package import problem

2011-02-08 Thread David Yu
On Tue, Feb 8, 2011 at 6:36 AM, Kenton Varda ken...@google.com wrote: With protoc (the standard compiler), this should produce a simple error. Since Ken said he got StackOverFlow exception, it sounds like he's using some other compiler (not written in C++). Hmm, so protoc doesn't handle

Re: [protobuf] New protobuf feature proposal: Generated classes for streaming / visitors

2011-02-08 Thread Evan Jones
I read this proposal somewhat carefully, and thought about it for a couple days. I think something like this might solve the problem that many people have with streams of messages. However, I was wondering a couple things about the design: * It seems to me that this will solve the problem

[protobuf] Re: Issue 254 in protobuf: Java: CodedInputStream.readString() creates new String object

2011-02-08 Thread protobuf
Comment #2 on issue 254 by stefan.o...@gmail.com: Java: CodedInputStream.readString() creates new String object http://code.google.com/p/protobuf/issues/detail?id=254 Ah, I see. Okay, maybe there is an option to implement an intern() in the generated Builder mergeFrom()-method that I could

Re: [protobuf] New protobuf feature proposal: Generated classes for streaming / visitors

2011-02-08 Thread Evan Jones
On Feb 8, 2011, at 13:34 , Kenton Varda wrote: I handle user messages by passing them as bytes, embedded in my own outer message. This is what I do as well, as does protobuf-socket-rpc: http://code.google.com/p/protobuf-socket-rpc/source/browse/trunk/proto/rpc.proto I guess I was thinking

[protobuf] Re: Issue 254 in protobuf: Java: CodedInputStream.readString() creates new String object

2011-02-08 Thread protobuf
Updates: Status: WorkingAsIntended Comment #3 on issue 254 by ken...@google.com: Java: CodedInputStream.readString() creates new String object http://code.google.com/p/protobuf/issues/detail?id=254 intern() only works well if you have many different strings with the same values.

[protobuf] Issue 255 in protobuf: com.google.protobuf.MessageOrBuilder not resolved in 2.3.0

2011-02-08 Thread protobuf
Status: New Owner: ken...@google.com Labels: Type-Defect Priority-Medium New issue 255 by utkarsh2...@gmail.com: com.google.protobuf.MessageOrBuilder not resolved in 2.3.0 http://code.google.com/p/protobuf/issues/detail?id=255 What steps will reproduce the problem? 1.Maven dependency:

Re: [protobuf] New protobuf feature proposal: Generated classes for streaming / visitors

2011-02-08 Thread Kenton Varda
On Tue, Feb 8, 2011 at 11:23 AM, Evan Jones ev...@mit.edu wrote: Sorry, just an example of why you might want a different protocol. If I've streamed 10e9 messages to disk, I don't want this stream to break if there is some weird corruption in the middle, so I want some protocol that can

[protobuf] Getting the output file name in protoc plugins

2011-02-08 Thread Diwaker Gupta
I'm trying to write a protoc plugin and struggling with a fairly basic task: determining the name of the file to generate the output in. In the 'Generate' method, is there an easy way to determine the output file name from the FileDescriptor object? In particular, for Java output, the protoc