Questions tagged [protoc]

protoc is the compiler for .proto files. It generates language bindings for the messages and/or RPC services from .proto files. protoc is a native executable, the scripts under this directory build and publish a protoc executable (a.k.a. artifact) to Maven repositories. The artifact can be used by build automation tools so that users would not need to compile and install protoc for their systems.

taken from google documentation

387 questions
2
votes
1 answer

How to persuade GetProto to spit out proto3 format

Using the excellent ProtobufNet by Marc Gravell, we are able to maintain our types in C# and then export them to .proto files for conversion into all the languages needed by our clients. However we would like to use the proto3 protocol format which…
Mr. Developerdude
  • 9,118
  • 10
  • 57
  • 95
2
votes
1 answer

How to store large buffer/array (char/int) using protocol buffer in cpp...?

Is there any way to store array using google protocol buffer in cpp without using repeated. I need to store and send buffer (of size 640x480x2) consisting image data. Also how to store uint16_t array data using protocol buffer..?
Nikhil K
  • 31
  • 3
2
votes
2 answers

Protobuf field names with numbers are capitalized in a unexpected way

I have a message: message Image { string link_40dp = 1; } After the compilation, in Java, the field name is link40Dp (the first letter after a number is capitalized). But, I am expecting, that the field name would be link40dp (d in lower…
2
votes
1 answer

How to use Protocol Buffers 3 in Ruby?

I'm trying to use Protocol Buffers v3 in Ruby. I'm using standard protoc with the --ruby_out option to generate Ruby source code files from *.proto files. Those generated files have require 'google/protobuf' requirement, so I need to use the…
antonone
  • 2,045
  • 1
  • 25
  • 35
2
votes
0 answers

How to read Bazels binary build event protocol file?

I want to implement fetching of compiler warnings with Bazel (Bazel based build). I know that there are files which can already be used for this. These files are located at: $PROJECT_ROOT/bazel-out/_tmp/action_outs/ and are named stderr-XY. Bazel…
CleanCoder265
  • 574
  • 1
  • 5
  • 22
2
votes
2 answers

protobuf gradle plugin does not compile

I'm trying to compile protobuf files using the gradle plugin, but I get the following error: java.io.IOException: Can't write [/Users/elavi/dev/sdk3/android/showcaseapp/build/intermediates/multi-dex/debug/componentClasses.jar] (Can't read…
ElyashivLavi
  • 1,681
  • 3
  • 22
  • 33
2
votes
1 answer

Protobuf Compilation Issues

I've been trying to run a TensorFlow library and in order to do that I have to compile Protobuf libraries. I'm using the following command: C:\tensorflow-master\tensorflow\models>protoc object_detection/protos/*.proto --python_out=. The following…
singhcpt
  • 61
  • 3
  • 9
2
votes
1 answer

Protobuf field name which contains word "Id" capitalize it to "ID" when generate .pb.swift model

I'm trying to use swift-protobuf: $ protoc --version libprotoc 3.3.0 $ protoc-gen-swift --version protoc-gen-swift 0.9.904 I have Test.proto file, which I need to convert to Test.pb.swift: syntax = "proto2"; message Test { optional int64 TestId…
romanilchyshyn
  • 392
  • 3
  • 15
2
votes
1 answer

protoc generate golang code from two proto files which belong to different package

I have two proto src file, in same folder, let's say: the 1st one is foo.proto syntax = "proto3"; package foo; the second is bar.proto, which need import foo.proto syntax = "proto3"; import "foo.proto"; package bar; you can see they have different…
rmrf100
  • 71
  • 1
  • 10
2
votes
1 answer

Prevent Protobuffer from renaming Fields (Classes, Members, Enum Items)

I am trying to port a project from Google Protocol Buffers 3.0.0-beta-2 to 3.1.0. After recompiling my .proto file I noticed that I had a number of compilation errors with the project due to protoc enforcing a coding standard that I did not choose…
vonludi
  • 419
  • 2
  • 20
2
votes
1 answer

Protobuf: How to use the --encode command on console

When I use the --encode command by the protoc compiler I can type in my input via the standard input (key:value), but it stays in the input mode. I never get any result. How do I get it?
messy
  • 915
  • 6
  • 26
2
votes
1 answer

How to get the method options from protobuf descriptor?

I try to parse the .proto file with the protobuf compiler. But here is a confusing problem that I can't get the options for method. It seems that my options are treated as "unknown fields" but not the options. Is there any way to solve the problem?…
Wizmann
  • 839
  • 1
  • 9
  • 14
2
votes
1 answer

Dart protobuf: what version of protoc should I download?

I am attempting to follow instructions in this article: https://www.dartlang.org/articles/libraries/serialization#protobuf-example Step one is to install protocol compiler. My question is, does it matter which version I download? Do I need to use…
SSS
  • 761
  • 2
  • 9
  • 19
2
votes
1 answer

how to generate java interfaces instead of abstract classes for my service using protocol buffers compiler?

How can I generate java interfaces instead of abstract classes for my service using protocol buffers compiler? Right now I use a Gradle plugin which take .proto files and generates abstract classes for my services instead of interfaces. This can be…
user1870400
  • 6,028
  • 13
  • 54
  • 115
2
votes
1 answer

Dumping protocol-buffers file to stdout to debug/investigate?

I have a .proto file and a pbf (protocol buffers file). Is there anyway I can "dump" the pbf file into some sort of verbose human readable output format? I just want to be able to look inside it and see the data in there. Ideally I'm looking for an…
Amandasaurus
  • 58,203
  • 71
  • 188
  • 248