Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create a full protoc plugin in C# #3487

Closed
vbfox opened this issue Aug 14, 2017 · 1 comment
Closed

Can't create a full protoc plugin in C# #3487

vbfox opened this issue Aug 14, 2017 · 1 comment
Assignees
Labels

Comments

@vbfox
Copy link

vbfox commented Aug 14, 2017

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:

  1. Using the file directly: Impossible, C# doesn't support proto2

  2. Using the file converted to proto3: Doesn't work as it tries to reference global::Google.Protobuf.Reflection.FileDescriptorProto that isn't accessible.

  3. Converting descriptor.proto and compiling it too: Descriptor.cs doesn't build as it reference internals that aren't accessible like CustomOptions.Empty (protoc does special generation when it see Descriptor.proto)

  4. 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 ?

@vbfox vbfox changed the title Can't create a full compiler plugin in C# Can't create a full protoc plugin in C# Aug 14, 2017
@BSBandme BSBandme added this to Backlog in Fixit Q4`17 (P2 Bugs) via automation Dec 11, 2017
@BSBandme BSBandme added the c# label Dec 11, 2017
@BSBandme BSBandme removed this from Backlog in Fixit Q4`17 (P2 Bugs) Dec 11, 2017
@anandolee anandolee assigned jskeet and unassigned anandolee Sep 1, 2022
@anandolee
Copy link
Contributor

anandolee commented Sep 1, 2022

Close it for clean up and we assume the issue is out of state. Feel free to reopen if it is still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants