cosmos-rust icon indicating copy to clipboard operation
cosmos-rust copied to clipboard

compile_proto_services() overwrites the compile_protos() work

Open ancazamfir opened this issue 4 years ago • 0 comments

We had this issue also in ibc-rs when trying to compile some IBC core services. For example, with this addition:

diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs
index 9d9591c..aeeb30d 100644
--- a/proto-build/src/main.rs
+++ b/proto-build/src/main.rs
@@ -161,6 +161,7 @@ fn compile_proto_services(out_dir: impl AsRef<Path>) {
         sdk_dir.join("proto/cosmos/bank/v1beta1/query.proto"),
         sdk_dir.join("proto/cosmos/tx/v1beta1/service.proto"),
         sdk_dir.join("proto/cosmos/tx/v1beta1/tx.proto"),
+        sdk_dir.join("proto/ibc/core/channel/v1/query.proto"),
     ];

     // List available paths for dependencies

and after cargo run some of the structures are missing from ../cosmos-sdk-proto/src/prost/ibc.core.channel.v1.rs (all Msg.. structs, GenesisState). In ibc-rs we fixed this by doing the proto and service compilation with tonic see here

ancazamfir avatar Jan 05 '21 10:01 ancazamfir