jaegertracing / docker-protobuf

An all-inclusive protoc Docker image for the Jaeger project
https://hub.docker.com/r/jaegertracing/protobuf
Apache License 2.0
93 stars 35 forks source link

Get C# to working #14

Closed Falco20019 closed 4 years ago

Falco20019 commented 4 years ago

Summary

As of now, proto-gen-csharp can not be used because google/api/annotations.proto, gogoproto/gogo.proto and protoc-gen-swagger/options/annotations.proto are not created but necessary for reflection (which can't be removed).

gogoproto/goto.proto can't be generated in C# since it's using proto2 syntax which only got added with Protocol Buffers v3.11.0 which was available starting gRPC v1.27.0. This docker currently targets 1.26.0.

Steps to Reproduce

Add the following to the proto target:

    $(PROTOC) \
        $(PROTO_INCLUDES) \
        --csharp_out=internal_access,base_namespace:${PROTO_GEN_CSHARP_DIR} \
        gogoproto/gogo.proto

What do you see now?

--csharp_out: gogo.proto: C# code generation only supports proto3 syntax
Makefile:70: recipe for target 'proto' failed
make: *** [proto] Error 1

What do you want to see instead?

The files should be generated to proto-gen-csharp.

How do you propose to implement this?

I will update the Dockerfile to use the latest set of versions.

Can you do this yourself and submit a Pull Request?

I will create a PR myself.