-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Build fails with error[E0658]: let...else statements are unstable when the correct error message should be that rustc 1.65.0 is required #6777
Comments
error[E0658]:
let...else statements are unstable
when the correct error message should be that rustc 1.65.0 is requirederror[E0658]:
let...else statements are unstable
`` when the correct error message should be that rustc 1.65.0 is required
error[E0658]:
let...else statements are unstable
`` when the correct error message should be that rustc 1.65.0 is required
This is an error message from rust. i dont think bevy can do anything here. but when you read the README, you would know that the MSRV is the latest stable. |
Yes. But knowing that the latest stable is the MSRV is insufficient to know whether I have the MSRV or not. If I update to Rust 1.65 now, There could be a 1.65.1 release at any moment after that, whereupon I would no longer have the MSRV anymore. I want the build system to know whether or not I have the MSRV, and to complain at me specifically if I do not. Since I don't think |
I think that setting the MSRV is probably the right call. To do so, we need to add a CI job that automatically attempts to build Bevy under the MSRV. |
This should help stop people from making mkistakes like bevyengine/bevy#6777. Novice Rust programmers might see "latest stable release" and think that that measn "what I installed last month when I started learning Rust". However, that's not likely to be the case. Rust makes stable releases often enough that anyone who doesn't update it every couple weeks or so actually needs to update Rust in order to use Bevy. This should make theat clearer.
This should help stop people from making mkistakes like bevyengine/bevy#6777. Novice Rust programmers might see "latest stable release" and think that that means "what I installed last month when I started learning Rust". However, that's not likely to be the case. Rust makes stable releases often enough that anyone who doesn't update it every couple weeks or so actually needs to update Rust in order to use Bevy. This should make that clearer.
This should help stop people from making mistakes like bevyengine/bevy#6777. Novice Rust programmers might see "latest stable release" and think that that means "what I installed last month when I started learning Rust". However, that's not likely to be the case. Rust makes stable releases often enough that anyone who doesn't update it every couple weeks or so actually needs to update Rust in order to use Bevy. This should make that clearer.
# Objective - Fixes bevyengine#6777, fixes bevyengine#2998, replaces bevyengine#5518 - Help avoid confusing error message when using an older version of Rust ## Solution - Add the `rust-version` field to `Cargo.toml` - Add a CI job checking the MSRV - Add the job to bors
# Objective - Fixes bevyengine#6777, fixes bevyengine#2998, replaces bevyengine#5518 - Help avoid confusing error message when using an older version of Rust ## Solution - Add the `rust-version` field to `Cargo.toml` - Add a CI job checking the MSRV - Add the job to bors
# Objective - Fixes bevyengine#6777, fixes bevyengine#2998, replaces bevyengine#5518 - Help avoid confusing error message when using an older version of Rust ## Solution - Add the `rust-version` field to `Cargo.toml` - Add a CI job checking the MSRV - Add the job to bors
Bevy version
0.9.0
[Optional] Relevant system information
I have rustc 1.64.0 on Ubuntu 20.04. Since I updated the Rust compiler a month or so ago, the first I heard about that no longer being the "latest stable release" was when Bevy failed to build while following the tutorial.
What you did
cargo init
cargo run
What went wrong
I got an error from the compiler (
error[E0658]: `let...else` statements are unstable
) pointing to a usage of that construct inbevy_render_macros-0.9.0/src/as_bind_group.rs
.The Rust compiler is usually quite good at hinting what to do about problems, but in this case it sent me to a closed Github issue.
The real answer is that this feature came out in rustc 1.65.0, which was released since I last updated Rust, is now the latest stable Rust, and is now what Bevy needs, Bevy presumably also having released since then, or at least allowed its dependencies to release and get pulled in.
But since the Rust developers don't personally notify me, @interfect, a hobbyist Rust programmer, every time they make a release, nor do I follow Rust with enough enthusiasm to check every few days to see if there's a new release, I didn't know I didn't have the latest stable Rust, so I tried to install Bevy anyway, and got confused.
(It looks like rustc might make new "stable" releases every month, which seems highly unusual for a language. It might be worth emphasizing that people in general will not already have the latest stable Rust in the Bevy documentation, unless they are actively starting new Rust projects more than once a month.)
Solution proposal
I think that Bevy should use the
rust-version
field of Cargo.toml to articulate the version of Rust that was the latest stable version at the time of each Bevy release. This would allow Cargo to work out for me that Rust has released an update, instead of attempting to build Bevy with a Rust that everyone but me knows is too old for Bevy to work.It would also be good to put the latest stable Rust at the time of writing into the tutorial, near the Bevy version that is recommended. It's all well and good to say "the latest stable" Rust, but my Rust has no idea whether it is the latest stable one or not, and it would be very helpful to have the actual version in there for when twenty years form now someone is trying to build an old game that only ever worked with Bevy 0.9.0.
The downside is that bumping these to change the Bevy version would also need to involve bumping them to plug in the then-current latest stable Rust release.
The text was updated successfully, but these errors were encountered: