emilk / eframe_template

The easy way to make a Rust app with a GUI
Apache License 2.0
776 stars 177 forks source link

Rust-Analyzer fails on Image crate version 0.25 #150

Open Resonanz opened 1 month ago

Resonanz commented 1 month ago

Using Rust-Analyzer inside VS Code.

Add image = "0.24" to dependencies = works fine.

Add image = "0.25.2" to dependencies leads to Rust-Analyzer errors:

Failed to run build scripts of some packages.

cargo check failed to start: Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(25856))):

error: package `bitstream-io v2.5.0` cannot be built because it requires rustc 1.79 or newer, while the currently active rustc version is 1.76.0

Either upgrade to rustc 1.79 or newer, or use

cargo update bitstream-[io@2.5.0](vscode-file://vscode-app/snap/code/164/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) --precise ver

where `ver` is the latest version of `bitstream-io` supporting rustc 1.76.0

[Extension Info](vscode-file://vscode-app/snap/code/164/usr/share/code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html): Version 0.3.2045, Server Version 0.3.2045-standalone
c-git commented 1 month ago

Right, I'd had an issue like that as well but haven't had time to look into it. IIRC there was a breaking change made in the image crate that I didn't have time account for in my code.

But reading the error message you copied... your problem might be different. You might just need to upgrade your rust version. My problem was related to the breaking change in their change log.

dehann commented 3 weeks ago

I got this fixed by updating to rustc 1.80:

rustup self update

Then update rustc version specified in the file rust-toolchain at the root of this repo.

Also:

bircni commented 3 weeks ago

the PR in egui has nothing to do with it :-)