Git Product home page Git Product logo

Comments (8)

tony-iqlusion avatar tony-iqlusion commented on May 26, 2024

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.

cyberbono3 avatar cyberbono3 commented on May 26, 2024

@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.

tony-iqlusion avatar tony-iqlusion commented on May 26, 2024

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.

cyberbono3 avatar cyberbono3 commented on May 26, 2024

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.

tony-iqlusion avatar tony-iqlusion commented on May 26, 2024

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.

cyberbono3 avatar cyberbono3 commented on May 26, 2024

Do you plan to resolve this issue in the near future?

from cosmos-rust.

tony-iqlusion avatar tony-iqlusion commented on May 26, 2024

I believe there is an upstream ticket to fix this in the cosmos-sdk proper /cc @jkilpatr @ChristianBorst

from cosmos-rust.

tony-iqlusion avatar tony-iqlusion commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.