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

Require cosmwasm-vm and cosmwasm-std to match cosmwasm-check version #1860

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

webmaster128
Copy link
Member

Right now you cannot install older versions of cosmwasm-check dut to breaking changes internally:

cargo install --debug cosmwasm-check --version 1.3.1


  Compiling cosmwasm-vm v1.4.0
   Compiling cosmwasm-check v1.3.1
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
  --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cosmwasm-check-1.3.1/src/main.rs:97:5
   |
97 |     compile(&wasm, None, &[])?;
   |     ^^^^^^^ -----  ----  --- unexpected argument of type `&[_; 0]`
   |             |      |
   |             |      unexpected argument of type `Option<_>`
   |             an argument of type `&wasmer::engine::Engine` is missing
   |
note: function defined here
  --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cosmwasm-vm-1.4.0/src/wasm_backend/compile.rs:6:8
   |
6  | pub fn compile(engine: &Engine, code: &[u8]) -> VmResult<Module> {
   |        ^^^^^^^
help: did you mean
   |
97 |     compile(/* &wasmer::engine::Engine */, &wasm)?;
   |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For more information about this error, try `rustc --explain E0061`.
error: could not compile `cosmwasm-check` (bin "cosmwasm-check") due to previous error
error: failed to compile `cosmwasm-check v1.3.1`, intermediate artifacts can be found at `/tmp/cargo-install4JYgI8`

Exited with code exit status 101

Even if that was not the case, you'd still get a 1.4.0 cosmwasm-vm when installing cosmwasm-check 1.3.1. But it would be great to be able to check a contract against a 1.2, 1.3 and 1.4 VM by running different versions of cosmwasm-check.

Copy link
Member Author

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably get a CHANGELOG entry and a backport to 1.3.x

@webmaster128 webmaster128 changed the base branch from main to release/1.4 September 6, 2023 09:45
Copy link
Collaborator

@chipshort chipshort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this will become very important once the float support is enabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants