Skip to content

rust-analzyer doesn't report error #11075

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

Closed
namse opened this issue Dec 20, 2021 · 7 comments
Closed

rust-analzyer doesn't report error #11075

namse opened this issue Dec 20, 2021 · 7 comments
Assignees
Labels
A-diagnostics diagnostics / error reporting C-support Category: support questions

Comments

@namse
Copy link

namse commented Dec 20, 2021

cargo check reports errors but rust-analyzer doesn't.

vs-code with rust-analyzer
image

cargo check result
image

rust-analyzer version: 0add6e9 2021-12-20 stable

rustc version: rustc 1.56.1 (59eed8a2a 2021-11-01)

@jhgg
Copy link
Contributor

jhgg commented Dec 21, 2021

Perchance, do you have checkOnSave enabled?

@gtsiam
Copy link

gtsiam commented Dec 21, 2021

I've run into this too actually, though it was with nightly toolchains: Every time I updated nightly, I had to do cargo clean and restart vscode, otherwise I wouldn't see any errors.

@namse
Copy link
Author

namse commented Dec 21, 2021

@jhgg

Perchance, do you have checkOnSave enabled?

Yes, it's enabled. Actually it was worked well before, but I got a trouble after put non-wasm project in my wasm project's workspace(Not very sure that is the reason of problem).

For now I deleted workspace (!?) and it works very well. Should I give up using workspace if I do wasm, non-wasm both project together?

@namse
Copy link
Author

namse commented Dec 21, 2021

I was expecting rust-analzyer to tell the user why when a check fails.
The biggest problem, I think, is that rust-analyzer doesn't tell me why.
Nowhere does it tell us why rust-analyzer died. How do I know if a check is failing for some reason?

@namse
Copy link
Author

namse commented Dec 22, 2021

More info!
I found that rust-analyzer hangs without any error reports if there is a build problem with the crate I added.
I use some internal crates with path import.

I hope rust-analzyer to explain to user, which crate rust-analzyer died while checking with a popup at the bottom right of vscode at least.

@Veykril
Copy link
Member

Veykril commented Dec 22, 2021

You mean a dependency of yours failed to build right? Ye that will prevent cargo from doing anymore error checking in your workspace swallowing the errors. We should probably check if we get diagnostics in non-workspace dependencies and notify the user about that.

@flodiebold flodiebold added the C-support Category: support questions label Mar 31, 2022
@Veykril Veykril added the A-diagnostics diagnostics / error reporting label Apr 11, 2022
@Veykril Veykril self-assigned this Apr 11, 2022
@Veykril
Copy link
Member

Veykril commented Apr 15, 2022

Fixed in #11960

@Veykril Veykril closed this as completed Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics diagnostics / error reporting C-support Category: support questions
Projects
None yet
Development

No branches or pull requests

5 participants