-
Notifications
You must be signed in to change notification settings - Fork 496
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
Generate protobufs ourselves using protobuf-net.Reflection #686
Conversation
The DefaultValue bug has been fixed (protobuf-net/protobuf-net#516) but I have no idea if/when that code will be released. I guess compiling protobuf-net ourselves (without any custom patches) wouldn't be so bad... |
With these change, |
Codecov Report
@@ Coverage Diff @@
## master #686 +/- ##
=======================================
Coverage 22.44% 22.44%
=======================================
Files 96 96
Lines 9674 9674
Branches 817 817
=======================================
Hits 2171 2171
Misses 7370 7370
Partials 133 133
Continue to review full report at Codecov.
|
The flip side is that enum values have exactly the same name as in the protobuf, so many are now This PR now relies on protobuf-net/protobuf-net#518. |
@@ -1,21 +1,21 @@ | |||
enum GCProtoBufMsgSrc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file changed for no reason (line endings I assume?)
This also affected the csv file and the powershell script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only moved the files... possibly something in my git install tweaked the line endings?
This looks like it achieves the same result as my patch approach, except by extending protobuf.net, so that's good. The only missing change would be forced default to proto2 version, instead of leaving it null, I am unsure if this actually affects any of the generated output. |
Co-Authored-By: Pavel Djundik <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this by running SteamDB, it builds and runs as expected.
Tested and verified that |
Another approach to #628.
This assumes/ignores the
[DefaultValue]
problem. I think if we can get that upstreamed, this will be fine.Note that:
proto2
orproto3
" warning.[Serializable]
EnumPassthru
, though I don't know if that is still needed or not.