Skip to main content

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.

protoc
0 votes
0 answers
18 views

CMake: find_package(protobuf) / protobuf-generate with only protoc available

I would like to use the protobuf_generate_python CMake function (see here) to generate some python files from my .protos. I only have the downloaded protoc-binary and the includes available (no ...
energetic's user avatar
  • 897
0 votes
1 answer
51 views

error TS2345: Argument of type `'ISchoolService' `is not assignable to parameter of type `'ServiceDefinition<UntypedServiceImplementation>'`

I generate grpc Typescript code with: "proto": "npx grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc/client --grpc_out=./grpc/client --plugin=protoc-gen-grpc=`which ...
khteh's user avatar
  • 3,734
0 votes
0 answers
21 views

Hit `<foo>_pb.js` does not provide an export named `'<foo>'` syntax error

I generate proto js files with: npx grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc/client --grpc_out=grpc_js:./grpc/client --plugin=protoc-gen-grpc=`which ...
khteh's user avatar
  • 3,734
0 votes
1 answer
22 views

oneOf in protobuf descriptor due to optional fields

I have encountered strange protobuf-java behavior. If I have a message with optional fields message SearchRequest { optional string query = 1; optional int32 page_number = 2; optional int32 ...
Lukas's user avatar
  • 14.1k
0 votes
0 answers
15 views

`grpc_tools_node_protoc` generated code does not build for `--moduleResolution=nodenext`

My Node.JS project uses --moduleResolution=nodenext. Code generation script: "proto": "npx grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc/client --grpc_out=grpc_js:....
khteh's user avatar
  • 3,734
0 votes
0 answers
59 views

How to introspect a protoc plugin? (Or fix the gen-bq-schema plugin)

I think the entire problem is hard to answer without further investigation. So first I simply want to know how to introspect the problem. Problem Overview I use the protoc-gen-bq-schema plugin to ...
Mike Williamson's user avatar
0 votes
2 answers
61 views

generating proto file for reactjs with protoc command show error: 'protoc-gen-js' is not recognized

i want generate a proto file for reactjs this is the commands I tested: protoc --js_out=import_style=commonjs,binary:. --grpc-web_out=import_style=commonjs,mode=grpcwebtext:. *.proto protoc -I=. ./...
sianami's user avatar
  • 979
-1 votes
0 answers
70 views

gradle not able to detect protoc compiler in windows platform

I have a gradle project. There are some sub projects under the root project. I have proto files defined in some of the subprojects. I am trying to build the project using gradle. Even though protoc is ...
Babu Reddy H's user avatar
0 votes
0 answers
35 views

How to integrate custom protoc plugin with bazel?

I wrote a protoc plugin to generate custom .h and .cpp files, it works well in command-line. protoc --plugin=protoc-gen-foo=plugin_foo.py --foo_out=output bar.proto My project is build with bazel, ...
Ginakira's user avatar
0 votes
0 answers
95 views

Protoc Installed Using Vcpkg Gives Error "Option Verification Unknown" When Using Gtfs-Realtime.proto

I got Option verification unknown error when running: protoc --cpp_out=. gtfs-realtime.proto or when running: protoc -I=. --cpp_out=. gtfs-realtime.proto gives the same error. These commands are ...
cjjones's user avatar
0 votes
0 answers
11 views

‘service’ has not been declared in 'namespace’

I made this simple proto file and compiled it with protoc(3.19.6). But when i checked the pb.h i couldn't find Calculator declared in helloworld(namespace). What should i do? i need to use "using ...
hanover's user avatar
0 votes
0 answers
37 views

Add option optimize_no_pack to C Protocol Buffer

I'm trying to modify the C Protocol Buffer (Protoc-C) to support a few options, one of which is optimize_no_pack. When optimize_no_pack is enabled, Protocol Buffers uses the non-packed encoding for ...
shjnlee's user avatar
  • 243
0 votes
1 answer
94 views

When I build a GRPC solution the MSBUILD cannot resolve the appropriate toolchain on Mac OSX

I'm literally going crazy: I can't build any GRPC project any more and I can't find a solution. When I run the build command (dotnet build) I receive the following error: mr@bogobox GrpcLab % dotnet ...
Lord of the Goo's user avatar
0 votes
0 answers
337 views

runtime_version.h file not found when trying to run libfuzzer with libprotobuf-mutator

I have a file calc.cc #include <cassert> #include <climits> #include <cmath> #include "ast.pb.h" #include "src/libfuzzer/libfuzzer_macro.h" int eval(const ast::...
dell's user avatar
  • 5
0 votes
1 answer
199 views

--pyi_out: protoc-gen-pyi: Plugin failed with status code 1

I'm trying to run this command in docker: RUN python -m grpc_tools.protoc -I ./ --python_out=. --pyi_out=. --grpc_python_out=. my.proto and seeing this error: 0.423 protoc-gen-pyi: program not found ...
Scott's user avatar
  • 5,550

15 30 50 per page
1
2 3 4 5
28