Skip to content
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

Failing ValidDataRepeated.*.PackedInput conformance tests #23

Closed
garyp opened this issue Mar 24, 2020 · 0 comments · Fixed by #69
Closed

Failing ValidDataRepeated.*.PackedInput conformance tests #23

garyp opened this issue Mar 24, 2020 · 0 comments · Fixed by #69
Labels
bug Something isn't working
Milestone

Comments

@garyp
Copy link
Collaborator

garyp commented Mar 24, 2020

These conformance tests fail on both JVM and JS, so most likely it's a bug in the pbandk code:

Required.Proto3.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataRepeated.INT32.PackedInput.ProtobufOutput
Required.Proto3.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.ProtobufOutput

The relevant conformance failure logs are:

ERROR, test=Required.Proto3.ProtobufInput.ValidDataRepeated.INT32.PackedInput.ProtobufOutput: Output was not equivalent to reference message: added: repeated_int32[8]: 0
added: repeated_int32[9]: 0
added: repeated_int32[10]: 0
added: repeated_int32[11]: 0
added: repeated_int32[12]: 0
added: repeated_int32[13]: 0
added: repeated_int32[14]: 0
added: repeated_int32[15]: 0
. request=protobuf_payload: "\372\001)\000\271`\271\340\200\000\271\340\200\200\200\200\200\200\000\377\377\377\377\007\200\200\200\200\370\377\377\377\377\001\200\200\200\200 \377\377\377\377\037" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=protobuf_payload: "\372\001)\000\271`\271`\271`\377\377\377\377\007\200\200\200\200\370\377\377\377\377\001\000\377\377\377\377\377\377\377\377\377\001\000\000\000\000\000\000\000\000"
ERROR, test=Required.Proto3.ProtobufInput.ValidDataRepeated.UINT32.PackedInput.ProtobufOutput: Output was not equivalent to reference message: added: repeated_uint32[7]: 0
added: repeated_uint32[8]: 0
added: repeated_uint32[9]: 0
added: repeated_uint32[10]: 0
added: repeated_uint32[11]: 0
added: repeated_uint32[12]: 0
added: repeated_uint32[13]: 0
added: repeated_uint32[14]: 0
added: repeated_uint32[15]: 0
added: repeated_uint32[16]: 0
added: repeated_uint32[17]: 0
added: repeated_uint32[18]: 0
added: repeated_uint32[19]: 0
. request=protobuf_payload: "\212\002\037\000\271`\271\340\200\000\271\340\200\200\200\200\200\200\000\377\377\377\377\017\200\200\200\200 \377\377\377\377\037" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=protobuf_payload: "\212\002\037\000\271`\271`\271`\377\377\377\377\017\000\377\377\377\377\017\000\000\000\000\000\000\000\000\000\000\000\000\000"
ERROR, test=Required.Proto3.ProtobufInput.ValidDataRepeated.BOOL.PackedInput.ProtobufOutput: Output was not equivalent to reference message: added: repeated_bool[3]: false
added: repeated_bool[4]: false
added: repeated_bool[5]: false
. request=protobuf_payload: "\332\002\006\000\001\316\302\361\005" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=protobuf_payload: "\332\002\006\000\001\001\000\000\000"
@garyp garyp added the bug Something isn't working label Mar 24, 2020
@garyp garyp added this to the 1.0 milestone Apr 24, 2020
garyp added a commit that referenced this issue Aug 11, 2020
* Rewrote JSON support to better implement the proto3 JSON spec. This
includes support for the `json_name` protobuf option.

* Added `JsonConfig` class that can be used for configuring JSON
marshalling/unmarshalling at runtime. Currently supported configuration
includes `ignoreUnknownFieldsInInput`, `outputDefaultValues`, and
`outputProtoFieldNames`, which match the options described at
https://developers.google.com/protocol-buffers/docs/proto3#json_options.

* Got rid of the need for projects using `pbandk` to use the
`kotlinx-serialization` gradle plugin and add a dependency on the
`kotlinx-serialization` library. The library is now an internal
implementation detail of `pbandk`.

* Moved all of the binary marshalling functionality and most of the
binary unmarshalling functionality from the generated code to the
runtime library.

* Added `protoMarshal(OutputStream)`, `protoUnmarshal(InputStream)`, and
`protoUnmarshal(ByteBuffer)` overloads on the JVM.

* Fixed some bugs with handling of `packed` fields, marshalling
of enums in Javascript, and base64 encoding/decoding in Javascript.

Breaking API changes:

* Changed `Message` so that it no longer needs to extend from itself.

* Added `@PbandkInternal` and `@PublicForGeneratedCode` annotations on
relevant portions of the public API that are only public for pbandk's
internal use.

* The below methods are now defined as extension methods rather than
being part of the `Message` interface. Code that calls these methods
will now need to import them first.

    * `Message.jsonMarshal()`
    * `Message.Companion.jsonUnmarshal(String)`
    * `Message.protoMarshal()`
    * `Message.Companion.protoUnmarshal(ByteArray)`

* These two method overloads:

    * `Message.jsonMarshal(kotlinx.serialization.json.Json)`
    * `Message.Companion.jsonUnmarshal(kotlinx.serialization.json.Json, String)`

    have been replaced with:

    * `Message.jsonMarshal(pbandk.json.JsonConfig)`
    * `Message.Companion.jsonUnmarshal(String, pbandk.json.JsonConfig)`

* These two method overloads:

    * `Message.protoMarshal(pbandk.Marshaller)`
    * `Message.Companion.protoUnmarshal(pbandk.Unmarshaller)`

    have been replaced with:

    * `Message.marshal(pbandk.MessageMarshaller)`
    * `Message.Companion.unmarshal(pbandk.MessageUnmarshaller)`

* Replaced `Marshaller` and `Unmarshaller` interfaces with
`MessageMarshaller` and `MessageUnmarshaller`, which are much simpler
and function differently from the previous interfaces.

* Removed `Sizer` and `Util` from the public API.

* Removed `UnknownField` constructors and the `UnknownField.size()`
method from the public API.

* `MessageMap.entries` is now a `Set` instead of a `List`.

Fixes #23, fixes #61. Portions of the proto3 JSON spec that still need
to be implemented are tracked in #72.
garyp added a commit that referenced this issue Aug 12, 2020
* Rewrote JSON support to better implement the proto3 JSON spec. This
includes support for the `json_name` protobuf option.

* Added `JsonConfig` class that can be used for configuring JSON
marshalling/unmarshalling at runtime. Currently supported configuration
includes `ignoreUnknownFieldsInInput`, `outputDefaultValues`, and
`outputProtoFieldNames`, which match the options described at
https://developers.google.com/protocol-buffers/docs/proto3#json_options.

* Got rid of the need for projects using `pbandk` to use the
`kotlinx-serialization` gradle plugin and add a dependency on the
`kotlinx-serialization` library. The library is now an internal
implementation detail of `pbandk`.

* Moved all of the binary marshalling functionality and most of the
binary unmarshalling functionality from the generated code to the
runtime library.

* Added `protoMarshal(OutputStream)`, `protoUnmarshal(InputStream)`, and
`protoUnmarshal(ByteBuffer)` overloads on the JVM.

* Fixed some bugs with handling of `packed` fields, marshalling
of enums in Javascript, and base64 encoding/decoding in Javascript.

Breaking API changes:

* Changed `Message` so that it no longer needs to extend from itself.

* Added `@PbandkInternal` and `@PublicForGeneratedCode` annotations on
relevant portions of the public API that are only public for pbandk's
internal use.

* The below methods are now defined as extension methods rather than
being part of the `Message` interface. Code that calls these methods
will now need to import them first.

    * `Message.jsonMarshal()`
    * `Message.Companion.jsonUnmarshal(String)`
    * `Message.protoMarshal()`
    * `Message.Companion.protoUnmarshal(ByteArray)`

* These two method overloads:

    * `Message.jsonMarshal(kotlinx.serialization.json.Json)`
    * `Message.Companion.jsonUnmarshal(kotlinx.serialization.json.Json, String)`

    have been replaced with:

    * `Message.jsonMarshal(pbandk.json.JsonConfig)`
    * `Message.Companion.jsonUnmarshal(String, pbandk.json.JsonConfig)`

* These two method overloads:

    * `Message.protoMarshal(pbandk.Marshaller)`
    * `Message.Companion.protoUnmarshal(pbandk.Unmarshaller)`

    have been replaced with:

    * `Message.marshal(pbandk.MessageMarshaller)`
    * `Message.Companion.unmarshal(pbandk.MessageUnmarshaller)`

* Replaced `Marshaller` and `Unmarshaller` interfaces with
`MessageMarshaller` and `MessageUnmarshaller`, which are much simpler
and function differently from the previous interfaces.

* Removed `Sizer` and `Util` from the public API.

* Removed `UnknownField` constructors and the `UnknownField.size()`
method from the public API.

* `MessageMap.entries` is now a `Set` instead of a `List`.

Fixes #23, fixes #61. Portions of the proto3 JSON spec that still need
to be implemented are tracked in #72.
@garyp garyp closed this as completed in #69 Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant