Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cosmos-sdk-proto: cosmos::auth::v1beta1::query_client::QueryClient missing in v0.12 #219

Closed
tony-iqlusion opened this issue May 5, 2022 · 5 comments · Fixed by #220 or #224
Closed

Comments

@tony-iqlusion
Copy link
Member

This gRPC client in particular disappeared in the v0.12 release. It was present in the v0.11 release:

https://docs.rs/cosmos-sdk-proto/0.11.0/cosmos_sdk_proto/cosmos/auth/v1beta1/query_client/struct.QueryClient.html

Other gRPC clients, e.g. authz, are still present:

https://docs.rs/cosmos-sdk-proto/0.12.0/cosmos_sdk_proto/?search=QueryClient

This is probably related to the prost v0.10 and tonic v0.7 upgrade, which was the only major change in this release.

@tony-iqlusion
Copy link
Member Author

tony-iqlusion commented May 5, 2022

The very first proto in the list of SDK protos that is passed to tonic-build is:

"../cosmos-sdk-go/proto/cosmos/auth/v1beta1/query.proto"

...so I'm not sure why it's not generating the query client anymore.

@devashishdxt
Copy link
Contributor

The very first proto in the list of SDK protos that is passed to tonic-build is:

"../cosmos-sdk-go/proto/cosmos/auth/v1beta1/query.proto"

...so I'm not sure why it's not generating the query client anymore.

I faced the same issue when I tried to update the proto files last time. It worked for me after I manually updated the git sub-modules and skipped update_submodules() in proto-build.

@tony-iqlusion
Copy link
Member Author

tony-iqlusion commented May 11, 2022

@devashishdxt what commit did you have checked out in the cosmos-sdk-go submodule?

I was curious if this might be related to bumping the SDK release version, but I'm getting the same behavior for v0.45.2 and v0.45.4.

If I try v0.46.0-beta2 I get this gnarly error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "protoc failed: /Users/tony/src/cosmos-rust/proto-build/../proto: warning: directory does not exist.\ngogoproto/gogo.proto: File not found.\ngoogle/protobuf/any.proto:35:1: Import \"gogoproto/gogo.proto\" was not found or had errors.\ngoogle/api/annotations.proto: File not found.\ncosmos_proto/cosmos.proto: File not found.\ncosmos/auth/v1beta1/auth.proto:4:1: Import \"cosmos_proto/cosmos.proto\" was not found or had errors.\ncosmos/auth/v1beta1/auth.proto:5:1: Import \"gogoproto/gogo.proto\" was not found or had errors.\ncosmos/auth/v1beta1/auth.proto:6:1: Import \"google/protobuf/any.proto\" was not found or had errors.\ncosmos/auth/v1beta1/auth.proto:21:3: \"google.protobuf.Any\" is not defined.\ncosmos/auth/v1beta1/query.proto:5:1: Import \"gogoproto/gogo.proto\" was not found or had errors.\ncosmos/auth/v1beta1/query.proto:6:1: Import \"google/protobuf/any.proto\" was not found or had errors.\ncosmos/auth/v1beta1/query.proto:7:1: Import \"google/api/annotations.proto\" was not found or had errors.\ncosmos/auth/v1beta1/query.proto:8:1: Import \"cosmos/auth/v1beta1/auth.proto\" was not found or had errors.\ncosmos/auth/v1beta1/query.proto:9:1: Import \"cosmos_proto/cosmos.proto\" was not found or had errors.\ncosmos/auth/v1beta1/query.proto:66:12: \"google.protobuf.Any\" is not defined.\ncosmos/auth/v1beta1/query.proto:87:3: \"Params\" is not defined.\ncosmos/auth/v1beta1/query.proto:93:3: \"google.protobuf.Any\" is not defined.\ncosmos/auth/v1beta1/query.proto:101:12: \"google.protobuf.Any\" is not defined.\n" }', proto-build/src/main.rs:261:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

devashishdxt added a commit to devashishdxt/cosmos-rust that referenced this issue May 12, 2022
The root cause is that `third_party` protos in `ibc-go` includes contains `auth.proto` (which does not contain query client). The generated `.rs` file from `cosmos-sdk` was being overwritten by the one generated by `ibc-go`. Fixes cosmos#219
devashishdxt added a commit to devashishdxt/cosmos-rust that referenced this issue May 12, 2022
The root cause is that `third_party` protos in `ibc-go` includes contains `auth.proto` (which does not contain query client). The generated `.rs` file from `cosmos-sdk` was being overwritten by the one generated by `ibc-go`. Fixes cosmos#219
@devashishdxt
Copy link
Contributor

@tony-iqlusion Created a PR to fix this #220.

tony-iqlusion pushed a commit that referenced this issue May 12, 2022
The root cause is that `third_party` protos in `ibc-go` includes contains `auth.proto` (which does not contain query client). The generated `.rs` file from `cosmos-sdk` was being overwritten by the one generated by `ibc-go`. Fixes #219
tony-iqlusion added a commit that referenced this issue May 12, 2022
v0.12.1 fixes #219, which is a major bug. See #220.
@tony-iqlusion
Copy link
Member Author

@devashishdxt thank you!

tony-iqlusion added a commit that referenced this issue May 12, 2022
v0.12.1 fixes #219, which is a major bug. See #220.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants