Open Ziaw opened 4 years ago
// data.proto syntax = "proto3"; import "ok.proto"; service Data { rpc create(SetDataRequest) returns (ok.Response); } message SetDataRequest { string uuid = 1; }
// ok.proto syntax = "proto3"; package ok; message Response { }
protoc --proto_path=. --ruby_out=. --twirp_ruby_out=. --plugin=/Users/a.zimin/go/bin/protoc-gen-twirp_ruby data.proto ok.proto
# data_twirp.rb # Code generated by protoc-gen-twirp_ruby 1.4.1, DO NOT EDIT. # ...SKIP... rpc :create, SetDataRequest, Response, :ruby_method => :create # ...SKIP...
module Ok Response = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("ok.Response").msgclass end
protoc --proto_path=. --ruby_out=. --twirp_ruby_out=. --plugin=/Users/a.zimin/go/bin/protoc-gen-twirp_ruby data.proto protoc --proto_path=. --ruby_out=. --twirp_ruby_out=. --plugin=/Users/a.zimin/go/bin/protoc-gen-twirp_ruby ok.proto
# data_twirp.rb # ...SKIP... rpc :create, SetDataRequest, Ok::Response, :ruby_method => :create # ...SKIP...
Is this still a problem on latest version? would you mind double checking? 🙏
👋 Encountered the same issue. The proposed solution (running protoc for each file instead of running once for all files) works.
protoc
When I generate code from two proto files
With one protoc execute
I have a code with a missing module name of Response class
With two protoc calls
Generated code is correct