Rust Analyzer not working (on flatpak)
Copy paste from GitHub issue:
Trying to use Rust Analyzer (RA) has been a hassle. Firstly, gnome-builder wouldn't respect my $CARGO_HOME
variable, so it would try to download RA to ~/.cargo/bin
and then error out on "file not found" (fixed through symlink). Secondly, even when it manages to download RA and everything seems to be working it errors out on cargo not being found (fixed by installing cargo with rustup outside of the flatpak) (might not be a flatpak bug).
And now thirdly, and the reason for me opening this issue, even when cargo is found and a default toolchain is installed, RA errors out.
Full logs of flatpak run org.gnome.Builder
:
16:37:04.0450 gbp-sysprof-workspace-addin[ 2]: WARNING: Sysprof-3 is not supported, will not enable profiler: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
bwrap: execvp valac: No such file or directory
expected initialized notification, got Ok(Request(Request { id: RequestId(U64(2)), method: "textDocument/documentSymbol", params: Object({"textDocument": Object({"uri": String("file:///var/home/vilgotf/Projekt/INDA20/rust-game/src/main.rs")})}) }))
[ERROR rust_analyzer::reload] failed to load workspace: "cargo" "--version" failed, exit code: 1
stderr:
error: no override and no default toolchain set
Output of cargo --version
(host):
cargo 1.47.0 (f3c7e066a 2020-08-28)
The error message of cargo is only shown when no toolchain is installed/selected as default, but it is somehow displayed inside of the flatpak.
OS: F33 (Silverblue), Flatpak: 1.8.2