protobuf-go/internal
Damien Neil 0ae1c9789a internal/impl: lazy extension decoding
Historically, extensions have been placed in the unknown fields section
of the unmarshaled message and decoded lazily on demand. The current
unmarshal implementation decodes extensions eagerly at unmarshal time,
permitting errors to be immediately reported and correctly detecting
unset required fields in extension values.

Add support for validated lazy extension decoding, where the extension
value is fully validated at initial unmarshal time but the fully
unmarshaled message is only created lazily.

Make this behavior conditional on the protolegacy flag for now.

Change-Id: I9d742496a4bd4dafea83fca8619cd6e8d7e65bc3
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/216764
Reviewed-by: Joe Tsai <joetsai@google.com>
2020-01-29 21:35:31 +00:00
..
benchmarks internal/benchmarks/micro: add validator microbenchmarks 2020-01-28 22:46:05 +00:00
cmd internal/impl: inline some small varint decoding 2020-01-27 19:09:55 +00:00
conformance encoding/prototext: add MarshalOptions.EmitUnknown 2019-09-17 02:56:29 +00:00
descfmt internal: improve use of detrand in descfmt and errors 2019-09-09 18:30:00 +00:00
descopts internal/filedesc, internal/filetype: initial commit 2019-06-20 02:06:11 +00:00
detrand internal: improve use of detrand in descfmt and errors 2019-09-09 18:30:00 +00:00
encoding internal/impl: inline small tag decoding 2020-01-26 22:23:05 +00:00
errors internal: improve use of detrand in descfmt and errors 2019-09-09 18:30:00 +00:00
fieldnum
fieldsort proto, internal/impl: make wire output more consistent with v1 2019-11-12 20:59:03 +00:00
filedesc internal/testprotos/legacy: rename and regenerate 2020-01-12 08:13:18 +00:00
filetype reflect/protoregistry: add (*Types).Register{Message,Enum,Extension} 2019-10-31 16:23:42 +00:00
flags internal/impl: lazy extension decoding 2020-01-29 21:35:31 +00:00
fuzz internal/impl: add message validator 2020-01-07 21:36:47 +00:00
fuzztest internal/fuzztest: factor out common fuzzer tests 2019-12-20 22:08:10 +00:00
genname internal/genname: centralize the definitions for generated names 2019-12-09 22:57:38 +00:00
impl internal/impl: lazy extension decoding 2020-01-29 21:35:31 +00:00
mapsort internal/testprotos/legacy: rename and regenerate 2020-01-12 08:13:18 +00:00
pragma
protolegacy reflect/protoregistry: add (*Types).Register{Message,Enum,Extension} 2019-10-31 16:23:42 +00:00
set
strs compiler/protogen, internal/strs, internal/impl: expose enum Go name derivation 2019-08-26 17:49:17 +00:00
testprotos internal/testprotos: make TestAllExtensions recursive 2020-01-28 23:28:36 +00:00