-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Some compiler errors are not highlighted in editor (vscode) #1628
Comments
In the upcoming version 6, we use |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@Veykril What is the best next step? Should I open an issue in the This isn't specific to VS-Code. I can also reproduce it in Helix. Here is how to reproduce it in VS-Code: cargo install rustlings
rustlings init
cd rustlings
code . Almost all files should contain errors, but some errors aren't shown. |
This comment was marked as resolved.
This comment was marked as resolved.
Ah you are talking about |
It seems cargo is not reporting all errors. r-a invokes |
Yes, This is how it is supposed to look like: I got the second screenshot after saving the file for 2-3 times. |
@Veykril The required Cargo option is Is it fine to add This should be done depending on the available Rust version like this snippet because |
Oh that is a good point. Yes we should unconditionally throw that into the |
Add --keep-going to the check command Fixes rust-lang/rustlings#1628 `@Veykril` I am not sure about what you meant with "unconditionally" in rust-lang/rustlings#1628 (comment), but I didn't find out how to get the version of the toolchain anyway to do a check like in [this snippet](https://github.com/rust-lang/rust-analyzer/blob/a5b21ea0aa644dffd7cf958b43f11f221d53404e/crates/project-model/src/build_scripts.rs#L125-L127). Is this check even required if rust-analyzer was installed with the toolchain? `--keep-going` was [stabilized in 1.74](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-174-2023-11-16)
A fix has been merged into Rust-Analyzer :D |
Add --keep-going to the check command Fixes rust-lang/rustlings#1628 `@Veykril` I am not sure about what you meant with "unconditionally" in rust-lang/rustlings#1628 (comment), but I didn't find out how to get the version of the toolchain anyway to do a check like in [this snippet](https://github.com/rust-lang/rust-analyzer/blob/a5b21ea0aa644dffd7cf958b43f11f221d53404e/crates/project-model/src/build_scripts.rs#L125-L127). Is this check even required if rust-analyzer was installed with the toolchain? `--keep-going` was [stabilized in 1.74](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-174-2023-11-16)
rustc --version
: rustc 1.71.1 (eb26296b5 2023-08-03)rustlings --version
: v5.5.1OS: Microsoft Windows 10 Home 10.0.19045 Build 19045
rust-analyzer
vscode plugin version: v0.4.1627vscode version: 1.81.1
ls -la
When going through exercise enums3.rs, I noticed that certain errors won't be highlighted in the editor (vscode), but will be caught by
rustlings run enums3
. Here's a modified version of enums3.rs that contains errors which should be highlighted but are not.An interesting bit is that if you delete
not_an_inscope_variable
, I do get error highlighting for the wrong number of arguments error (E0107).I'm guessing this has to do with the relationship between the unique project structure of rustlings and the
rust-analyzer
plugin. I was not able to reproduce this problem inside a project with a normal structure, as the errors were appropriately highlighted inside the editor.If this turns out to be a
rust-analyzer
problem, I'd be happy to open an issue there.The text was updated successfully, but these errors were encountered: