ardaku / whoami

Rust crate to get the current user and environment.
Apache License 2.0
195 stars 31 forks source link

Perhaps we should bump our MSRV #49

Closed SteveLauC closed 1 year ago

SteveLauC commented 1 year ago

I am running into this error:

$ cargo metadata
warning: please specify `--format-version` flag explicitly to avoid compatibility problems
error: failed to download `bumpalo v3.11.1`

Caused by:
  unable to get packages from source

Caused by:
  failed to download replaced source registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to parse manifest at `/home/steve/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/bumpalo-3.11.1/Cargo.toml`

Caused by:
  failed to parse the `edition` key

Caused by:
  supported edition values are `2015` or `2018`, but `2021` is unknown

$ rg "bumpalo"
Cargo.toml
31:[target.'cfg(target_arch = "wasm32")'.dependencies.bumpalo]

This is because bumpalo bumps their MSRV to 1.56, so perhaps we should also bump our MSRV.

Since whoami won't bump MSRV until a major version update, an alternative approach is to use an older version of bumpalo.

AldaronLau commented 1 year ago

If you run these commands the error goes away. An alternative would be to remove the rust-toolchain file (which I think would be fine).

Some context: https://github.com/ardaku/whoami/issues/43

SteveLauC commented 1 year ago

Thanks for your help