-
Notifications
You must be signed in to change notification settings - Fork 808
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
Codegen for well-known types #489
Conversation
0b17104
to
df8d44c
Compare
The test failure seems to be a side effect of my decision of how to deal with @stephen, as the originator of the codegen issue, do you have an opinion on how to deal with nullable/non-nullable bytes? |
df8d44c
to
2a46886
Compare
2a46886
to
895e844
Compare
I thought about it some this afternoon, and I decided that Everything looks good finally, would love a review. For your convenience (and mine -- ha!) I split the PR into two commits, one that does the changes and another that contains the regenerated protobufs. Gets rid of a lot of noise. |
895e844
to
cdbe390
Compare
Thanks so much. @jmarais and I will review this and get back to you... |
@virtuald, we're still working through this. We'll let you know when we have some more feedback. |
@virtuald thanks for looking into this! we're pretty excited to see this PR. |
ping? |
@virtuald, @awalterschulze has suggested another test: We have a message with the wktpointer option, and one that is exactly the same, but without wktpointer. Then we make a test that marshals one and unmarshals the other one and vice versa. And check that the marshaled bytes for both are the same. |
Yeah, it's a lot of repetitive code... I actually wrote a python script to help me generate a lot of the conversion code... 😀 I'll take a look next week at adding that test. |
@donaldgraham @awalterschulze isn't that what the tests at https://github.com/gogo/protobuf/tree/master/test/types/combos already does? Sounds like that scenario is already covered. 👍 |
combos are tests for messages with and without generated marshalers and unmarshalers. The test required in this case is more manual. We want to make sure that a message with annotations marshals to exactly the same bytes as a message without wkt annotations. |
Looks like I found time to fix it... tests seem to pass locally, but I'm sure there are things that could be better. Would love a review.