-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Error squiggles don't always update when typing #2448
Comments
Thank you for opening this issue. I have seen some similar strange behavior recently too and it's on my list of things to investigate. We can track that with this issue. |
@bobbrow I am also having an issue with the error squiggles. I was going to open an issue but this line from the original post,
has been happening every time I change a file with my project and I'm pretty sure the same mechanisms are at play here. For a specific example, right now I have Main.cpp and Camera.h. Inside of Camera.h, I had an inline function which was being called in Main.cpp. I deleted the function in Camera.h, but there were no errors in Main.cpp when I went back to it, even though that function no longer existed. That change is actually being detected in some manner, because there is no information when I hover over the now missing function in Main.cpp as opposed to any other valid member from Camera.h. The only way to actually get the error message though is to alter the file (just press space and backspace) and then save like in the issue report. These changes are detected between .h and .cpp of the same name though. I tested a non-inline version, and the cpp file recognized that the function declaration was missing without having to manually alter the file and save it like with Main.cpp, which needed the manual fix in this example as well. Hope any of this helps. |
I have this issue as well and it's maddening at times. I only work in javascript and typescript files and my extensions are:
@viridia, that's my same guess. it's like they throttle instead of debounce. Also: I don't work in cpp so i don't think this is specific to cpp tools
...sigh so relatable |
We fixed squiggle update bugs with 0.19.1: https://github.com/Microsoft/vscode-cpptools/releases/tag/0.19.1-insiders -- so let us know if you still get squiggles not going away -- in some cases in the global scope it can take over 10 seconds to update correctly though, but they shouldn't be "permanently" incorrect, as what sometimes the case previously. On Linux, setting the C_Cpp.updateChannel to "Insiders" should enable auto-updating to the insider version. |
Type: LanguageService
Describe the bug
-- Just the TypeScript linter, which should not be relevant.
The red error squiggles sometimes don't update when I finish typing a line of code, leaving behind a persistent incorrect error message & squiggle even though the code is correct. I'm compiling a fairly large project with clang and the delay between typing and error validation is around 1 second. So if I type a name of a symbols that is, say, a dozen characters in 3 seconds, this means that the error check runs 3 times (I assume it is rate-limited). But it doesn't always run a final time when I stop typing.
I often find myself making a trivial change to the file (hitting spacebar + backspace) to force the error validator to run and get rid of the error squiggles.
My guess is that there's an error in the rate-limiting code, whereby if a file gets marked as "dirty" while the error validator is running gets marked as "clean" when the results come back. This is a fairly easy bug to make in a rate limiter, I've seen similar bugs many times. However, that's just a guess.
To Reproduce
Steps to reproduce the behavior:
The error happens frequently but intermittently, depending on how fast I am typing and the size of the project. There's no way to provide a small code sample that will reproduce it since it only happens on large compiles.
c_cpp_properties.json looks like this:
User settings:
Expected behavior
Error squiggles should reflect the current state of the file, not the state of previous typing.
The text was updated successfully, but these errors were encountered: