I previously neglected to Include the error message I was getting:

ERROR,
test=Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.UINT64.ProtobufOutput:
Response didn't have any field in the Response. request=protobuf_payload: "
\271` \377\377\377\377\377\377\377\377\377\001 \000"
requested_output_format: PROTOBUF message_type:
"protobuf_test_messages.proto3.TestAllTypesProto3", response=

I now suspect the issue is actually related to my [incomplete] handling of
one_ofs+default values, and is entirely unrelated to the thing this
particular conformance test is checking. When the result of the conformance
test is the empty byte array, my implementation does not serialize that
field on the wire and the one_of ConformanceResponse.result has no field
set.

Thanks for the quick reply!

On Tue, May 29, 2018 at 1:54 PM, Feng Xiao <xiaof...@google.com> wrote:

> On Tue, May 29, 2018 at 11:30 AM Cyrus Katrak <ckat...@slack-corp.com>
> wrote:
>
>> I am implementing a protobuf implementation for a new language and I am
>> failing the conformance test named:
>>
>> Required.Proto3.ProtobufInput.RepeatedScalarSelectsLast.
>> UINT64.ProtobufOutput
>>
>> The test input appears to be an optional (non-repeated) field that
>> appears multiple times on the wire, with the last occurrence having a value
>> of zero (the default value for the field).
>>
>> The expected test output appears to be the same field, appearing once on
>> the wire, with a value of zero.
>>
>> I am confused why this is the expected output given the Langauge Guide
>> for proto3 states:
>> > Also note that if a scalar message field is set to its default, the
>> value will not be serialized on the wire.
>>
>> Any clarification would be much appreciated!
>>
> The conformance test specifies output in text format, but it does not
> compare your output against the text format directly. Instead, it will
> parse the text data into proto, and serialize it again. In this case, your
> output will be compared to an empty byte array and your implementation has
> failed this test.
>
>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Protocol Buffers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to protobuf+unsubscr...@googlegroups.com.
>> To post to this group, send email to protobuf@googlegroups.com.
>> Visit this group at https://groups.google.com/group/protobuf.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to