manuelmauro / algonaut

A rusty sdk for Algorand.
MIT License
64 stars 38 forks source link

Build error when importing `algonaut_transaction` #193

Closed Niceural closed 1 year ago

Niceural commented 1 year ago

Hi I get a compile time error when running cargo build thank you for your help nic

Ubuntu 20.04 cargo version: 1.61.0

Cargo.toml file:

  1 [package]                                                             
  2 name = "vcc-mvp"
  3 version = "0.1.0"
  4 edition = "2021"
  5  
  6 # See more keys and their definitions at https://doc.rust-lang.org/car
  7  
  8 [dependencies]
  9 algonaut = "0.4.2"
 10 tokio = "1.21.2"
 11 dotenv = "0.15.0"
 12 log = "0.4.17"

terminal output:

cargo build
   Compiling algonaut_transaction v0.4.2
error[E0658]: use of unstable library feature 'bool_to_option'
   --> /home/nic/.cargo/registry/src/github.com-1ecc6299db9ec823/algonaut_transaction-0.4.2/src/account.rs:251:10
    |
251 |         .then_some(signing_account_address)
    |          ^^^^^^^^^
    |
    = note: see issue #80967 <https://github.com/rust-lang/rust/issues/80967> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `algonaut_transaction` due to previous error
manuelmauro commented 1 year ago

Hi @Niceural! I reproduced your error. Apparently bool_to_option was stabilized in rustc 1.62. If that's an option for you, just update your compiler to that version and everything should work just fine!

Niceural commented 1 year ago

hi @manuelmauro . I opted for a more radical solution: switch to an arch based distribution. I seem to have installed a more recent version of rustc by doing that (1.65.0). thanks a lot for your help!