Skip to content
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

[bug] Rust analyzer failed to run build scripts #4939

Closed
joetifa2003 opened this issue Aug 14, 2022 · 1 comment
Closed

[bug] Rust analyzer failed to run build scripts #4939

joetifa2003 opened this issue Aug 14, 2022 · 1 comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@joetifa2003
Copy link

Describe the bug

Rust analyzer gives me the following error:

[ERROR rust_analyzer::lsp_utils] failed to run build scripts

error[E0554]: #![feature] may not be used on the stable release channel
--> /home/joetifa/.cargo/registry/src/github.com-1ecc6299db9ec823/anyhow-1.0.61/src/lib.rs:214:32
|
214 | #![cfg_attr(backtrace, feature(backtrace))]
|

Reproduction

  1. A newly created tauri app with react

Expected behavior

No response

Platform and versions

Environment
› OS: Ubuntu 20.4.0 X64
› Node.js: 16.15.1
› npm: 8.11.0
› pnpm: 6.32.9
› yarn: 1.22.19
› rustup: 1.25.1
› rustc: 1.63.0
› cargo: 1.63.0
› Rust toolchain: stable-x86_64-unknown-linux-gnu

Packages
› @tauri-apps/cli [NPM]: 1.0.5
› @tauri-apps/api [NPM]: 1.0.2
› tauri [RUST]: 1.0.5,
› tauri-build [RUST]: 1.0.4,
› tao [RUST]: 0.12.2,
› wry [RUST]: 0.19.0,

App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:5173/
› framework: React

App directory structure
├─ node_modules
├─ src
├─ dist
├─ src-tauri
└─ public

Stack trace

No response

Additional context

No response

@joetifa2003 joetifa2003 added status: needs triage This issue needs to triage, applied to new issues type: bug labels Aug 14, 2022
@FabianLars
Copy link
Member

See dtolnay/anyhow#250 and therefore rust-lang/rust-analyzer#12973.
The solution is to delete the src-tauri/target folder and run cargo check inside src-tauri/ befora rust-analyzer can run (you may need to close the editor for that, not sure how it works).

Super annoying but there's nothing we can do about it :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants