protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.83k stars 15.52k forks source link

Introduce hpb plumbing for repeated scalars #19300

Open copybara-service[bot] opened 1 week ago

copybara-service[bot] commented 1 week ago

Introduce hpb plumbing for repeated scalars

Before this change, hpb had no way of returning scalar repeated fields (that are extensions) -- they were incorrectly treated as pure scalars (int32 vs repeated). To rectify this, we introduce RepeatedWrapper, which'll signal that we've detected a repeated scalar.

In a followup CL, we'll handle this case and properly return the extant RepeatedField, allowing access and iteration. Just handling the non-mutational pathway for our first pass.