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
internal::WireFormat::WireTypeForField fails to default proto3 repeated fields to packed #493
Comments
It's probably just an oversight. It was only recently that we changed the proto3 default to packed. I think the PR would be welcome! |
Adding @TeBoring as he implemented the new packed behavior. |
Okay. Will get to that on Monday then - will need to psych myself up for implementing my first unit test in C++ ;) |
Okay, I've got a commit here: It's not a pull request, however, as it breaks other tests. It's not clear to me whether that just I can work around this in my C# codegen for the moment. |
The logic for paring proto3 packed repeated primitive fields is not right currently. Packed/Unpacked cannot be compatibly parsed. I will send a PR to fix it. |
It seems too much code relies on the broken behaviour. See issue protocolbuffers#493. Instead, we reimplement MakeTag just for C#, temporarily.
…aling durations (protocolbuffers#453)" (protocolbuffers#493) The change does not handle negative values correctly. This reverts commit 1e59b77.
WireFormat::MakeTag is implemented as:
WireTypeForField
in turn uses this check for "packed-ness":That does not consider a repeated packable field in a proto3 file to be packed by default, whereas
does. I've made that simple change to
WireTypeForField
in my local clone, and can submit a PR if requested - but I don't know whether there's some intended reason for this behaviour.The text was updated successfully, but these errors were encountered: