You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the rust-contract tool uses stable as Rust toolchain channel as it's hardcoded in the build_contract() function inside __init__.py.
This has always worked perfectly until Rust introduced a breaking change with the release 1.81, affecting the rscdk. This means that having an environment with an updated stable toolchain makes it impossible to compile correctly any contract.
Steps to reproduce
Install the latest nightly version of Rust (version >= 1.81.0)
Clone the rscdk repository and switch to an example contract folder
error[E0599]: no method named `unwrap` found for struct `PanicMessage` in the current scope
--> crates/chain/src/lib.rs:16:46
|
16 | let msg = format!("{:?}", info.message().unwrap().as_str().unwrap());
| ^^^^^^ method not found in `PanicMessage<'_>`
rust-contract doesn't force users to run the compilation with the stable toolchain, so that eventual future breaking changes could easily be fixed by switching to a different toolchain (which is impossible today)
The text was updated successfully, but these errors were encountered:
ptagl
added a commit
to telosnetwork/rust-contracts-builder
that referenced
this issue
Sep 13, 2024
This is useful in order to give users additional flexibility.
The change was originally meant to fix the following issue:
uuosio#3
Caused by:
uuosio/rscdk#8
Currently, the
rust-contract
tool usesstable
as Rust toolchain channel as it's hardcoded in thebuild_contract()
function inside__init__.py
.This has always worked perfectly until Rust introduced a breaking change with the release
1.81
, affecting therscdk
. This means that having an environment with an updatedstable
toolchain makes it impossible to compile correctly any contract.Steps to reproduce
1.81.0
)rscdk
repository and switch to an example contract folderrust-contract
The compilation returns the following error:
Expected behavior
rust-contract
can build both with Rust1.81
and older versions (this depends on fixing Cannot compile with Rustnightly-1.81.0
rscdk#8)rust-contract
doesn't force users to run the compilation with thestable
toolchain, so that eventual future breaking changes could easily be fixed by switching to a different toolchain (which is impossible today)The text was updated successfully, but these errors were encountered: