[protobuf] Re: Why does Protobuf generate outer classes for Java?

2021-07-26 Thread 'Deanna Garcia' via Protocol Buffers
Java protobufs originally only had the option to have the outer class, which is consistent with some other languages' protocol buffers. We decided to add the "multiple files" option for users to have the option. We recommend using the multiple files option in most instances, but continue

[protobuf] Re: undefined reference to `google::protobuf ...`

2022-01-24 Thread 'Deanna Garcia' via Protocol Buffers
If you are just trying to run the examples you shouldn't use the g++ command. Instead, follow the steps in the README , specifically under "Build the example using make".' The g++ command you are trying to run is only to

[protobuf] Re: is thereany Integration possible between aws DynamoDB and protobuff.

2022-01-24 Thread 'Deanna Garcia' via Protocol Buffers
Unfortunately I don't know of any current integration tools, and I don't know much about DynamoDB. I might reach out to the team there to see if they have any ideas or tools you could use. At the very least, you should be able to use a proto serialization method like SerializeToArray

[protobuf] Re: error when reading the config file(protobuf)

2022-01-24 Thread 'Deanna Garcia' via Protocol Buffers
I think this is more likely a TensorFlow question so I would ask there. On Saturday, January 22, 2022 at 4:30:39 AM UTC-8 caixia...@gmail.com wrote: > Hello, everyone, I'm currently trying to retrain the panoptic_deeplab > using custom dataset. However, I got stuck due to the error shown in the

[protobuf] Re: [C++]How to unpack a field of Any with reflction?

2022-01-24 Thread 'Deanna Garcia' via Protocol Buffers
Can you use an Any method, like unpack or getParserForType

[protobuf] Re: Diff and merge functionality in javascript

2022-01-24 Thread 'Deanna Garcia' via Protocol Buffers
Can you use MergeFrom ? On Tuesday, January 18, 2022 at 2:55:01 AM UTC-8 kzwe...@gmail.com wrote: > Hi, > > Is there a way to get a diff and merge that diff into an instance of

[protobuf] Re: typedef in proto3 ?

2022-01-26 Thread 'Deanna Garcia' via Protocol Buffers
We do not support typedefs in protobuf. We would like proto APIs to be as consistent as possible between languages, so we would not add a feature that is so C/C++ specific. If we were to do something like this, it would be a more generic version of type aliasing. See this thread

[protobuf] Re: Parsing Primitives in Python

2022-01-25 Thread 'Deanna Garcia' via Protocol Buffers
I'm not exactly sure what you're trying to do. For more information on how Protobuf parses/serializes messages take a look at this guide . If you're trying to access the fields of a message, you can use the message's

[protobuf] Re: Libraries for iOS/Android with Protobuf support

2022-01-25 Thread 'Deanna Garcia' via Protocol Buffers
Can you use gRPC ? On Tuesday, January 25, 2022 at 5:45:05 AM UTC-8 chris...@gmail.com wrote: > Hello, > > Are there any publicly available libraries for Android and iOS devices, > capable of handling Protobuf messages and communicating with a backend > service? > > There is

[protobuf] Recent changes to Protocol Buffers

2022-05-11 Thread 'Deanna Garcia' via Protocol Buffers
Some recent changes to Protocol Buffers are worth being aware of. First, we’ve changed our versioning scheme to enable more-nimble updates to language APIs in Protocol Buffers. In the new scheme, each language has its own major version that can be incremented independently of other languages. The

[protobuf] Re: How to cross-compile py_proto_library in bazel?

2022-07-20 Thread 'Deanna Garcia' via Protocol Buffers
A few questions to help me debug/reproduce: - Did you write your own cross compilation toolchains? Or what are you using for that? - Can you provide the bazel command that you run (including a .bazelrc if necessary)? - Is your setup working to cross-compile other targets,

[protobuf] Re: proto3: Why setting java_multiple_files = true not creating separate java classes for each proto message?

2022-05-02 Thread 'Deanna Garcia' via Protocol Buffers
The documentation that you copied says: If true, separate .java files will be generated for each of the Java classes/enums/etc. generated for the *top-level messages*, services, and enumerations, and the wrapper Java class generated for this .proto file won't contain any nested

[protobuf] Re: Bytes field between Python and C (Nanopb)

2022-05-02 Thread 'Deanna Garcia' via Protocol Buffers
Bytes fields shouldn't be any different than other fields. You should still be able to get and set the variables as explained in the tutorial . On Thursday, March 31, 2022 at 12:23:55 AM UTC-7 Renaud Piperade wrote: > Hello, >

[protobuf] Re: Trying to construct generated PHP class causes InvalidArgumentException with a message about the class not being found in Descriptor Pool

2022-05-02 Thread 'Deanna Garcia' via Protocol Buffers
This looks similar to this issue . Did you set up protobuf autoloading correctly? On Monday, March 28, 2022 at 4:00:20 AM UTC-7 j...@famly.co wrote: > I'm

[protobuf] Re: best practices for querying a resource

2022-05-02 Thread 'Deanna Garcia' via Protocol Buffers
I think this question is more suited for gRPC, protobuf doesn't have standards about RPC endpoints. On Friday, March 18, 2022 at 3:23:35 PM UTC-7 tyty wrote: > I have a resource called Resturants. There are multiple fields and a few i > want to allow people to query specifically for (Rating

[protobuf] Re: youtube .proto file for deserialising buffers

2022-05-02 Thread 'Deanna Garcia' via Protocol Buffers
The protobuf team doesn't have any input into this decision, as we only opensource the protobuf implementation. On Thursday, March 17, 2022 at 9:01:19 PM UTC-7 jbha...@gmail.com wrote: > Can we get Youtube .proto files so that we can deserialise request and > response buffers for Youtube

[protobuf] Re: google.protobuf.message.DecodeError: Error parsing message with type 'tensorflow.GraphDef'

2022-05-02 Thread 'Deanna Garcia' via Protocol Buffers
If you are not working with protobufs directly and just through tensorflow, you should report this bug to them instead. On Monday, March 14, 2022 at 12:35:02 AM UTC-7 shubhamb...@gmail.com wrote: > I was training the model and saved it, now I am trying to load but unable > to do. I have seen

[protobuf] Re: unable to build protbuf- 2.6.1 artifact on visual studio

2022-05-02 Thread 'Deanna Garcia' via Protocol Buffers
Are you still seeing this error? What version of protobuf are you using? On Tuesday, April 19, 2022 at 8:07:42 AM UTC-7 fredric...@gmail.com wrote: > Did you ever get this sorted out? > I am having similar issues even on linux. > ``` > $ make check > Making check in . > make[1]: Entering

[protobuf] Re: 2GB message limit

2022-05-02 Thread 'Deanna Garcia' via Protocol Buffers
In general, the best ways to get around the message limit are to either split the messages and then recombine them or streaming. See this documentation for more information. Since this is through Tensorflow some of

[protobuf] Re: Been working on this problem for a fortnight, really need help

2022-05-02 Thread 'Deanna Garcia' via Protocol Buffers
I think you should file this bug with tensorflow since you are only using protobufs through them. On Saturday, April 23, 2022 at 10:49:41 AM UTC-7 zjk wrote: > Hi, I am not a direct user of protobuf, I was training my model with > tensorflow using Python, while attempting to save my checkpoint

[protobuf] Re: (C#) Deserializing with a runtime provided .proto schema

2022-05-02 Thread 'Deanna Garcia' via Protocol Buffers
Protobuf doesn't directly support deserialization like this. You could use JsonFormatter to convert to JSON and deserialize from there. Your best option is probably to look into third

Re: [protobuf] Protobuff

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
It's hard for me to answer these questions without more details. I think you should start with the proto documentation and the gRPC documentation. If you have more specific questions, please include the language and version of protobuf and what

[protobuf] Re: Troubleshooting: undefined reference to `google::protobuf

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
3.9.1 is a very old version of protobuf. If it's possible to upgrade to a newer version you would get access to newer features and we can support/debug easier. Is there any reason to stay at 3.9.1? If you change that will it fix the problem? When you say "trying to compile" what command are

[protobuf] Re: PHP protobuf Error

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
The protobuf team does not support `protoc-gen-php`. If you want to use that you should contact the owners of that code. Otherwise, you can follow instructions in the protobuf README to install protobuf. On Tuesday, June 14, 2022 at

[protobuf] Re: Protobuf not building on Ubuntu 21.04

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
Does "protoc --version" give you anything? I can't tell whether this is an installation problem or a cmake problem. Either way if you're still hitting this error you should file an issue on our GitHub. On Thursday, June 2, 2022 at 4:24:21 AM

[protobuf] Re: Get list of all message names

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
In order to use FindAllMessageNames you should be working directly with a DescriptorDatabase. What context are you trying to get all message names? How have you added them to the generated pool? On Monday, May 23, 2022 at 6:45:41 AM UTC-7 Ryan Herbert wrote: > I've been trying to figure out

[protobuf] Re: proto store using kotlin builtin (not java lite)?

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
Unfortunately kotlin does not have it's own serializer implementation yet, so you will have to use java's. On Friday, May 20, 2022 at 11:58:37 AM UTC-7 skols...@gmail.com wrote: > I have a small schema defined and have been using the java lite plugin > generator and a Kotlin implementation

[protobuf] Re: Decode protobuf without proto files

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
Hello, sorry it took a while to get to this. If you're still having this problem I recommend you file an issue in the GitHub repository so we can gather more details and reproduce there. On Friday, May 13, 2022 at 1:19:18 AM UTC-7

[protobuf] Re: Multple same named files from different sources

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
A few questions: - What language is this for? Only PHP protos? - Is there a reason for needing the two distinct proto files? Can you reuse one of them for the other service? - Are you setting the `php_class_prefix` option in your `.proto` file? If not, I think this might be a way

[protobuf] Re: How To Export Compiled Protobuf to Static Library C++

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
In general, we do not recommend distributing generated code. Doing so requires that all users of the code use the same protobuf runtime which can cause unexpected errors if the runtimes don't match. Additionally, these files will not be updated if the `.proto` file is updated which could cause

[protobuf] Re: How to convert YAML to protobuf message in C++ or Python

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
Unfortunately we do not have tooling to support converting to/from YAML. You could do some research to see if there are any third-party solutions or you could write your own (if you do it would be wonderful if you could contribute it to the protobuf repository!) On Monday, June 6, 2022 at

[protobuf] Re: Repeated Field - Add element method.

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
There shouldn't be a case where ->add_member() returns a null pointer. It should be safe to not make the null check. On Tuesday, May 17, 2022 at 12:04:08 PM UTC-7 ashishk...@gmail.com wrote: > When we are constructing an object with repeated field member, we > generally call > auto memberObj =

[protobuf] Re: Is it possible to get the field counts of a message at compile time

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
Unfortunately we don't have tools to access field counts at compile time. In order to do this we would have to increase the size of our generated files which is too big of a tradeoff for us to make. On Friday, May 6, 2022 at 11:27:35 PM UTC-7 yuhui...@gmail.com wrote: > I'm working with

[protobuf] Re: Distribute as librairie/package

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
In general we recommend that you distribute the .proto file itself and not the generated code. As you pointed out, distributing generated code doesn't allow any user to use a different runtime. The wire format is always compatible so it doesn't matter that you are using a different version of

[protobuf] Re: Python protobuf 3.20.1 is missing Any, Empty, and other types

2022-08-01 Thread 'Deanna Garcia' via Protocol Buffers
Your syntax for importing is a bit off, see this file for an example of how to use well known types. The implementation of our well known types is internal since it is an

[protobuf] Re: BUILD.bazel in the src/google/protobuf are not included in the zip file?

2022-09-07 Thread 'Deanna Garcia' via Protocol Buffers
We are currently in the process of increasing our bazel support in the protobuf repository. Unfortunately 3.21.1 was shipped without that bazel file as you can see in the 21.x branch . If you want to use that file you

[protobuf] Re: JavaScript generated code

2022-09-07 Thread 'Deanna Garcia' via Protocol Buffers
As announced in May , JavaScript protobufs are being decoupled from the main repository. Any questions about JavaScript should be directed to the JavaScript repository . On Monday,

[protobuf] Re: Benchmarks payload data

2022-09-07 Thread 'Deanna Garcia' via Protocol Buffers
Unfortunately the protobuf team no longer supports those benchmark tests, docs will be updated accordingly. On Monday, August 29, 2022 at 11:58:22 PM UTC-7 andrey...@googlemail.com wrote: > Hi all, > > Does anyone have the data used in the benchmarks module? The payload data > for

[protobuf] Re: BUILD.bazel in the src/google/protobuf are not included in the zip file?

2022-09-12 Thread 'Deanna Garcia' via Protocol Buffers
The upb branches are created to work together with the protobuf counterparts. The main upb branch needs to utilize the main protobuf branch. The 21.x branch in upb works with the 21.x branch in protobuf. We don't have a date for the next release, we have some more features we are aiming to get

[protobuf] Re: Compatibility concerning "cc_enable_arenas"

2022-09-08 Thread 'Deanna Garcia' via Protocol Buffers
Adding the arenas option is backwards compatible, so that will work for your other usages of the proto file. See this documentation for the answers to your last questions and more info about arenas! On Tuesday, August 30,

[protobuf] Re: Planned Changes for 22.x

2022-08-05 Thread 'Deanna Garcia' via Protocol Buffers
Hi all, A quick follow-up on these changes. Based on feedback we have received, we will *no longer be changing protoc artifact names. *Maven renames will stay the same. The news page has been updated accordingly: https://developers.google.com/protocol-buffers/docs/news/2022-08-03. Please

[protobuf] Protocol Buffers Version 21.5 is Released!

2022-08-09 Thread 'Deanna Garcia' via Protocol Buffers
This version includes the following non-breaking changes: *PHP* - Added getContainingOneof and getRealContainingOneof to descriptor. - fix PHP readonly legacy files for nested messages *Python* - Fixed comparison of maps in Python. You can view the release on GitHub

[protobuf] Re: C++. Reflection. ListFields doesn't contain a bool value which is set on 'false'.

2022-08-02 Thread 'Deanna Garcia' via Protocol Buffers
Do you have/can you make a simple example of this for me to reproduce it? How are you setting the bool to false? Is this proto2 or proto3? In proto3 if you did not qualify your field with "optional", this is unfortunately working as intended

[protobuf] Re: Fill message with oneof data

2022-12-27 Thread 'Deanna Garcia' via Protocol Buffers
What language are you working in? I don't think any copying is necessary, you can just build Msg like you would any other message and set the value of type to m1 or m2. On Friday, December 9, 2022 at 8:40:16 AM UTC-8 aleh@idt.net wrote: > I have protobuf: > message Msg > { > oneof type { >

[protobuf] Re: Conformance tests

2022-12-27 Thread 'Deanna Garcia' via Protocol Buffers
There is some documentation in https://github.com/protocolbuffers/protobuf/blob/main/conformance/README.md. In general, most languages use some of the shared unittests that you found in `src/google/protobuf` and then have a few custom tests of their own. For encoding/decoding, you'd probably

[protobuf] Re: Accessing Custom Options from .desc file

2022-12-27 Thread 'Deanna Garcia' via Protocol Buffers
I think you want to use the FileDescriptorProto , specifically it's options field. On Sunday,

[protobuf] Re: ModuleNotFound issues with Protobuf / Python

2022-12-27 Thread 'Deanna Garcia' via Protocol Buffers
Instead of modifying the imports in the generated code, can you modify the imports in the proto definition? It seems like the most likely cause of this error is that the import paths are incorrect. On Thursday, December 22, 2022 at 10:19:00 PM UTC-8 ryant...@gmail.com wrote: > I have many

Re: [protobuf] tar.gz assets missing from 21.11 release?

2022-12-09 Thread 'Deanna Garcia' via Protocol Buffers
Thanks for this report! We are working on uploading those files now. A warning: those files will no longer be distributed starting at release 22.x. You can read about that change and more upcoming changes here . On Fri, Dec 9,

[protobuf] Protocol Buffers Version 22.0 is Released!

2023-02-16 Thread 'Deanna Garcia' via Protocol Buffers
This version includes a breaking change to C++. C++ has the following breaking changes: - [Cpp] Migrate to Abseil's logging library. (a9f1ea6 ) - [Cpp] proto2::Map::value_type

[protobuf] Re: How to Create Class Use C++ without protoc file

2023-06-13 Thread 'Deanna Garcia' via Protocol Buffers
I don't think I understand your question, code generation is a key part of protobufs (and separate from protoc -- the compiler). You can view our documentation at https://protobuf.dev/ which should provide some more information. On Monday, June 12, 2023 at 9:48:37 PM UTC-7 qiqi tang wrote: >

[protobuf] Re: How do I become a developer and get my bug fix merged?

2023-06-12 Thread 'Deanna Garcia' via Protocol Buffers
A protobuf team member has to manually add a label to mark the PR as safe before tests can be run. I see there are new comments on your PR. Once those comments are resolved, someone will follow up and add the label to run the tests. On Wednesday, June 7, 2023 at 8:34:38 AM UTC-7 Jeff wrote: >

[protobuf] Re: php_protobuf.dll for PHP 8.1.20 VS16 x64?

2023-06-12 Thread 'Deanna Garcia' via Protocol Buffers
Unfortunately we do not publish precompiled binaries for PHP. You can find all our PHP offerings on packagist or PECL . On Sunday, June 11, 2023 at 10:26:54 AM UTC-7 genosmrpg7899 wrote: >

[protobuf] Re: Parse from string returns false

2023-06-16 Thread 'Deanna Garcia' via Protocol Buffers
It's the same situation with integers. If we made this return true then if you did not set the value and attempted to serialize it it would return true. I agree that this behavior isn't optimal, we just don't have a great way around it. On Friday, June 16, 2023 at 5:40:59 AM UTC-7 Krati

[protobuf] Re: error: cannot access CheckReturnValue

2023-06-16 Thread 'Deanna Garcia' via Protocol Buffers
I think you're right that this is likely a problem with guava. Can you try posting a bug in their repo? On Thursday, June 15, 2023 at 6:55:37 PM UTC-7 Kevin Jimenez wrote: > I am trying to install grpc for Android with access to Timestamp. The > generated code generates ok but the project

[protobuf] Re: Parse from string returns false

2023-06-15 Thread 'Deanna Garcia' via Protocol Buffers
In protobuf, we can't store null strings so to denote a string that isn't set we use the empty string. For this reason, the parsing is returning false to tell you that there isn't a field there but as you're seeing will still parse as an empty string. On Wednesday, June 14, 2023 at 1:37:05 AM

[protobuf] Protocol Buffers Version 23.0 is Released!

2023-05-08 Thread 'Deanna Garcia' via Protocol Buffers
You can view the release on GitHub . If you experience any issues with the release, please file a bug or post on the the Protocol Buffers forum