Description
plugin.proto describe the messages to interact with protoc
as a plugin but the feature doesn't seem to be fully accessible from C#.
Here are the steps I tried:
-
Using the file directly: Impossible, C# doesn't support proto2
-
Using the file converted to proto3: Doesn't work as it tries to reference
global::Google.Protobuf.Reflection.FileDescriptorProto
that isn't accessible. -
Converting descriptor.proto and compiling it too:
Descriptor.cs
doesn't build as it reference internals that aren't accessible likeCustomOptions.Empty
(protoc does special generation when it see Descriptor.proto) -
Avoid protoc special casing (Changing the folder of
descriptor.proto
): Now it works and writing a basic plugin is possible. But we lost the magic introduced in Low-level support for custom options in C# #2317 so custom options aren't usable at all (And can't be hacked around as it relies on extensions and they aren't supported).
I don't see any way to make it work with google version of C#/protobuf 😢 but maybe i'm missing something ?
Activity