Is it possible to generate Sorbet enums from a protobuf?

Skip to first unread message

Chris Nakamura

Nov 30, 2021, 12:31:47 PM11/30/21
to Protocol Buffers
The protobuf docs mention the following:

> Since Ruby does not have native enums, we create a module for each enum with constants to define the values. Given the .proto file:

However, it is possible to define enums in ruby with Sorbet. Is it possible to automatically generate sorbet enums from a proto file, instead of passing around symbols and ints?


Derek Perez

Nov 30, 2021, 12:55:11 PM11/30/21
to Chris Nakamura, Protocol Buffers
Could you file an issue here:

We can look into it.

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
To view this discussion on the web visit

Chris Nakamura

Nov 30, 2021, 1:05:46 PM11/30/21
to Protocol Buffers
Reply all
Reply to author
0 new messages