Comments (8)
It looks like #138 added -C
arguments to git
to change the directory without first checking that those directories exist /cc @ChristianBorst
The solution is to create the respective directoires for cosmos-sdk-go
, ibc-go
, and wasmd
if they don't already exist.
from cosmos-rust.
@tony-iqlusion Thanks for prompt response. I have deleted these 3 directories and recreated them in repo . Additionally, I have set the proper rights. The problem still exists. I would be grateful for tips how to fix it.
cargo run
Blocking waiting for file lock on build directory
Finished dev [unoptimized + debuginfo] target(s) in 43.67s
Running `target/debug/proto-build`
[info] Updating cosmos/cosmos-sdk submodule...
Submodule 'cosmos-sdk' (https://github.com/cosmos/cosmos-sdk.git) registered for path 'cosmos-sdk-go'
Submodule 'ibc-go' (https://github.com/cosmos/ibc-go) registered for path 'ibc-go'
Submodule 'wasmd' (https://github.com/CosmWasm/wasmd.git) registered for path 'wasmd'
Cloning into '/home/ai/go/src/github.com/cosmos-rust/cosmos-sdk-go'...
Cloning into '/home/ai/go/src/github.com/cosmos-rust/ibc-go'...
Cloning into '/home/ai/go/src/github.com/cosmos-rust/wasmd'...
Submodule path 'cosmos-sdk-go': checked out '8a73b266f52e08f24738c93ef519b529cd35bbd8'
Submodule path 'ibc-go': checked out 'cea013a4a6fdcc970e06665b858a79d14db6eca9'
Submodule path 'wasmd': checked out 'd2e35c249e39e90c5a85e03e0b75800431612b20'
fatal: cannot change to '../cosmos-sdk-go': No such file or directory
thread 'main' panicked at 'git exited with error code: Some(128)', proto-build/src/main.rs:134:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ai@ai-ThinkPad-T450:~/go/src/github.com/cosmos-rust$
from cosmos-rust.
Oh, perhaps the problem is you're doing cargo run
from outside the prost-build/
directory. It's pretty brittle right now and perhaps we should switch to something like cargo-xtask
as the driver.
But yes, anyway, cd prost-build
before doing cargo run
.
from cosmos-rust.
Thanks for your tip.
ai@ai-ThinkPad-T450:~/go/src/github.com/cosmos-rust/proto-build$ cargo run
Compiling proto-build v0.1.0 (/home/ai/go/src/github.com/cosmos-rust/proto-build)
Finished dev [unoptimized + debuginfo] target(s) in 2.77s
Running `/home/ai/go/src/github.com/cosmos-rust/target/debug/proto-build`
[info] Updating cosmos/cosmos-sdk submodule...
HEAD is now at 8a73b266f chore: v0.44.1 release notes and changelog (#10261)
[info] Updating cosmos/ibc-go submodule...
HEAD is now at d059913 backport #344, #372, #375, #386 (#388)
[info] Updating wasmd submodule...
Submodule path '../ibc-go': checked out 'cea013a4a6fdcc970e06665b858a79d14db6eca9'
HEAD is now at d2e35c2 Merge pull request #521 from CosmWasm/changelog_v0.17
[info] Compiling cosmos-sdk .proto files to Rust into '/tmp/tmp-protobuf/'...
[info] Compiling proto definitions and clients for GRPC services!
[info] => Done!
[info] Compiling .proto files to Rust into '/tmp/tmp-protobuf/'...
[info] Compiling proto definitions and clients for GRPC services!
[info] => Done!
[info] Compiling .proto files to Rust into '/tmp/tmp-protobuf/'...
[info] Compiling wasmd proto clients for GRPC services!
[info] => Done!
[info] Copying generated files into '../cosmos-sdk-proto/src/prost/'...
and then execute cargo run
from root directory. Does it sound good to you?
ai@ai-ThinkPad-T450:~/go/src/github.com/cosmos-rust$ cargo run
Compiling cosmos-sdk-proto v0.8.0 (/home/ai/go/src/github.com/cosmos-rust/cosmos-sdk-proto)
error[E0428]: the name `Validators` is defined multiple times
--> cosmos-sdk-proto/src/prost/cosmos.staking.v1beta1.rs:355:5
|
349 | pub struct Validators {
| --------------------- previous definition of the type `Validators` here
...
355 | pub enum Validators {
| ^^^^^^^^^^^^^^^^^^^ `Validators` redefined here
|
= note: `Validators` must be defined only once in the type namespace of this module
error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `cosmos::staking::v1beta1::stake_authorization::Validators`
--> cosmos-sdk-proto/src/prost/cosmos.staking.v1beta1.rs:354:14
|
348 | #[derive(Clone, PartialEq, ::prost::Message)]
| ----- first implementation here
...
354 | #[derive(Clone, PartialEq, ::prost::Oneof)]
| ^^^^^ conflicting implementation for `cosmos::staking::v1beta1::stake_authorization::Validators`
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::cmp::PartialEq` for type `cosmos::staking::v1beta1::stake_authorization::Validators`
--> cosmos-sdk-proto/src/prost/cosmos.staking.v1beta1.rs:354:21
|
348 | #[derive(Clone, PartialEq, ::prost::Message)]
| --------- first implementation here
...
354 | #[derive(Clone, PartialEq, ::prost::Oneof)]
| ^^^^^^^^^ conflicting implementation for `cosmos::staking::v1beta1::stake_authorization::Validators`
|
= note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::marker::StructuralPartialEq` for type `cosmos::staking::v1beta1::stake_authorization::Validators`
--> cosmos-sdk-proto/src/prost/cosmos.staking.v1beta1.rs:354:21
|
348 | #[derive(Clone, PartialEq, ::prost::Message)]
| --------- first implementation here
...
354 | #[derive(Clone, PartialEq, ::prost::Oneof)]
| ^^^^^^^^^ conflicting implementation for `cosmos::staking::v1beta1::stake_authorization::Validators`
|
= note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::fmt::Debug` for type `cosmos::staking::v1beta1::stake_authorization::Validators`
--> cosmos-sdk-proto/src/prost/cosmos.staking.v1beta1.rs:354:32
|
348 | #[derive(Clone, PartialEq, ::prost::Message)]
| ---------------- first implementation here
...
354 | #[derive(Clone, PartialEq, ::prost::Oneof)]
| ^^^^^^^^^^^^^^ conflicting implementation for `cosmos::staking::v1beta1::stake_authorization::Validators`
|
= note: this error originates in the derive macro `::prost::Oneof` (in Nightly builds, run with -Z macro-backtrace for more info)
Some errors have detailed explanations: E0119, E0428.
For more information about an error, try `rustc --explain E0119`.
error: could not compile `cosmos-sdk-proto` due to 5 previous errors
from cosmos-rust.
Yes, there's currently an issue with the name of that proto which requires hand-editing the result. Unfortunately we don't have an open tracking issue for that.
from cosmos-rust.
Do you plan to resolve this issue in the near future?
from cosmos-rust.
I believe there is an upstream ticket to fix this in the cosmos-sdk proper /cc @jkilpatr @ChristianBorst
from cosmos-rust.
I opened #154 to track the clashing Validator
struct/enum names in the generated protos.
Otherwise I don't think there's anything else to do here, other than possibly migrating proto-build
to something like cargo xtask
to make it easier to use.
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.