Respect the `ruby_package` option when generating twirp files
darronschall opened this issue · 0 comments
darronschall commented
protoc
supports the ruby_package
option in proto files to specify the module of the generated ruby code (see protocolbuffers/protobuf#4627).
The twirp generator should also respect the ruby_package
option if present, and prefer that over the proto file's package.
To implement this, we'll likely want to build up a type mapping for the proto file and all of the proto file imports (where the imports might also leverage ruby_package
), rather than naive approach we took in our initial convert_to_ruby_type
at https://github.com/collectiveidea/protoc-gen-twirp_ruby/blob/v1.0.0/lib/twirp/protoc_plugin/code_generator.rb#L145