Re: [protobuf] Canonical repository and build toolchain?

2018-09-14 Thread 'Feng Xiao' 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] How to handle options in compiler plugin?

2018-08-31 Thread 'Feng Xiao' 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] Re: Message imports from different locations and stub generation

2018-08-28 Thread 'Feng Xiao' 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 build executable protoc-gen-javalite

2018-08-22 Thread 'Feng Xiao' 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] Importing any.proto in .proto files

2018-08-21 Thread 'Feng Xiao' 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

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

2018-08-21 Thread 'Feng Xiao' 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-20 Thread 'Feng Xiao' 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

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
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] 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] 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] 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] 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] 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. >

[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] 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

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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] "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] 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] 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] 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] 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
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] 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] 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] "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

[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] 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

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] 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] 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] 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* >

[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

[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

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

Re: [protobuf] ParseFromArray always returning true

2017-12-07 Thread &#x27;Feng Xiao&#x27; 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] Status of protobuf-java 2.x / 3.x compatibility

2017-12-05 Thread &#x27;Feng Xiao&#x27; 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] Status of protobuf-java 2.x / 3.x compatibility

2017-12-04 Thread &#x27;Feng Xiao&#x27; 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] Issues identified in version 3.4.0 by security scan

2017-11-15 Thread &#x27;Feng Xiao&#x27; 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] Golang: issues/discussions/pull requests

2017-11-09 Thread &#x27;Feng Xiao&#x27; 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] C++ - Protobuf descriptor static memory leaks

2017-11-09 Thread &#x27;Feng Xiao&#x27; 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] Avoid C++11 warning about switch on proto3 enum w/o default clause?

2017-10-31 Thread &#x27;Feng Xiao&#x27; 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] Avoid C++11 warning about switch on proto3 enum w/o default clause?

2017-10-30 Thread &#x27;Feng Xiao&#x27; 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] Integrate proto2 messages from a device to C#

2017-10-27 Thread &#x27;Feng Xiao&#x27; 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] How to use custom options in official docs

2017-10-25 Thread &#x27;Feng Xiao&#x27; 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] Deserializing of protobf Message from JSON string in C++

2017-10-25 Thread &#x27;Feng Xiao&#x27; 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] Golang: issues/discussions/pull requests

2017-10-24 Thread &#x27;Feng Xiao&#x27; 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] Protobuf well-known types and C++

2017-10-21 Thread &#x27;Feng Xiao&#x27; 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] Best practice for effecting inheritance/polymorphism in proto3

2017-10-19 Thread &#x27;Feng Xiao&#x27; 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] "ParseFromString()" and "JsonStringToMessage()" have inconsistent behavior when parsing an unrecognized enum value.

2017-10-17 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Oct 10, 2017 at 8:15 PM, Qian Zhang wrote: > Note that you can use the always_print_enums_as_ints option to work around >> this problem: > > https://github.com/google/protobuf/blob/master/src/ >> google/protobuf/util/json_util.h#L73 >> > > > With this option enum value will printed as int

Re: [protobuf] "ParseFromString()" and "JsonStringToMessage()" have inconsistent behavior when parsing an unrecognized enum value.

2017-10-10 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Note that you can use the always_print_enums_as_ints option to work around this problem: https://github.com/google/protobuf/blob/master/src/google/protobuf/util/json_util.h#L73 With this option enum value will printed as integers and will be accepted by JsonStringToMessage. On Tue, Oct 10, 2017 a

Re: [protobuf] "ParseFromString()" and "JsonStringToMessage()" have inconsistent behavior when parsing an unrecognized enum value.

2017-10-10 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Oct 10, 2017 at 12:29 AM, Qian Zhang wrote: > Hi, > > I am using protobuf-3.3.0, and I found when parsing an unrecognized enum > value for an optional enum field, the behaviors of "ParseFromString()" and > "JsonStringToMessage()" are different. "ParseFromString()" will succeed and > the f

Re: [protobuf] Is it possible to retrieve an absolute path to a proto-file from a Protoc plugin?

2017-09-25 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Sep 25, 2017 at 5:21 AM, Andrew Pashkin wrote: > Hello, everyone, > > I have a case where I need to read non-Protobuf files that are referenced > from a target proto-file by a relative path. I use this approach to embed > some information in a language different than Protobuf. It seems l

Re: [protobuf] table_driven_parsing option in protobuf 3.4 C++ library

2017-09-18 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Mon, Sep 18, 2017 at 3:13 PM, Todd Lipcon wrote: > Hi folks, > > I noticed that protobuf 3.4 includes the new 'table_driven_parsing' option > for C++ code generation, but can't seem to find any docs about this feature. > > From a quick skim of the code, it seems like the goal here is to reduce

Re: [protobuf] How to get value of protobuf custom option in Java?

2017-09-05 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Suppose you have two .proto files, an options.proto where the extension is defined, and a foo.proto where the custom option is used. If both proto files are actually part of your protoc plugin (i.e., your plugin includes the generated Java class of both .proto files), you should be able to access

Re: [protobuf] Is there any way to add a prefix to canonical name?

2017-08-11 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Fri, Aug 11, 2017 at 1:41 PM, 'Jungho Ahn' via Protocol Buffers < protobuf@googlegroups.com> wrote: > Hello, > > I'm trying to import protos from a third party repo, but they don't have > proper canonical names. > > For example, there is a repo X which has > > a/p1.proto > a/p2.proto with (impo

Re: [protobuf] Re: Compiler error with GCC targeting ARM - Atomic32 vs AtomicWord

2017-08-10 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Aug 10, 2017 at 9:53 AM, Brad Larson wrote: > > > On Wednesday, August 9, 2017 at 1:13:54 PM UTC-5, Feng Xiao wrote: >> >> Hi Brad, can you send your patch as a pull request? It's easier to review >> the diff there. >> > > Hi Feng, thank you for the reply. I really didn't have a fix in m

Re: [protobuf] Re: Compiler error with GCC targeting ARM - Atomic32 vs AtomicWord

2017-08-09 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Hi Brad, can you send your patch as a pull request? It's easier to review the diff there. On Wed, Aug 9, 2017 at 8:27 AM, Brad Larson wrote: > > > On Monday, August 7, 2017 at 1:13:46 PM UTC-5, Brad Larson wrote: >> >> Hello, I'm getting a compiler error when using GCC to target ARM >> platforms

Re: [protobuf] Re: Protobuf on ARM pads integers

2017-08-01 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Aug 1, 2017 at 4:13 AM, Brian Savage wrote: > This problem has reared it's ugly head again. This time, some enums were > changed and it caused a crash in an unrelated message when serialized. > Padding the message with a bool type at the end of the message fixed it. > > It is scary that

Re: [protobuf] Is the Latest Stable Release 3.3.0 or 3.3.2?

2017-07-19 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Jul 19, 2017 at 4:37 PM, wrote: > Hi all, > > I'm a little confused about the release policy of protobuf. > Is the 3.3.0 the current stable release, or is it 3.3.2? > And where can I find the release policy in general? > 3.3.2 is the latest stable release. Basically any version number th

Re: [protobuf] Contribution Guide?

2017-07-18 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Jul 18, 2017 at 7:04 AM, Brian Bustamante wrote: > Hi Adam, > > Who would be the best person to talk about possibly adding support for a > new language to the protobuf compiler? > I have opened a mostly feature complete proto3 PR for F#: > https://github.com/google/protobuf/pull/3378 > We

Re: [protobuf] Where to find Protobuf Javascript tutorial?

2017-07-17 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Sat, Jul 15, 2017 at 8:28 PM, hce h wrote: > Hi, > > We are using javascript for web front end development and we are using the > protobuf to communicate with backend web applications. Currently we are > using GO to do protobuf communication between the backend application > server which runs

Re: [protobuf] A timeout in this test probably indicates a real bug.

2017-07-12 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
The failing test case is: CsharpBootstrapTest.GeneratedCsharpDescriptorMatches This is an known issue. It happens when you use protobuf-cpp-3.3.0.tar.gz which doesn't contain the C# source file for that test case to pass. We fixed the issue in master and you can safely ignore the test failure. On

Re: [protobuf] A timeout in this test probably indicates a real bug.

2017-07-12 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Can you attach the full log file? On Wed, Jul 12, 2017 at 1:27 PM, Sara Quigley wrote: > Hi there, > > I was installing Protocol Buffers and it looks like during my "make > check", the protobuf-test failed. > > /Applications/Xcode.app/Contents/Developer/usr/bin/make check-TESTS > FAIL: protobuf

Re: [protobuf] Need help with compilation of protobuf with a large enum for java

2017-07-11 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Jul 11, 2017 at 5:05 PM, Minimol Thomas wrote: > Thank you Feng for replying. Are there any plans to back port these > changes to 2.6.1 ? Could you please point me to a commit id ? > There isn't any plan to port things back to 2.6.1 at the moment. The change was implemented inside Google

Re: [protobuf] [Java] Proper way to add an item to a List?

2017-07-11 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Jul 11, 2017 at 4:53 PM, Laird Nelson wrote: > I hope this is the right group. > > I've generated a Java API for Helm's Tiller using gRPC and protocol > buffers. You can see the javadocs here: https://microbean. > github.io/microbean-helm/apidocs/index.html Look at the hapi.* packages.

Re: [protobuf] Need help with compilation of protobuf with a large enum for java

2017-07-11 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, Jul 11, 2017 at 1:06 PM, Minimol Thomas wrote: > Compilation of java code generated using protobuf compiler fails giving > the error, "code too large". > We have an enumeration with 6000 values. And the code generated for this > enum is causing the problem. > I would not be able to make a

Re: [protobuf] Re: MessageToJsonString output empty

2017-07-11 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Sun, Jul 9, 2017 at 4:52 AM, hce h wrote: > Let me add more details, here is what I have a test program: > > test.proto: > > syntax = "proto3"; > package test; > > message TestMessage { > string query = 1; > int32 page_number = 2; // Which page number do we want? > int32 result_pe

Re: [protobuf] Compiling protobuf with GOOGLE_PROTOBUF_NO_THREAD_SAFETY macro

2017-07-07 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Fri, Jul 7, 2017 at 1:28 PM, Brad Larson wrote: > > > On Tuesday, July 19, 2016 at 10:15:29 AM UTC-5, Igor Gatis wrote: >> >> I'm using -DGOOGLE_PROTOBUF_NO_THREAD_SAFETY but I'm hitting the >> following errors: >> >> "src/google/protobuf/stubs/atomic_sequence_num.h", line 43: Error: #20: >>

Re: [protobuf] Important!! please help, protoc command not working on linux x86_64

2017-07-06 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Jul 6, 2017 at 6:57 AM, wrote: > Hi All, > I downloaded protoc binary (protoc-3.2.0-linux-x86_64.zip > ) > for linux from https://github.com/google/protobuf/releases > My linux configuration is x86_

Re: [protobuf] Proto compiler creating Strong Type Enum

2017-07-06 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, Jul 5, 2017 at 9:07 PM, Abhi wrote: > Hi > > I am using proto compiler 3.1 and it's a C++ project. > > When I compile my proto Its generating myproto.struct.h file along with > myproto.pb.cc and myproto.pb.h. > I don't think protoc generates .struct.h file. Is it coming from some plugin y

Re: [protobuf] Protobuf Json conversion

2017-07-05 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
You can keep using proto2 (i.e., adding 'syntax = "proto2";' to your existing files). There is a catch though: the JSON support is designed for proto3 and won't work well (or won't work at all) for proto2 only features. If feasible, it might be better to migrate to proto3 to avoid any confusion whe

Re: [protobuf] why not 150

2017-07-05 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
"96 01" is written in hex. 0x96 = 150. On Sun, Jul 2, 2017 at 6:18 AM Jing Lupeng wrote: > > https://developers.google.com/protocol-buffers/docs/encoding#structure > > > >

Re: [protobuf] Unable to compile protobuf files under Ubuntu 16.04

2017-06-29 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
It seems com.github.os72.protocjar only supports 64bit system. On Thu, Jun 29, 2017 at 5:10 AM, wrote: > Hi guys, > > Unfortunate, I have met the following problem - I cannot compile protos > in my scala project. > I use "Protocol Buffer Compiler for Scala - Scala PB". All work correctly > unde

Re: [protobuf] [golang] API provides no way to access unknown extensions

2017-06-27 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
I'm not sure if the go team monitors this mailing group. You might get a better chance to reach them by posting an issue to the golang/protobuf github repo. On Mon, Jun 26, 2017 at 7:49 PM, Josh Humphries wrote: > For messages generates from syntax="proto2" files, there is a way to > access unre

Re: [protobuf] Is the extension registry address still monitored?

2017-06-16 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Fri, Jun 16, 2017 at 11:42 AM, Marc Gravell wrote: > In descriptor.proto, it asks public authors to request extension numbers > (for the DSL) via protobuf-global-extension-regis...@google.com It is monitored, but these emails (one request in about one to two months) can easily be missed as th

Re: [protobuf] Timestamp

2017-05-17 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, May 17, 2017 at 8:10 AM, Leonardo Toledo wrote: > Hi! I am using protobufs but i need to use the version 2 (syntax 2) of > protobufs and at the same time i need to use the a timestamp, but the > examples that i saw they use always the syntax 3 of protobufs. I already > checked the protobu

Re: [protobuf] Re: Porting protobuf to iRTOS

2017-05-17 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Tue, May 16, 2017 at 11:26 PM, Shiva Kumar wrote: > I have even tried using static member class. But in protobuf, namespace > are nested and distributed across files. Mapping them to class will not > work out. Removing the all the namespace is another consideration. Please > suggest is there a

Re: [protobuf] Crosscompiling for AARCH64

2017-05-12 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, May 10, 2017 at 1:21 AM, jebina elsie wrote: > Hi All, > > I'm trying to cross compile the Protobuf 3.3.0 to the 64 bit ARM processor. > > with the configure command > ./configure CC="aarch64-oe-linux-gcc" CXX="aarch64-oe-linux-g++" > CFLAGS="--sysroot=/opt/oecore-x86_64/sysroots/aarch64-

Re: [protobuf] Json Arrays Without Root

2017-05-10 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Wed, May 10, 2017 at 7:51 AM, Wayde Leverington < leverington2...@gmail.com> wrote: > Hi, > > I currently trying to parse a json array to protobuf > using JsonStringToMessage method. > > Example Json: > [ > { > Name:"Bob", > Age:24 > }, > { > Name:"John", > Age:12 > }, >

Re: [protobuf] zigzag encode and zigzag decode invoking undefined behavior

2017-04-25 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
Right now protobuf implementation assumes 2s complement and won't work on any other environments. That's undefined behavior according to C++ standard but in practice it's very unlikely to be a problem. On Tue, Apr 25, 2017 at 5:42 AM, Wolfgang Brehm wrote: > right shifting negative integers is t

Re: [protobuf] binary compatibility between versions 2.x and 3.x

2017-04-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Apr 20, 2017 at 6:01 PM, Scott Sue wrote: > Hi Feng, > > Apologies, what I was meaning was that with the introduction of protobuf > 3.2.0 now, is 3.2.0 binary compatible with protobuf 2.5.0? Or does you > original message reply still hold true? > No, 3.2.0 runtime is not binary compatibl

Re: [protobuf] binary compatibility between versions 2.x and 3.x

2017-04-20 Thread &#x27;Feng Xiao&#x27; via Protocol Buffers
On Thu, Apr 20, 2017 at 3:55 AM, Scott Sue wrote: > Hi Feng, > > Is this still the case considering that 3.2.0 is out that allows the > version number to be used by protoc? > Not sure what you are asking, but 3.0.0 generated code should work with 3.2.0 runtime and 3.2.0 protoc will work with any

  1   2   3   4   5   6   >