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

[BUG] PLEASE BUMP OPTIMIZER VERSION!!!! #156

Open
llllllluc opened this issue Oct 17, 2023 · 1 comment
Open

[BUG] PLEASE BUMP OPTIMIZER VERSION!!!! #156

llllllluc opened this issue Oct 17, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@llllllluc
Copy link
Contributor

llllllluc commented Oct 17, 2023

Recommended solution

Bump optimizer version from 0.12.6 to 0.14.0 or latest.

Issue description

see more detail in my msg in cosmwasm discord

Steps to reproduce the issue

  1. Start a new cosmwasm repo, set cosmwasm-std version to 1.4.1 (latest, or any version >= 1.3)
  2. Use terrain or terrariums to deploy the code
  3. You will see bnum error like below, this is because bnum requires a higher rust version >= 1.65, current version of workspace optimizer use 0.12.6, which use rust 1.6, we need to bump workspace optimizer to 0.14.0 to fix it
   Compiling bnum v0.7.0
   Compiling serde_derive v1.0.189
   Compiling thiserror-impl v1.0.49
error[E0599]: no method named `cast_mut` found for raw pointer `*const [u8; 8]` in the current scope
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/bnum-0.7.0/src/bint/endian.rs:77:47
    |
77  |                     let ptr = uninit.as_ptr().cast_mut() as *mut u8;
    |                                               ^^^^^^^^ help: there is an associated function with a similar name: `as_mut`
...
225 | crate::macro_impl!(endian);
    | -------------------------- in this macro invocation
    |
    = note: try using `<*const T>::as_ref()` to get a reference to the type behind the pointer: https://doc.rust-lang.org/std/primitive.pointer.html#method.as_ref
    = note: using `<*const T>::as_ref()` on a pointer which is unaligned or points to invalid or uninitialized memory is undefined behavior
    = note: this error originates in the macro `endian` (in Nightly builds, run with -Z macro-backtrace for more info)

Temporary workaround

hardcode cw version to 1.2 cosmwasm-std = "=1.2" so it doesn't contain bnum, this can work with current terrain.

Tools and operating system versions

Additional details / screenshot

  • Screenshot-
@llllllluc llllllluc added the bug Something isn't working label Oct 17, 2023
@llllllluc
Copy link
Contributor Author

Please also update terrariums until it's merge it into terrain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant