Allow missing extension ranges since not all messages are extended

This commit is contained in:
John Kvarnefalk 2024-12-10 22:37:00 -05:00
parent b9a11e9fea
commit a79d510a91
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ func fetchAllExtensions(source DescriptorSource, ext *dynamic.ExtensionRegistry,
if len(md.GetExtensionRanges()) > 0 {
fds, err := source.AllExtensionsForType(msgTypeName)
if err != nil {
return fmt.Errorf("failed to query for extensions of type %s: %v", msgTypeName, err)
fds = []*desc.FieldDescriptor{}
}
for _, fd := range fds {
if err := ext.AddExtension(fd); err != nil {