require 'google/protobuf/descriptor_pb'

On Tuesday, November 26, 2024 at 1:20:15 AM UTC-8 Maxime Liron wrote:

> Hey!
>
> I'm upgrading my app's google-protobuf ruby gem dep from 3.25.3 to 4.28.2.
>
> I had code that would check message descriptors to detect map types. It's 
> now raising.
>
> I used to do `descriptor.type == :message && 
> descriptor.subtype.options.map_entry` to check if a message is a map.
>
> Now this raises a rather cryptic `Cannot find MessageOptions in 
> DescriptorPool`.
> Seems like any call of `.options` on any message descriptor in my codebase 
> raises this error.
>
> Any suggestions on how to detect a map now?
>
> ```
> > bundle exec grpc_tools_ruby_protoc --version
> libprotoc 27.2
> ```
>

-- 
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/9f48d992-a3a5-45a7-a8d5-dd7826ce99b2n%40googlegroups.com.

Reply via email to