Skip to content

no highliting when cmake compilation fails #11223

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
Tracked by #11387 ...
lukaz-vaultree-com opened this issue Jan 7, 2022 · 6 comments · Fixed by #11960
Closed
Tracked by #11387 ...

no highliting when cmake compilation fails #11223

lukaz-vaultree-com opened this issue Jan 7, 2022 · 6 comments · Fixed by #11960
Labels
A-diagnostics diagnostics / error reporting A-ide general IDE features A-vscode vscode plugin issues Broken Window Bugs / technical debt to be addressed immediately S-actionable Someone could pick this issue up and work on it right now

Comments

@lukaz-vaultree-com
Copy link

Hi, my code was not highliting the errors and I took entire day to realize it was because the cmake C++ part of the code was failing to compile.

Maybe add this failure info at least on the output?

@Veykril
Copy link
Member

Veykril commented Jan 7, 2022

So in a nutshell what is happening is that a dependency fails to build with an error, and we end up just eating that error without showing the user any such information right?

@Veykril Veykril added A-diagnostics diagnostics / error reporting A-ide general IDE features Broken Window Bugs / technical debt to be addressed immediately S-actionable Someone could pick this issue up and work on it right now labels Jan 7, 2022
@lukaz-vaultree-com
Copy link
Author

Yes. If the build.rs fails, then nothing is displayed and the error highlighting does not work, which made me unaware of what was happening

@Veykril
Copy link
Member

Veykril commented Jan 13, 2022

So I just checked, if you have a dependency whose build script fails to build r-a does show you a warning status
image

@lukaz-vaultree-com
Copy link
Author

@Veykril yes, I saw that but once I hovered my mouse it pops-up a giant message but for less than 0.1 second so I could not read it. Reading the rust-analyzer output on the VSCode outputs did not show an error

@jonas-schievink
Copy link
Contributor

I've noticed that the popup can get so large that it appears under the cursor, which causes VS Code / Electron to immediately hide it again, which then makes it pop up again, using a lot of CPU, so I'm guessing we aren't meant to put that much text in it :)

I'm not really sure how to do better here – we could emit an actual diagnostic and put it in the workspace's Cargo.toml, or print it to stderr when the rust-analyzer logo is clicked, but neither seems ideal.

@bjorn3
Copy link
Member

bjorn3 commented Jan 14, 2022

What about opening a new special page filled by rust-analyzer just like for example the memory stats? Also is it possible for the problems pane to refer to such special page? Or can it only refer to regular source files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics diagnostics / error reporting A-ide general IDE features A-vscode vscode plugin issues Broken Window Bugs / technical debt to be addressed immediately S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants