Giter Club home page Giter Club logo

Comments (6)

maxcountryman avatar maxcountryman commented on May 27, 2024

This seems to have happened because the cosmos-sdk-proto crate is included via a path; this is hiding the fact that the crate will reference the published version elsewhere, but not when built locally. To reproduce, you can apply this diff:

diff --git a/cosmrs/Cargo.toml b/cosmrs/Cargo.toml
index bbfa8ee..d3b75d8 100644
--- a/cosmrs/Cargo.toml
+++ b/cosmrs/Cargo.toml
@@ -12,7 +12,7 @@ edition = "2021"
 rust-version = "1.56"

 [dependencies]
-cosmos-sdk-proto = { version = "0.8", default-features = false, path = "../cosmos-sdk-proto" }
+cosmos-sdk-proto = { version = "0.8", default-features = false }
 ecdsa = { version = "0.13", features = ["std"] }
 eyre = "0.6"
 k256 = { version = "0.10", features = ["ecdsa", "sha256"] }

And then try to run the tests.

It might be worth decoupling the publishing process for these two crates to prevent this in the future.

from cosmos-rust.

jstuczyn avatar jstuczyn commented on May 27, 2024

I was literally about to post the same issue here as I attempted to build using version 0.4.0 : )

What seems that has happened is that even though a new version of cosmrs was released, nothing was done [in terms of releases] for the cosmos-sdk-proto crate, even though it got changed between cosmrs 0.3.0 and 0.4.0. The notable difference includes the protobuf path changes:

cosmrs 0.3.0:

pub mod cosmwasm {
    /// Messages and services handling CosmWasm.
    pub mod wasm {
        pub mod v1beta1 {
            include!("prost/cosmwasm.wasm.v1beta1.rs");
        }
    }
}

cosmrs 0.4.0

pub mod cosmwasm {
    /// Messages and services handling CosmWasm.
    pub mod wasm {
        pub mod v1 {
            include!("prost/cosmwasm.wasm.v1.rs");
        }
    }
}

Thus, it would be amazing if cosmos-sdk-proto was updated to 0.9 and was put into cosmrs 0.4.1 release.

from cosmos-rust.

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

I agree with your assessment. PR to release cosmos-sdk-proto v0.9 here: #167

from cosmos-rust.

maxcountryman avatar maxcountryman commented on May 27, 2024

I'd recommend not relying on path when publishing, otherwise it's difficult to detect these discrepancies between published and unpublished changes in deps.

from cosmos-rust.

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

I'd recommend not relying on path when publishing

What are you suggesting exactly? Removing it to publish, then always following up with another commit to add it back? Seems tedious.

from cosmos-rust.

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

Fixed by #168

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.