Is it possible to generate Sorbet enums from a protobuf?

35 views
Skip to first unread message

Chris Nakamura

unread,
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?

Thanks!

Derek Perez

unread,
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 protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/115f40c9-e91d-4db6-aac2-5294b2376dd1n%40googlegroups.com.

Chris Nakamura

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