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

Update WAT format in several test cases #1935

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

larry0x
Copy link
Contributor

@larry0x larry0x commented Nov 3, 2023

In cosmwasm-vm, several WAT testdata include deprecated instruction names. For example get_local is now local.get. See: WebAssembly/spec#884

Recently, the Rust library wat dropped support for these deprecated instruction names: bytecodealliance/wasm-tools#1184. This repo currently uses wat 1.0.64, but if you upgrade to >=1.0.72 the tests will fail:

---- cache::tests::save_wasm_rejects_invalid_contract stdout ----
thread 'cache::tests::save_wasm_rejects_invalid_contract' panicked at packages/vm/src/cache.rs:631:57:
called `Result::unwrap()` on an `Err` value: Error { kind: Wast(Error { inner: ErrorInner { text: Some(Text { line: 3, col: 12, snippet: "            get_local $p0" }), file: None, span: Span { offset: 153 }, kind: Custom("unknown operator or unexpected token") } }) }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

These PR updates the instruction names to the standard ones.

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.

Thanks! I remember wondering about these aliases, but didn't know they were deprecated.

@chipshort chipshort merged commit 6f5905c into CosmWasm:main Nov 3, 2023
5 checks passed
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