Comments (5)
Confirm that I was able to reproduce this problem.
Here's a more nicely formatted version of the protoc
errors:
protoc failed: /Users/bascule/src/cosmos-rust/proto-build/../proto: warning: directory does not exist.
ibc/core/client/v1/tx.proto:8:1: warning: Import ibc/core/client/v1/client.proto is unused.
cosmos/tx/v1beta1/service.proto:7:1: warning: Import gogoproto/gogo.proto is unused.
cosmos/base/tendermint/v1beta1/query.proto:87:3: "tendermint.types.BlockID" is resolved to "cosmos.base.tendermint.types.BlockID", which is not defined. The innermost scope is searched first in name resolution. Consider using a leading '.'(i.e., ".tendermint.types.BlockID") to start from the outermost scope.
cosmos/base/tendermint/v1beta1/query.proto:88:3: "tendermint.types.Block" is resolved to "cosmos.base.tendermint.types.Block", which is not defined. The innermost scope is searched first in name resolution. Consider using a leading '.'(i.e., ".tendermint.types.Block") to start from the outermost scope.
cosmos/base/tendermint/v1beta1/query.proto:96:3: "tendermint.types.BlockID" is resolved to "cosmos.base.tendermint.types.BlockID", which is not defined. The innermost scope is searched first in name resolution. Consider using a leading '.'(i.e., ".tendermint.types.BlockID") to start from the outermost scope.
cosmos/base/tendermint/v1beta1/query.proto:97:3: "tendermint.types.Block" is resolved to "cosmos.base.tendermint.types.Block", which is not defined. The innermost scope is searched first in name resolution. Consider using a leading '.'(i.e., ".tendermint.types.Block") to start from the outermost scope.
cosmos/base/tendermint/v1beta1/query.proto:113:3: "tendermint.p2p.DefaultNodeInfo" is resolved to "cosmos.base.tendermint.p2p.DefaultNodeInfo", which is not defined. The innermost scope is searched first in name resolution. Consider using a leading '.'(i.e., ".tendermint.p2p.DefaultNodeInfo") to start from the outermost scope.
cosmos/base/tendermint/v1beta1/query.proto:4:1: warning: Import gogoproto/gogo.proto is unused.
cosmos/base/tendermint/v1beta1/query.proto:6:1: warning: Import google/api/annotations.proto is unused.
cosmos/base/tendermint/v1beta1/query.proto:8:1: warning: Import tendermint/types/block.proto is unused.
cosmos/base/tendermint/v1beta1/query.proto:9:1: warning: Import tendermint/types/types.proto is unused.
cosmos/base/tendermint/v1beta1/query.proto:7:1: warning: Import tendermint/p2p/types.proto is unused.
Between the warnings that "Import tendermint/..." are unused and the scope errors regarding the tendermint
types, it would appear something has changed with either the type names or the scopes.
from cosmos-rust.
So the problem here is that in order to pass through some ABCI stuff for RC5 tindermint proto types where pulled into Cosmos-sdk proto definitions, the proto compiler is looking for one of these files
https://github.com/tendermint/tendermint/tree/master/proto/tendermint
and cant' find it, our compiler needs to be updated to keep them in scope (note that this may remove our dependency on tendermint-proto the crate, since we need to compile those protos ourselves anyways.
from cosmos-rust.
I think this is actually an issue with the upstream proto definitions coming from cosmos/cosmos-sdk
. You can (inadvertently) see the same error in this (otherwise unrelated) issue:
Adding a submodule for tendermint/tendermint
doesn't help: as you can see in the protoc output from above, these definitions are already available, and unused:
cosmos/base/tendermint/v1beta1/query.proto:8:1: warning: Import tendermint/types/block.proto is unused.
cosmos/base/tendermint/v1beta1/query.proto:9:1: warning: Import tendermint/types/types.proto is unused.
The real problem appears to be an upstream scoping issue. You can see the error here:
"tendermint.types.BlockID" is resolved to "cosmos.base.tendermint.types.BlockID", which is not defined. The innermost scope is searched first in name resolution. Consider using a leading '.'(i.e., ".tendermint.types.BlockID") to start from the outermost scope.
There are two proto packages named tendermint
, the toplevel .tendermint
package and cosmos.base.tendermint
. The protos where this error is occurring is inside of the cosmos.base.tendermint.v1beta1
package, and so "tendermint" is resolving to cosmos.base.tendermint
instead of .tendermint
.
Not sure why this isn't breaking the upstream build as per the linked issue this does still seem to be causing (potentially ignored) upstream errors. That said...
Adding a leading .
to the type names as suggested by protoc corrects the issue, but requires an upstream change. I can attempt a PR.
from cosmos-rust.
Opened a PR to fix the scoping here: cosmos/cosmos-sdk#8236
from cosmos-rust.
cosmos/cosmos-sdk#8236 has been merged! 🎉
I can also confirm that if I bump COSMOS_REV
to the latest commit locally, everything is working again:
[info] Updating cosmos/cosmos-sdk submodule...
HEAD is now at cfeb5eb4d Fix tendermint query proto scoping (#8236)
[info] Compiling .proto files to Rust into '/tmp/tmp-protobuf/'...
[info ] Compiling proto clients for GRPC services!
[info ] => Done!
[info ] Copying generated files into '../cosmos-sdk-proto/src/prost/'...
Will go ahead and close this issue out as it appears we're free to bump COSMOS_REV
as soon as e.g. v0.40.0-rc6 gets tagged.
from cosmos-rust.
Related Issues (20)
- TallyParams Undocumented Decimal Type HOT 2
- Enable cosmrs support `no_std` HOT 5
- Maybe Can Use only one crate `cosmos-sdk-proto` or `ibc-proto-rs` HOT 6
- Sync versions with tendermint-rs?
- wasm-bindgen issue when using cosmrs in CosmWasm HOT 10
- Type URLs for x/authz messages not present HOT 4
- Add additional derive macros to Prost generated types HOT 19
- gov/v1 HOT 2
- Does this crate only supports gRPC for querying contracts states? HOT 4
- proto build fails because of deprecated buf template HOT 1
- Update crypto lib HOT 2
- Error: failed to load state at height 0; version mismatch on immutable IAVL tree; version does not exist. Version has either been pruned, or is for a future block height (latest height: 0): invalid request HOT 1
- 405 Method Not Allowed HOT 2
- Update ibc-go types HOT 1
- Error with user entered invalid UTF8 for protobuf structs.
- bug: cargo run ends in an error
- proto-build: bump COSMOS_SDK_REV to v0.47 or higher HOT 3
- Querying `minimum_gas_price` HOT 3
- How to output the private key and print it to the terminal? HOT 2
- Abandon `cosmos-sdk-proto` in favor of `ibc-proto`? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cosmos-rust.