This crate doesn't support edition 2021

5
open
anatawa12
anatawa12
Posted 2 months ago

This crate doesn't support edition 2021 #606

Can you update the version of cargo in *-0.2.1 to support 2021?

$ cross build --target x86_64-pc-windows-gnu
Unable to find image 'rustembedded/cross:x86_64-pc-windows-gnu-0.2.1' locally
x86_64-pc-windows-gnu-0.2.1: Pulling from rustembedded/cross
d7c3167c320d: Pull complete 
131f805ec7fd: Pull complete 
322ed380e680: Pull complete 
6ac240b13098: Pull complete 
d7bf0568dabc: Pull complete 
981aecd3bf48: Pull complete 
6697c741376d: Pull complete 
cc1566a6c043: Pull complete 
7e4da0436841: Pull complete 
6a8d255df934: Pull complete 
8928e758bdd0: Pull complete 
f5186e3ba9b6: Pull complete 
8f352a8fa374: Pull complete 
4ad1b6ba757d: Pull complete 
Digest: sha256:5b195dffc3876e155bb95aac347be1440d1cd5bc85fb46c7d9b3feeed2b16d8c
Status: Downloaded newer image for rustembedded/cross:x86_64-pc-windows-gnu-0.2.1
error: failed to parse manifest at `/project/Cargo.toml`

Caused by:
  feature `edition2021` is required

  The package requires the Cargo feature called `edition2021`, but that feature is not stabilized in this version of Cargo (1.55.0 (32da73ab1 2021-08-23)).
  Consider trying a newer version of Cargo (this may require the nightly release).
  See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2021 for more information about the status of this feature.
Emilgardis
Emilgardis
Created 2 months ago

Im not sure where this error is coming from, what version of the target do you have if you do

cargo +x86_64-pc-windows-gnu -Vv

Will have to investigate later, but if you could provide more information already, that would be great!

Emilgardis
Emilgardis
Created 2 months ago

Also, does it work with current master?

cargo install -p cross --git https://github.com/rust-embedded/cross

madninja
madninja
Created 2 months ago

I have the same issue with a package that relies on tonic-0.6.1 which specifies edition 2021:

Status: Downloaded newer image for rustembedded/cross:aarch64-unknown-linux-musl-0.2.1
error: failed to download `tonic v0.6.1`

Caused by:
  unable to get packages from source

Caused by:
  failed to parse manifest at `/cargo/registry/src/github.com-1ecc6299db9ec823/tonic-0.6.1/Cargo.toml`

Caused by:
  feature `edition2021` is required

  The package requires the Cargo feature called `edition2021`, but that feature is not stabilized in this version of Cargo (1.55.0-nightly (27277d966 2021-07-16)).
  Consider trying a more recent nightly release.
  See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2021 for more information about the status of this feature.

I've tried cross from current master and it has the same issue

Emilgardis
Emilgardis
Created 2 months ago

ah, this is an unfortunate side effect of having to install cargo on the image. This should be solved with a bump to latest cargo/rustc, which is done automatically when the images are built

madninja
madninja
Created 2 months ago

ah, this is an unfortunate side effect of having to install cargo on the image. This should be solved with a bump to latest cargo/rustc, which is done automatically when the images are built

which makes sense.. and how can I help make that happen sooner? :-)