*New Opaque API for Go*

Back in March 2020, we released the google.golang.org/protobuf module, a 
major overhaul of the Go Protobuf API <https://go.dev/blog/protobuf-apiv2>. 
This package introduced first-class support for reflection 
<https://pkg.go.dev/google.golang.org/protobuf/reflect/protoreflect>, a 
dynamicpb <https://pkg.go.dev/google.golang.org/protobuf/types/dynamicpb> 
implementation and the protocmp 
<https://pkg.go.dev/google.golang.org/protobuf/testing/protocmp> package 
for easier testing.

That release introduced a new protobuf module with a new API. Today, we are 
releasing an additional API for generated code, meaning the Go code in the 
.pb.go files created by the protocol compiler (protoc). The blog post at 
https://go.dev/blog/protobuf-opaque explains our motivation for creating a 
new API and shows you how to use it in your projects.

To be clear: We are not removing anything. We will continue to support the 
existing API for generated code, just like we still support the older 
protobuf module (by wrapping the google.golang.org/protobuf 
implementation). Go is committed to backwards compatibility 
<https://go.dev/blog/compat> and this applies to Go Protobuf, too!



*Another change in v30*In v30.x, we are removing the following 
reflection-related function: MutableRepeatedFieldRef<T>::Reserve().

An upcoming performance improvement in RepeatedPtrField 
<https://protobuf.dev/reference/cpp/api-docs/google.protobuf.repeated_field#RepeatedPtrField>
 
is incompatible with this API. The improvement is projected to accelerate 
repeated access to the elements of RepeatedPtrField, in particular and 
especially sequential access.

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/protobuf/840c926d-4ac3-4ce5-b335-123cb4c84707n%40googlegroups.com.

Reply via email to