rebase: bump google.golang.org/protobuf from 1.36.2 to 1.36.3

Bumps google.golang.org/protobuf from 1.36.2 to 1.36.3.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2025-01-20 20:22:35 +00:00
committed by mergify[bot]
parent a7a3aca4b3
commit a5ceace970
21 changed files with 74 additions and 150 deletions

View File

@ -149,7 +149,7 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds
return errors.New("message field %q under proto3 optional semantics must be within a single element oneof", f.FullName())
}
}
if f.IsWeak() && !flags.ProtoLegacy {
if f.IsWeak() && !flags.ProtoLegacyWeak {
return errors.New("message field %q is a weak field, which is a legacy proto1 feature that is no longer supported", f.FullName())
}
if f.IsWeak() && (!f.HasPresence() || !isOptionalMessage(f) || f.ContainingOneof() != nil) {

View File

@ -125,16 +125,27 @@ func mergeEditionFeatures(parentDesc protoreflect.Descriptor, child *descriptorp
parentFS.IsJSONCompliant = *jf == descriptorpb.FeatureSet_ALLOW
}
if goFeatures, ok := proto.GetExtension(child, gofeaturespb.E_Go).(*gofeaturespb.GoFeatures); ok && goFeatures != nil {
if luje := goFeatures.LegacyUnmarshalJsonEnum; luje != nil {
parentFS.GenerateLegacyUnmarshalJSON = *luje
}
if sep := goFeatures.StripEnumPrefix; sep != nil {
parentFS.StripEnumPrefix = int(*sep)
}
if al := goFeatures.ApiLevel; al != nil {
parentFS.APILevel = int(*al)
}
// We must not use proto.GetExtension(child, gofeaturespb.E_Go)
// because that only works for messages we generated, but not for
// dynamicpb messages. See golang/protobuf#1669.
goFeatures := child.ProtoReflect().Get(gofeaturespb.E_Go.TypeDescriptor())
if !goFeatures.IsValid() {
return parentFS
}
// gf.Interface() could be *dynamicpb.Message or *gofeaturespb.GoFeatures.
gf := goFeatures.Message()
fields := gf.Descriptor().Fields()
if fd := fields.ByName("legacy_unmarshal_json_enum"); gf.Has(fd) {
parentFS.GenerateLegacyUnmarshalJSON = gf.Get(fd).Bool()
}
if fd := fields.ByName("strip_enum_prefix"); gf.Has(fd) {
parentFS.StripEnumPrefix = int(gf.Get(fd).Enum())
}
if fd := fields.ByName("api_level"); gf.Has(fd) {
parentFS.APILevel = int(gf.Get(fd).Enum())
}
return parentFS