-
Notifications
You must be signed in to change notification settings - Fork 742
Editions support #746
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
Comments
Hi, Mike! We don't really have any channels other than the mailing list, and the GitHub issues/pulls/discussions. Myself and @lipnitsk are the current maintainers of the GitHub repository. I'd be happy to email you if you want to discuss offline, or on this issue is fine? Dave Benson is the original author of protobuf-c and he still pops up on the mailing list from time to time. Ilya and I sort of took over the maintainership of the project about ten years ago and migrated the code from Google Code to GitHub, modernized the build system, etc. If I recall correctly, Dave Benson's original goal was to contribute the protobuf-c code generator and C runtime library to the upstream (Google) protobuf project, but it wasn't accepted and Dave released it as an independent project. It would be great to have more help keeping protobuf-c working with the latest protobuf releases (while still maintaining compatibility with the protobuf versions shipped with Ubuntu LTS / RHEL / Debian stable, etc.), even if we don't necessarily support the latest and greatest features. Thanks! |
I think I figured out what was going on in #711. Would you mind reviewing
8000
a4d0480 and seeing if that's the right way for our CodeGenerator to report that it supports proto2 and proto3, only? Apparently I wasn't replicating the build failures because I was using Basically: uint64_t GetSupportedFeatures() const { return 0; }
Edition GetMinimumEdition() const { return Edition::EDITION_PROTO2; }
Edition GetMaximumEdition() const { return Edition::EDITION_PROTO3; } |
Yep, that's how you tell protoc you don't support editions or proto3-optional. The I don't mind discussing here if you want. Getting editions support for your gencode should be pretty straightforward (especially since you use our C++ plugin framework), the tricky case is runtime reflection and dynamic messages. From what I can tell you do support reflection, but don't do dynamic messages. In that case, the big question is how to pass the appropriate feature settings to the runtime descriptors. The simplest thing would be to embed relevant resolved features into the gencode from your plugin (where we provide access through CodeGenerator). Looking through your code, I noticed the following quirks related to the 2023 features:
|
I don't follow the difference between these two things. protoc-c/main.cc looks like a normal plugin binary, which links in |
Hi, Mike! Thanks for all these details! I will take a closer look at your first message later, but regarding:
I was finding that I don't know why the behavior is different, but that's what made me miss the behavior difference originally, because I was only testing with |
Which APIs are we using are legacy? |
Ah yea sorry, I see what it's doing now :P. The |
This is referring to FieldSyntax. Pretty much every direct inspection of |
Hey folks,
I work on protobuf and wrote a lot of the new editions code. We'd be interested in getting support added to protobuf-c, but it looks like you hit various issues in #711. I also came across https://groups.google.com/g/protobuf-c/c/do1XdobUJxs related to this.
Is there some channel where we can discuss these issues more? I wasn't able to even find an email address to contact maintainers, and the google group seems pretty dead. So this seemed like the best way to reach out :)
Also note: idk if you found this or not, but I wrote up some documentation for plugin owners: https://protobuf.dev/editions/implementation/
The text was updated successfully, but these errors were encountered: