Open dsilvasc opened 5 years ago
Yes, that should be fairly straightforward. Would you have time to put together a PR? There are initial instructions on getting started here: https://github.com/scalapb/ScalaPB/blob/master/CONTRIBUTING.md and this is an example commit that adds an option: 82bbd69965934df77969c821d0c68f99260c32b8
Thanks for the pointers -- I'll give it a shot.
@dsilvasc : 1. is it something that you still need? 2. Will you be able to give it a shot?
Closing due to inactivity. Please feel free to comment if there's still interest in it and we can re-open.
Was there ever any attempt for this?
In cases where I control the proto and am willing to live with backwards compatibility risks, it'd be great to be able to apply sealed oneof
globally, or per message, without the sealedFoo
and SealedFoo
naming convention leaking into the generated Scala. :/
Sealed oneofs are only generated when the oneof name is
sealed_value
. For people with existing schemas (or schemas shared across multi-language teams where others might prefer another name), would it be possible to allow annotating the message or the oneof?Maybe something like
option (scalapb.message).sealed_oneof = true
?