Open HmFlashy opened 1 year ago
Does cargo check --workspace --all-targets
work? This is what rust-analyzer runs. Also how are you running VSCode? Did you install it as pacman package, as flatpak application or in some other way? Does where cc
(that is cc
without a g
) work?
Indeed cargo check --workspace --all-targets
works
I downloaded vscode with snap.
And where cc works with the result /usr/bin/cc
What does snap info --verbose code
and snap connections code
show? I suspect that the sandbox settings are set too strict, preventing access to cc
from within the vscode snap.
name: code
summary: Code editing. Redefined.
health:
status: unknown
message: health has not been set
publisher: Visual Studio Code (vscode✓)
store-url: https://snapcraft.io/code
contact: https://twitter.com/code
links:
contact:
- https://twitter.com/code
website:
- https://code.visualstudio.com/
license: unset
description: |
Visual Studio Code is a new choice of tool that combines the
simplicity of a code editor with what developers need for the core
edit-build-debug cycle.
commands:
- code
- code.url-handler
notes:
private: false
confinement: classic
devmode: false
jailmode: false
trymode: false
enabled: true
broken: false
ignore-validation: false
snap-id: Ht0aUHi7ofh9Fbwh6m7jUN2pAy6kzBiu
tracking: latest/stable
refresh-date: 6 days ago, at 09:41 CET
channels:
latest/stable: ee2b180d 2023-03-15 (122) 250MB classic
latest/candidate: ↑
latest/beta: ↑
latest/edge: ↑
installed: ee2b180d (122) 250MB classic
I get no result from snap connections code
Update: I removed and installed vscode from https://aur.archlinux.org/packages/visual-studio-code-bin So there is no sandbox, and there is still the same error
Did you set the PATH
env var using rust-analyzer.server.extraEnv
? If so maybe this is the same issue as https://github.com/rust-lang/rust-analyzer/issues/14420? That is $PATH
doesn't get expanded, requiring you to manually write the full content you want PATH
to have.
Indeed
"rust-analyzer.server.extraEnv": {
"PATH": "${env:HOME}/multiversx-sdk:${env:HOME}/multiversx-sdk/vendor-rust/bin:${env:HOME}/multiversx-sdk/vmtools:${env:PATH}",
"RUSTUP_HOME": "${env:HOME}/multiversx-sdk/vendor-rust",
"CARGO_HOME": "${env:HOME}/multiversx-sdk/vendor-rust"
},
It works well because I can develop and build what I am developing, just I have this error
I removed the PATH from this settings and it worked, you were right
Did you set the
PATH
env var usingrust-analyzer.server.extraEnv
? If so maybe this is the same issue as #14420? That is$PATH
doesn't get expanded, requiring you to manually write the full content you wantPATH
to have.
Well I did paste the entire contents of the PATH variable there back when #14420 was open and nothing changed — still getting that barrage of errors from rust-analyzer despite being able to build everything successfully otherwise. I wonder therefore if the non-default $RUSTUP_HOME/$CARGO_HOME has something to do with it.
When building my project, I get the following errors: I doesn't do any harm for my developer experience, since it is still indexing my proejct etc... but I get a warning and this message "Failed to run build scripts of some packages" in the little tab in the bottom of VS code
I don't know why it is throwing these errors since I have all gcc, cc, cmake etc... installed correctly and it was working before
rust-analyzer version: 0.4.1450-standalone
rustc version: rustc 1.69.0-nightly (c8e6a9e8b 2023-01-23)