commit | ce3384cd34a6a398bf3d18f9f13b7d7d09f7d658 | [log] [tgz] |
---|---|---|
author | Damien Neil <dneil@google.com> | Wed Nov 06 13:18:28 2019 -0800 |
committer | Damien Neil <dneil@google.com> | Mon Nov 11 19:40:27 2019 +0000 |
tree | 108647327cc9b0e382729c41fec04818da31ce51 | |
parent | c975a7097d492a8c24764171a899bf51fb582f36 [diff] |
proto, internal/impl: store unknown MessageSet items in non-mset format In the v1 implementation, unknown MessageSet items are stored in a message's unknown fields section in non-MessageSet format. For example, consider a MessageSet containing an item with type_id T and value V. If the type_id is not resolvable, the item will be placed in the unknown fields as a bytes-valued field with number T and contents V. This conversion is then reversed when marshaling a MessageSet containing unknown fields. Preserve this behavior in v2. One consequence of this change is that actual unknown fields in a MessageSet (any field other than 1) are now discarded. This matches the previous behavior. Change-Id: I3d913613f84e0ae82481078dbc91cb25628651cc Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/205697 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
WARNING: This repository is in active development. There are no guarantees about API stability. Breaking changes will occur until a stable release is made and announced.
This repository is for the development of the next major Go implementation of protocol buffers. This library makes breaking API changes relative to the existing Go protobuf library. Of particular note, this API aims to make protobuf reflection a first-class feature of the API and implements the protobuf ecosystem in terms of reflection.
List of relevant design documents:
We appreciate community contributions. See CONTRIBUTING.md.
Issues regarding the new API can be filed at github.com/golang/protobuf. Please use a APIv2:
prefix in the title to make it clear that the issue is regarding the new API work.