Re: [protobuf] Best practice for effecting inheritance/polymorphism in proto3

2017-10-19 Thread 'Feng Xiao' via Protocol Buffers
On Wed, Oct 18, 2017 at 3:04 PM, Jeff White wrote: > There seem to be 2 techniques to effect pseudo-inheritance/polymorphism. > > oneof: > > message Animal { > string name = 1; > oneof animal_type { > Bird bird = 2; > Dog dog = 3; > } > } > message Bird { > bool ca

Re: [protobuf] Protobuf well-known types and C++

2017-10-21 Thread 'Feng Xiao' via Protocol Buffers
On Sat, Oct 21, 2017 at 4:39 PM, Antonia Elsen wrote: > What is the proper way to include well-known types in proto files? > I'm hoping to use FieldMasks and Any among others. > So far I haven't had any luck. > I've tried importing the proto files and using the namespace in the type > name; > > e

Re: [protobuf] Golang: issues/discussions/pull requests

2017-10-24 Thread 'Feng Xiao' via Protocol Buffers
On Tue, Oct 24, 2017 at 8:12 AM Josh Humphries wrote: > In the past, when I've asked questions in this mailing list or hoped to > discuss details of the protobuf package for Go, I've been pointed to the > Github project. > > And, for some period, I had luck having discussions on Github issues and

Re: [protobuf] Deserializing of protobf Message from JSON string in C++

2017-10-25 Thread 'Feng Xiao' via Protocol Buffers
On Wed, Oct 25, 2017 at 1:46 AM, Giri Guntipalli wrote: > I am also facing similar issue but problem seems to happen only when > library is complied with -O2 or –Os(optimize for size) with gcc tool chain. > > > > looks like extensions are being treated as dead code and removed by gcc > optimizat

Re: [protobuf] How to use custom options in official docs

2017-10-25 Thread 'Feng Xiao' via Protocol Buffers
On Wed, Oct 25, 2017 at 5:38 AM, wrote: > the example in https://developers.google.com/protocol-buffers/docs/ > proto#customoptions below > > message FooOptions { > optional int32 opt1 = 1; > optional string opt2 = 2; > } > > extend google.protobuf.FieldOptions { > optional FooOptions foo_o

Re: [protobuf] Integrate proto2 messages from a device to C#

2017-10-27 Thread 'Feng Xiao' via Protocol Buffers
On Fri, Oct 27, 2017 at 10:16 AM, cleal wrote: > I have to integrate a third part protocol from a gps device, they send me > the .proto files, they are using the schema proto2. > > I should receive the binary messages and I need desarialize it in order to > work with the location data. But I see

Re: [protobuf] Avoid C++11 warning about switch on proto3 enum w/o default clause?

2017-10-30 Thread 'Feng Xiao' via Protocol Buffers
On Mon, Oct 30, 2017 at 9:57 AM, wrote: > Hi all, > > I'm from the Apache Mesos community and we're working on things that uses > proto3. > We usually turn on compiler options to report missing values in switch > statements, > and don't do a "default" clause. This gives us the benefit of capturin

Re: [protobuf] Avoid C++11 warning about switch on proto3 enum w/o default clause?

2017-10-31 Thread 'Feng Xiao' via Protocol Buffers
On Mon, Oct 30, 2017 at 6:19 PM, wrote: > Hi Feng, > > Thanks for answering. > > As suggested by the official documentation: > https://developers.google.com/protocol-buffers/docs/ > reference/cpp-generated#enum > We can handle the unknown enum value through either a `default` clause or > an `if`

Re: [protobuf] C++ - Protobuf descriptor static memory leaks

2017-11-09 Thread 'Feng Xiao' via Protocol Buffers
On Thu, Nov 9, 2017 at 11:53 AM, Arpit Baldeva wrote: > Hi, > > Currently, protobuf generated code makes allocations in the static > descriptor objects. For example, valgrind reports > > >Memcheck:Leak >fun:malloc >fun:_ZN20PassthroughAllocator5AllocEmPKcj >fun:_Znwm >fun:_Z

Re: [protobuf] Golang: issues/discussions/pull requests

2017-11-09 Thread 'Feng Xiao' via Protocol Buffers
Some new updates from go protobuf developers: https://github.com/golang/protobuf/issues/454#issuecomment-343250894 An announcement about this change will be posted in this discussion group soon. On Tuesday, October 24, 2017 at 12:06:22 PM UTC-7, Feng Xiao wrote: > > On Tue, Oct 24, 2017 at 8:12

Re: [protobuf] Issues identified in version 3.4.0 by security scan

2017-11-15 Thread 'Feng Xiao' via Protocol Buffers
Can you create an issue for this on https://github.com/google/protobuf ? On Wed, Nov 15, 2017 at 6:26 AM, wrote: > Tho following 3 issues were flagged by a security scan where we use > Protobuf v3.4.0. Will these be resolved in an upcoming version? > > > 1. Unchecked CString Convertion > > The e

Re: [protobuf] Status of protobuf-java 2.x / 3.x compatibility

2017-12-04 Thread 'Feng Xiao' via Protocol Buffers
On Mon, Dec 4, 2017 at 9:00 AM, Chris Thunes wrote: > > I'm looking at options for moving some applications that currently depend > on protobuf-java 2.5.0 to a more recent version. This is made complicated > by the fact that we have a mixure of internal and external dependencies > (Hadoop & HBase

Re: [protobuf] Status of protobuf-java 2.x / 3.x compatibility

2017-12-05 Thread 'Feng Xiao' via Protocol Buffers
On Tue, Dec 5, 2017 at 1:33 PM, Chris Thunes wrote: > Thanks Feng. It seems like the GeneratedMessage / GeneratedMessageV3 split > introduced between 3.0.0-beta-4 and the 3.0.0 final release caused the > java/compatability_tests suite to start failing when run against 2.5.0 / > 2.6.1 ("java/compa

Re: [protobuf] ParseFromArray always returning true

2017-12-07 Thread 'Feng Xiao' via Protocol Buffers
On Wed, Dec 6, 2017 at 4:39 PM, 'Allen Vicencio' via Protocol Buffers < protobuf@googlegroups.com> wrote: > If all my fields in a protobuf are `optional`, will ParseFromArray ever > return false? I am doing some tests right now, and I am testing two > scenarios: > > >> Person > > optional string n

Re: [protobuf] Protobuf and Golang: How to generate a map string interface using proto3?

2017-12-19 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Dec 19, 2017 at 10:01 AM, wrote: > Hi, I am new in using Protobuf for golang. > > https://github.com/golang/protobuf > > > Using golang Protobuf, within *package **foo*, I created *message > TaskJobEntity* which is a combination of other messages: > > > message TaskJobEntity { > JobEn

[protobuf] Re: [protobuf-team] Protobuf and Abseil in Debian/Ubuntu

2017-12-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
+abseil...@googlegroups.com, +proto...@gogolegroups.com CCed public google groups so László can reply to the group. BCCed internal mailing lists. On Tue, Dec 19, 2017 at 8:24 PM, Josh Haberman wrote: > Hi all, > > I wanted to kick off a conversation about the future of Protobuf and > Abseil/ABS

[protobuf] Re: [protobuf-team] Protobuf and Abseil in Debian/Ubuntu

2017-12-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Dec 20, 2017 at 11:25 AM, Josh Haberman wrote: > Thanks Feng and sorry for the confusion everyone! > > Feng quoted my original email, but I'll repeat it here for clarity. > Hopefully everyone will be able to reply to messages properly this time. :) > > -- > > Hi all, > > I wanted to kick

Re: [protobuf] How to fix “com.google.protobuf.InvalidProtocolBufferException: Cannot find field” thrown from JsonFormat.parser().merge(…)?

2017-12-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
JsonFormat doesn't support extensions. You can replace extensions with google.protobuf.Any if you want to use the proto with JsonFormat. On Wed, Dec 20, 2017 at 3:39 PM, Behrang Saeedzadeh wrote: > > > *down vote**favorite* >

Re: [protobuf] How to fix “com.google.protobuf.InvalidProtocolBufferException: Cannot find field” thrown from JsonFormat.parser().merge(…)?

2017-12-22 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Dec 20, 2017 at 4:18 PM, Behrang Saeedzadeh wrote: > Unfortunately I don't own the actual protocol buffer models and can't > change their definitions. > > What I actually want to do is this: I have a Protocol buffer model in > byte[] format. I want to deserialize it back to Java objects b

Re: [protobuf] Performance for Messages containing big (1...100MByte) binary blobs

2018-01-11 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Jan 11, 2018 at 4:58 AM, wrote: > Thanks for the reply :) > > I was planning to use the "bytes" Proto-Type from the proto3 language > specification (see here: https://developers.google.com/ > protocol-buffers/docs/proto3). > It seems to be suited to transfer binary blobs. > > However in t

Re: [protobuf] Python CPP Implementation

2018-01-16 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Jan 15, 2018 at 4:34 AM, Matthew Heritage < matthew.c.herit...@gmail.com> wrote: > According to the docs, the C++ Python implementation is experimental, but > this has been the case in the docs for 7 years. > Is it really still experimental or are the docs out of date? > A link to the said

Re: [protobuf] Tags and values

2018-01-22 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Jan 22, 2018 at 3:08 PM, Ashwin Kini wrote: > Hi all, > > While defining messages can the *tags *be non continous? The > documentation never mentions the same > > message abc { > optional uint32 xyz = *100*; > optional uint32 def = *200*; > optional unit32 abc = *0xDEAD01*; > > } > > The

[protobuf] protobuf C++ (both runtime and compiler) will require C++11 to build starting from version 3.6.0

2018-01-29 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Hi all, As we have hinted in the last few protobuf releases, protobuf C++ is going to require C++11 to build in a future release, and it was decided version 3.6.0 will be the first release that requires C++11. This means without a C++11 capable compiler, you won't be able to use the latest ver

Re: [protobuf] "unwrap descriptor class before comparison of RepeatedField types" into release

2018-01-30 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Jan 30, 2018 at 3:22 PM, wrote: > Hey, > > I'm trying to get https://github.com/google/protobuf/pull/2519 into a > release - as it was merged into master, I think it's been forgotten! :( > > I've opened https://github.com/google/protobuf/pull/4254 to try and get > the patch into the next

Re: [protobuf] Generating Code With Parent Directory Imports?

2018-01-31 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Jan 31, 2018 at 8:54 AM, Jonnny wrote: > Hello everyone, > > I have a couple of micro-services, and each has couple of proto files. > It's common for one micro-service proto file to reference another service > proto file using import like so: > > import "google/protobuf/struct.proto"; > i

Re: [protobuf] Generating Code With Parent Directory Imports?

2018-01-31 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Jan 31, 2018 at 2:57 PM, Jonnny wrote: > By 'Protobuf Python Library' you mean the Python Package called `protobuf > ? I think It's already included in my package as dependency. But Google > protobuf is just one example. Most people around here using Scala, and they > all have 'scalapb' i

Re: [protobuf] Porting Protocol Buffer Library to Green Hills Integrity

2018-02-07 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Can you create an issue on our github repo? https://github.com/google/protobuf On Wed, Feb 7, 2018 at 4:32 PM, Alex Chen wrote: > I am trying to port the protocol buffer library to Green Hills Integrity > on a PPC platform. When compiling the library, I ran into the following > compiler error: >

Re: [protobuf] Porting Protocol Buffer Library to Green Hills Integrity

2018-02-07 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
I think moving "using RepeatedFieldAccessor::Add" to the parent class RepeatedPtrFieldWrapper might fix the issue. Could you give it a try? If it works, could you also help make a pull request? I don't have a compiler that can reproduce the error you saw. On Wed, Feb 7, 2018 at 4:53 PM, Feng Xiao

Re: [protobuf] Porting Protocol Buffer Library to Green Hills Integrity

2018-02-07 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Feb 7, 2018 at 4:32 PM, Alex Chen wrote: > I am trying to port the protocol buffer library to Green Hills Integrity > on a PPC platform. When compiling the library, I ran into the following > compiler error: > > "..\vendor\protobuf\src\google/protobuf/reflection_internal.h", line 306: > e

Re: [protobuf] Is Any safe to use for java in proto3?

2018-02-08 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Feb 8, 2018 at 12:42 PM, Mark Hoffman wrote: > Hi, > > I have a little concern using the 'Any' type in java due to this message > in the docs: > > *Currently the runtime libraries for working with Any types are under > development*. > > Does anyone know what the status is for production u

Re: [protobuf] Generating a api descriptor proto in bazel for a grpc service

2018-02-08 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Feb 7, 2018 at 7:14 PM, Marquis Taliaferro < marquis.taliafe...@gmail.com> wrote: > Is there a way to generating a api descriptor proto in bazel for a grpc > service. I dont mind writing my own rule but i would prefer not to just > use a genrule for this. What im trying to do is describe

Re: [protobuf] "unwrap descriptor class before comparison of RepeatedField types" into release

2018-02-16 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Fri, Feb 16, 2018 at 2:31 AM wrote: > Sorry to double post, but this has stagnated - please can we get some > movement on this? > Jisi is on vacation and will be back in two weeks. I added him to your pull request. There isn't a concrete timeline for the release though. Patch releases are most

Re: [protobuf] How do I create a field mask for a field of a repeated field?

2018-02-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Sun, Feb 18, 2018 at 9:05 PM Shelley Tong wrote: > Let's say you have a proto defined as the following: > > message Zoo { > repeated Cat cats = 1; > } > > Let's say cat looks like this: > > message Cat { > google.protobuf.StringValue name = 1 > Decimal age = 2; > } > > If I want to

Re: [protobuf] Protocol message had invalid UTF-8 (C++ to Java)

2018-02-26 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Feb 26, 2018 at 5:54 AM wrote: > Hello, > > I'm hoping someone can help me out a bit here.. > > I've developed a C++ GRPC server (Question is protobuf specific though), > that talks with a Java client. The C++ server takes data from an older C++ > API and converts it to protobuf and then

Re: [protobuf] Override equals and hashCode for generated Java code?

2018-02-28 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Protobuf generated classes can't be subclassed. I suggest create a wrapper type and implement the hashCode()/equals() there. To generate one .java file for each message, use "option java_multiple_files = true;" in your .proto file. On Wed, Feb 28, 2018 at 5:41 AM Kaushal Hooda wrote: > Hi, > >

Re: [protobuf] Protocol Buffer + AIDL

2018-03-09 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Fri, Mar 9, 2018 at 1:36 PM, Matt W wrote: > Is it possible to have the generated code implement Parcelable? > No (assuming you are using the official Java implementation). I think you can implement a simple wrapper for this purpose. > My System Service is receiving Events that were serial

Re: [protobuf] Impossible to launch ubuntu unity after protobuf install

2018-03-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Do you happen to install protobuf into /usr instead of the default /usr/local? ubuntu 16.04 comes with a default installation of protobuf library and it's used by unity. Your new installation likely has overridden the default libprotobuf.so and leads to compatibility issues. On Tue, Mar 20, 2018

Re: [protobuf] JSON Serialization Performance

2018-03-22 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Mar 22, 2018 at 8:23 AM, Edward Clark wrote: > Howdy, > > I'm working on a project that recently needed to insert data represented > by protobufs into elasticsearch. Using the built in JSON serialization we > were able to quickly get data into elasticsearch, however, the JSON > serializa

Re: [protobuf] MutableExtension crash in Release only

2018-03-27 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Mar 27, 2018 at 5:24 AM Vylsain wrote: > Hi, > > I'm trying to implement polymorphism with protobuf. I want to have several > levels, each new level extending the previous one. > I have a crash when calling MutableExtension. > > My .proto file looks like : > > > *package aapb;* > > *messa

Re: [protobuf] package com.google.protobuf does not exist error while trying to build ProtoBuf Java component

2018-04-02 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Try following the instructions in examples/README.md and define CLASSPATH properly: https://github.com/google/protobuf/tree/master/examples#java On Sun, Apr 1, 2018 at 10:19 AM Prag Thiru wrote: > Previously I was able to run make all and make java. I did a make clean after > which make java fai

Re: [protobuf] Building with debug symbols?

2018-04-02 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Sun, Apr 1, 2018 at 3:20 AM Aaron Glenn wrote: > Hi, > > I am the next foolish person in line trying to get any version of protobuf > 3.x compiled and tests passing on OpenBSD. Release 3.5.1 compiles without > much fuss but when running tests, a segmentation fault occurs at the start > of Json

Re: [protobuf] Protobuf arena, perfomance

2018-04-06 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Fri, Apr 6, 2018 at 5:02 AM wrote: > Hello, everybody. > I would like to detail some moments about protobuf arena. > In my project there is a structure with ~100 fields. > I compared elapsed time for parse and serialize methods with arena and > without it. > > 1.Arena: > > google::protobu

Re: [protobuf] return to arena (C++)

2018-04-10 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Arena is not supposed to be used as a memory pool. The recommended pattern is to use one arena per rpc request/response. You can tweak that to one arena multiple rpc request/response but the number of messages you want to put into the arena should be limited. It won't work well if you use one arean

Re: [protobuf] Default value not accessible in proto3

2018-04-26 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Apr 26, 2018 at 2:12 AM love sidhu wrote: > Hi, > > This is how my response message is defined in proto file. > > message Response{ > bool isOk = 1; > } > > > When I set this bool value in gRPC server to false, I'm not receiving it > on client side > If you receive an empty Response mess

Re: [protobuf] How to use a different protoc version?

2018-04-27 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Apr 26, 2018 at 6:22 PM elmer wrote: > Hi there, > > When I want use the gRPC and make the C++ files, I got the following error: > > error: This file was generated by an older version of protoc which is > error: incompatible with your Protocol Buffer headers. Please > error: regenerate th

Re: [protobuf] Is proto3 specification still beta?

2018-04-30 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Apr 30, 2018 at 6:37 AM Gary Pennington wrote: > This is probably a silly question, but: > > "Is protocol buffers language 3 a finished specification?" > > At various points on the gRPC pages, e.g.: > https://grpc.io/docs/tutorials/basic/java.html, the text specifically > mentions that "t

Re: [protobuf] Making message reader strict, rejecting non-canonical messages

2018-05-16 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, May 16, 2018 at 7:39 AM Dmitry Timofeev wrote: > Hi, > > I consider if Protocol Buffers can be possibly used in an application that > requires canonical representation of messages coming from external source. > > The encoding and proto3 guide [1, 2] include several requirements for a > pa

Re: [protobuf] Do protoc 3.5.1 and 2.6.1 generate compatible output?

2018-05-22 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, May 22, 2018 at 1:05 PM Tomáš Volf wrote: > We are thinking about switching to newer protocol buffer (current 3.5.1) > but keeping on using proto2 syntax. Under this condition (proto2), does > library created using 3.5.1 generate compatible messages with one compiled > using 2.6.1? > If y

Re: [protobuf] Errors building Protobuf 3.5.1 with Visual Studio 2005

2018-05-29 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, May 29, 2018 at 9:42 AM Eric Pederson wrote: > Hi all: > > I am trying to build Protobuf (3.5.1) using Visual Studio 2005 (I know, > it's ancient, but we are stuck with it for now). I am getting these errors: > > > Compiling... > main.cc > src\google/protobuf/stubs/hash.h(309) : error C2

Re: [protobuf] Proto3 Default Value Conformance

2018-05-29 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, May 29, 2018 at 11:30 AM Cyrus Katrak wrote: > I am implementing a protobuf implementation for a new language and I am > failing the conformance test named: > > > Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT64.ProtobufOutput > > The test input appears to be an optional (no

Re: [protobuf] Re: Strings and Arenas

2018-06-07 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Jun 7, 2018 at 8:01 AM aram wrote: > I am working on the same problem in my project (arena-allocated strings), > and came across this topic. It is 2.5 years old now, so I wonder if > arena-allocated strings or StringPiece class is going to be included in > official protobuf releases any t

[protobuf] Protobuf is moving to its own github organization!

2018-06-19 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Dear Protobuf users, Since 3.0.0 release, we have brought official support for several new languages into protobuf. Due to that growth, we are considering moving the project to its own github organization. This can help us better manage the project and improve the support we provide to the comm

Re: [protobuf] Performance of JsonFormat.printer() for converting proto to json.

2018-06-25 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Jun 25, 2018 at 10:02 AM Jiten Gupta wrote: > Hi, > > I am using google proto and we need to convert proto payload to JSON to > be sent out for monitoring and logging purpose. Size of the payload is > around 10KB. We are using JsonFormat.printer().print for proto to json > conversion. >

Re: [protobuf] Performance of JsonFormat.printer() for converting proto to json.

2018-06-26 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Jun 25, 2018 at 10:19 PM Jiten Gupta wrote: > Hi Feng > > Thanks for quick reply. Is there any alternative to parse proto to JSON > which performance is a concern. > There isn't an official alternative. > > Regards > Jiten > > On Mon, Jun 25, 2018 at 10:51 PM, Feng Xiao wrote: > >> >>

Re: [protobuf] VS2017 issue (#4773/#4679) : seeking advice on workaround

2018-06-29 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
You can use the release version of protobuf as a workaround. The bug doesn't happen in release build. On Wed, Jun 27, 2018 at 1:38 PM John Lilley wrote: > I am starting a POC project involving protobuf, which must work on > Windows. I've run into issues #4773 and #4679. Is there any workaround

Re: [protobuf] Re: Java API: creating message by name

2018-07-09 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Jul 9, 2018 at 2:45 PM John Lilley wrote: > Well, apparently I am really off base. Given a Descriptor I cannot figure > out how to create the right message. I *thought* this was the right > approach: > Descriptors.Descriptor desc = // look up the descriptor > Builder builder = desc.toP

Re: [protobuf] How to workaround enum sibling issue in Java

2018-07-21 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Fri, Jul 20, 2018 at 10:22 PM jiandai via Protocol Buffers < protobuf@googlegroups.com> wrote: > Hi there, > > I am creating a protobuf message to match with a JSON data in legacy > application. The problem is that legacy JSON has mulitple enum data, and > some of them have the same enum name,

Re: [protobuf] Importing any.proto in .proto files

2018-08-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Have you install protocol compiler, i.e., protoc? These protos should be installed along with the protoc binary if you get it from our release page. On Mon, Aug 20, 2018 at 8:13 PM akshay patil wrote: > I am trying to define my own messages representing python classes that I > want to serialize

Re: [protobuf] Importing any.proto in .proto files

2018-08-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Aug 20, 2018 at 9:24 PM akshay patil wrote: > I have protoc installed which I can run via command line. I did install > protobuf using conda and when I check in my site-packages in my python > environment under ` site-packages/google/protobuf ` I do not see any > *.proto files > They are

Re: [protobuf] Importing any.proto in .proto files

2018-08-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
l/src/test/java/com/google/protobuf/util/JsonFormatTest.java#L835 > > Thanks, > Sid > > On Tue, Aug 21, 2018, 10:27 AM 'Feng Xiao' via Protocol Buffers < > protobuf@googlegroups.com> wrote: > >> >> >> On Mon, Aug 20, 2018 at 9:24 PM akshay pa

[protobuf] Re: Protobuf is moving to its own github organization!

2018-08-21 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
The move is complete. Protobuf is now live at the new location: https://github.com/protocolbuffers/protobuf/issues Everything should continue to work (all issues/PRs will be moved, all links will be redirect, git clone with the old location will continue to work). If there are any issues, please

Re: [protobuf] Importing any.proto in .proto files

2018-08-21 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
t;> >>> Can we convert JSON object into Google.protobuf.Any format? If yes, can >>> you provide an example. Thanks for the help. >>> >> Check out the Any unittest examples: >> >> https://github.com/google/protobuf/blob/master/java/util/src/test/j

Re: [protobuf] how to build executable protoc-gen-javalite

2018-08-22 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Can you help creat a github issue for this? On Wed, Aug 22, 2018 at 06:07 Luan Cooper wrote: > Hi > > *We need to build protoc/protoc-gen-javalite ourself, because we changed > some java lite code generate behavior* > > I followed Github C++ Installation Wiki > https://github.com/protocolbuffers

Re: [protobuf] Re: Message imports from different locations and stub generation

2018-08-28 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
I have written some explanation of protoc "-I" flag and import path here: https://github.com/xfxyjwf/protobuf/blob/protoc/docs/protoc.md To run protoc correctly: 1. Determine the import path for every one of your .proto files. In your case, I think it should be "dms/v1/dms.proto" and "metric/prot

Re: [protobuf] How to handle options in compiler plugin?

2018-08-31 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Aug 30, 2018 at 4:14 PM Ankit Patel wrote: > Hi Kenton, > > I am trying to do something similiar. I am writing a java plugin and I > have defined my custom service options and method options but inside my > plugin I see I only have access to FileDescriptorProto and not the > FileDescripto

Re: [protobuf] Canonical repository and build toolchain?

2018-09-14 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
+Nicolas Noble +grpc.io On Fri, Sep 14, 2018 at 7:55 AM Mark Wardle wrote: > Dear all, > > I have used protobuf to define interactions between golang and java > applications. > > It clearly makes sense to create a standalone protobuf repository > independent of the projects in which they are u

Re: [protobuf] Re: Bad data causes segmentation fault in google::protobuf::DescriptorPool::FindFileByName

2014-05-22 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Can you try if the following code can produce any meaningful results? I suggest you try this once in your original binary and then create a simple program calling the following code only (and only linking the .proto file without anything else in your project). If both fail (segfault), it might be a

Re: [protobuf] Re: Bad data causes segmentation fault in google::protobuf::DescriptorPool::FindFileByName

2014-05-22 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Can you post the code of the simple program you used to reproduce the error? (including the .pb.h/.pb.cc or the .proto file) On Thu, May 22, 2014 at 10:58 AM, wrote: > Thank your very much for your answer! The result of > > GOOGLE_PROTOBUF_VERIFY_VERSION; > FeedMessage fm; > LOG(INFO) << f

Re: [protobuf] protobuf 2.5.0 lazy feature

2014-05-27 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, May 26, 2014 at 12:17 AM, Yuexuan Chen wrote: > Hey, guys, >After download the new protobuf 2.5.0 version, i saw a lazy option in > descriptor.proto, is it an already-implemented feature or just an in-plan > feature? > It's already implemented in our internal branch but not included in

Re: [protobuf] Customizing protoc to support an existing wire format

2014-05-27 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
There are two ways to support custom wire format with protobufs. 1. Implement the parsing/serializing code as a runtime library. The text format support in protobuf can be seen as such a library. Support for Json/XML is also done using this approach. It relies on the protobuf reflection support w

Re: [protobuf] Deprecated field annotations in gcc

2014-05-30 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, May 29, 2014 at 5:23 PM, Priyendra Deshwal wrote: > Hey guys, > > It seems like the deprecated field annotations in gcc are no longer > emitted by the protobuf compiler and the following commit removed this > functionality. > > > https://code.google.com/p/protobuf/source/diff?spec=svn425&

Re: [protobuf] Add link to rust protobuf implementation

2014-06-17 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Jun 17, 2014 at 5:46 AM, Stepan Koltsov wrote: > Hi, > > there's a protobuf implementation in Rust and for Rust (I'm the author): > > https://github.com/stepancheg/rust-protobuf/ > > Please, add this link to Third-Party Add-ons page: > https://code.google.com/p/protobuf/wiki/ThirdPartyAdd

Re: [protobuf] Add link to rust protobuf implementation

2014-06-17 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Jun 17, 2014 at 3:50 PM, Robert Edmonds wrote: > 'Feng Xiao' via Protocol Buffers wrote: > > On Tue, Jun 17, 2014 at 5:46 AM, Stepan Koltsov < > stepan.kolt...@gmail.com> > > wrote: > > > > > Hi, > > > > > > there

Re: [protobuf] Possible C++ serialization issue with repeated fields

2014-06-18 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Jun 18, 2014 at 10:10 AM, Justin wrote: > > > On Wednesday, June 18, 2014 12:36:27 PM UTC-4, Ilia Mirkin wrote: > >> On Wed, Jun 18, 2014 at 12:26 PM, Justin wrote: >> > My team and I noticed a potential bug in the serialization process, >> that >> > seems unintended. >> > >> > If I defi

Re: [protobuf] protobuf newbie questions

2014-06-18 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Jun 18, 2014 at 1:04 AM, wrote: > Hi, > I'm new to protobuf library. I have generated a .h and .cc file out of a > sample .proto file by using protoc.exe on windows. > I want to know > 1. Can I use above generated files on MAC without any change? > Yes. > 2. Can I use the same files

Re: [protobuf] protoc-jar, protoc-jar-maven-plugin

2014-06-19 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Jun 18, 2014 at 9:49 PM, wrote: > Hello protobuf folks, > > Here's a simple convenience JAR that packages pre-built protoc binaries > for Linux, Mac/OSX, and Windows. This gives a little bit of "platform > independence" to protoc (besides not having to build it on Linux and Mac). > The pa

Re: [protobuf] protoc-jar, protoc-jar-maven-plugin

2014-06-19 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Done. On Thu, Jun 19, 2014 at 5:58 PM, wrote: > Sure > > *protoc-jar-maven-plugin* is another "Maven Protocol Compiler Plugin", it > could probably go into that section > > *protoc-jar* could be "Multi-platform executable JAR and Java API for > protoc" > > Thanks! > > On Thursday, June 19, 2014

Re: [protobuf] Deserializing Corrupted data

2014-06-23 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Jun 23, 2014 at 4:17 AM, wrote: > Hello, > > I want to know how does protocol buffers handles corrupted data while > de-serializing stream. Is there any way to know if data has been corrupted. > The parsing code only checks whether the data conforms to protobuf wire format and whether th

Re: [protobuf] Re: Portable protobuf compiler

2014-06-23 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Jun 23, 2014 at 6:29 PM, John Calcote wrote: > I'm also interested in a portable protoc compiler - java would be nice, > but python would work too. No one has a comment on this? > osuciu@'s protoc-jar might be of interest to you: https://github.com/os72/protoc-jar > > > On Friday, Janua

Re: [protobuf] Third-party ruby protobuf library

2014-07-30 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Jul 30, 2014 at 8:42 AM, BJ Neilsen wrote: > A few years ago I forked the now unmaintained ruby-protobuf gem and have > built a very robust library that is used in production at companies like > Square, MoneyDesktop, and Lookout. It has rpc support with raw sockets and > zeromq transport

Re: [protobuf] Clearing/Removing Repeated Fields in Python

2014-07-31 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Jul 30, 2014 at 3:12 PM, Russell Holloway wrote: > I have come across an issue not quite sure how to solve in the best way > > Setting a repeated list of strings to an empty list (to start fresh). The > only solution I have > > while True: > try: > object.repeated_list.remove(object

Re: [protobuf] Re: Issue 195 in protobuf: common.h should not have "using namespace std;"

2014-08-05 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Aug 5, 2014 at 4:53 AM, wrote: > > Comment #11 on issue 195 by etienne@gmail.com: common.h should not > have "using namespace std;" > http://code.google.com/p/protobuf/issues/detail?id=195 > > Hello google ! > > I just ran into this "using namespace std;" in common.h... > > Do you guy

Re: [protobuf] Dynamic/run-time decoding

2014-08-12 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Protobuf supports creating message types dynamically at runtime and use them for parsing/serialization/etc. First you need to build up a DescriptorPool that contains all types that you may want to use. T

Re: [protobuf] 2.6.0 release candidate

2014-08-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Hi Robert, Can you help send a patch for this issue to https://codereview.appspot.com/ (and add me as a reviewer)? We'll commit it to svn once it's reviewed. I also pinged stanis...@ochotnicky.com who provided a patch for this issue some time ago.

Re: [protobuf] 2.6.0 release candidate

2014-08-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Aug 20, 2014 at 2:50 PM, Robert Edmonds wrote: > 'Feng Xiao' via Protocol Buffers wrote: > > Hi Robert, > > Can you help send a patch for this issue to > https://codereview.appspot.com/ > > (and add me as a reviewer)? We'll commit it to svn once

Re: [protobuf] Re: Issue 502 in protobuf: protoc generated Java code has numerous javadoc warnings

2014-08-25 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Aug 25, 2014 at 1:18 PM, Chris Berst wrote: > Hello, > I am new to this forum and hope I'm posting properly > Do you know whether 2.6.0 will address the issue of Java 8 javadoc > warnings for GPB 2.5.0 generated code? > We haven't tested protobuf with Java 8. I think these warnings will r

Re: [protobuf] Support multiple parameters for rpc functions

2014-08-25 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
We have discussed this feature request before and the decision is that we won't support it. To achieve what you need, you can define a new message type with all the parameters you need as fields and use this message as the request type. On Mon, Aug 25, 2014 at 8:30 AM, Marvin Somebody wrote: > H

Re: [protobuf] Support multiple parameters for rpc functions

2014-08-26 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Aug 26, 2014 at 2:35 AM, Marvin Somebody wrote: > Can you tell me what's the reason for your decision? > We decided against it because such a feature will complicate proto syntax, API and implementation without bring any true value. > -- > You received this message because you are subs

Re: [protobuf] Python CPP backend bug: cannot import name _net_proto2___python

2014-08-26 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Aug 26, 2014 at 11:03 AM, Dave Hirschfeld wrote: > Hi, > I get the aforementioned error message when trying to use the cpp backend > for python with the new version 2.6.0: > > Python 2.7.5 |Anaconda 2.0.0 (64-bit)| (default, Jul 1 2013, 12:37:52) > [MSC v.1500 64 bit (AMD64)] on win32 >

Re: [protobuf] How to install protobuf 2.6 for python 3?

2014-09-02 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
+Aaron has reported the same issue. Seems there are some issues around google-apputils. Can you help file an issue here: https://github.com/google/protobuf/issues? On Mon, Sep 1, 2014 at 3:03 AM, EARob Agar wrote: > How can I install protobuf 2.6 for use by python 3? Both *pip3 install > proto

Re: [protobuf] Problem with python tutorial - importing protobuf package

2014-09-02 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
'long' is removed from Python 3.x. The code should be fixed to not use long any more. Can you help file an issue on: https://github.com/google/protobuf/issues? On Mon, Sep 1, 2014 at 6:42 AM, Kieran J wrote: > Hi everyone, > > I'm attempting to play around with protobuf but I'm running into som

Re: [protobuf] fixing python protobuf packaging settings on PyPI

2014-09-05 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Sep 3, 2014 at 8:35 AM, Holger Krekel wrote: > Hello, > > There are situations where "pip install protobuf==2.5.0" for installing > the python package fails because in certain configurations it will scrape > the home page and find the "protobuf-2.5.0.zip" source package there but > this i

Re: [protobuf] Third-Party Add-ons for Protocol Buffers

2014-09-05 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Done. Thanks. https://github.com/google/protobuf/wiki/Third-Party-Add-ons On Fri, Sep 5, 2014 at 5:33 AM, Alexey Khokhlov wrote: > Hello Google Team! Could you add to your Wiki page «Third Party Add ons» > link to my repository (https://github.com/alexeyxo/protobuf-objc). It is > used so many

Re: [protobuf] release tarballs on GitHub?

2014-09-05 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Thanks! I didn't notice that we can upload tarballs binding to a release like that. Now you should be able to find the release tarballs on the releases page. BTW, does github support counting the number of downloads for these tarballs? On Fri, Sep 5, 2014 at 12:32 PM, Robert Edmonds wrote: > H

Re: [protobuf] is 2.5.0 wire compatible with 2.4.1

2014-09-08 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Yes, they are wire-compatible. On Mon, Sep 8, 2014 at 10:55 AM, ajay aggarwal wrote: > We are currently using version 2.4.1 and wanted to move to version 2.5.0. > During this transition some components will be running version 2.4.1 and > some version 2.5.0. Is 2.5.0 wire compatible with 2.4.1? T

Re: [protobuf] 2.6.0 - various speed optimizations

2014-09-08 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Sep 8, 2014 at 9:32 AM, hyaticua wrote: > Reading the change log for 2.6.0, the C++ changes describe "Various speed > optimizations". > > Does anyone know what kinds of optimizations were included in the release > or what kind performance we should reasonably expect? I could not find > an

Re: [protobuf] PIP install broken on 2.6.0 (out of date python-dateutil 1.5 dependency)

2014-09-09 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Could you help file an issue here: https://github.com/google/protobuf/issues ? On Tue, Sep 9, 2014 at 9:20 AM, Rich wrote: > PIP install fails since 2.6.0 (released 8/25/14) > > pip install protobuf > Traceback (most recent call last): > File "", line 17, in > File > "/Users/burdon/projects

Re: [protobuf] Dynamic/run-time decoding

2014-09-09 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Sep 8, 2014 at 10:32 PM, Jan Kyjovský wrote: > Hi, > > sorry for delay. I've been experimenting with that eve since I could > return to this issue. Mostly about composition of project since whenever I > try separate your sources from projects and use them individually I§ve been > getting

Re: [protobuf] Dynamic/run-time decoding

2014-09-10 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Sep 9, 2014 at 11:03 PM, Jan Kyjovský wrote: > Variable proto contains some information about structure although > proto.name is blank (don't know why). > You need to set the proto.name yourself: https://github.com/google/protobuf/blob/master/src/google/protobuf/compiler/importer.cc#L147

Re: [protobuf] Dynamic/run-time decoding

2014-09-11 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Sep 10, 2014 at 10:23 PM, Jan Kyjovský wrote: > Hi, >> > > Thank you that was one thing I tried but was not successful up until now. > Also one more issue was that i had to ask for type by full name. It took me > some time to figure it our. > > Now I got different sort of questions. Since

<    1   2   3   4   5   6   >