-
Notifications
You must be signed in to change notification settings - Fork 811
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
merge: handle reflect.Array
#146
Conversation
This isn't totally right yet. |
gogoprotobuf does not currently support Clone But I guess we can start with a test for something that does not work and a fix for that specific issue. |
@awalterschulze ok, so you need me to add a test? Can do. |
@awalterschulze I changed the Uuid type to a |
@@ -1,122 +0,0 @@ | |||
// Extensions for Protocol Buffers to create more go like structures. |
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.
What is this?
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 replaced this file with a symlink to the canonical one.
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.
Ok so what happens when someone checks out this repo in windows?
I will try to check out this pull request and check out which panics you are getting asap. |
I found the panics, I suspect there is just something wrong your customtype implementation of Uuid. |
Yeah, I'm stuck. I tried using a different type, and I no longer get panics, but JSON tests are failing because the jsonpb code is unable to handle non-generated structs. Here's my branch https://github.com/tamird/gogoprotobuf/commits/customtype-array I'd appreciate some help here :( I also noticed that there are no tests exercising |
Yes the reason I say I don't support proto.Clone is because I did not write the tests. |
I am just trying to make and it breaks. |
I checked out the wrong branch, my bad. |
This is one way to make it work
|
But it looks like there is no code to handle a struct as a customtype in the json marshal code. |
Ok there is quite a bit of work to do to make this work :(
|
So this is definitely worth logging an issue. |
Logged #147 |
Cool Thank you |
For now I've just removed all the problematic calls to |
Ok cool, then I can properly fix this when I have more time. |
Ha, yeah, we're going to avoid that for now :) |
I am guessing you found another solution. I am closing this, but please comment if I should reopen. |
We wrote a wrapper that panics if you try to clone a structure that contains an array. Not ideal! |
Ok well the issue #147 is still open. So we are both still waiting for a proper fix for proto.Clone |
@awalterschulze this currently falls down if you use a
customtype
which contains an array.