microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
165.12k stars 29.59k forks source link

Type checking errors don't update while file is displayed #195753

Closed sam-gronblom-rj closed 8 months ago

sam-gronblom-rj commented 1 year ago

Type: Bug

It usually takes a bit of time for this problem to manifest itself so it's difficult to pinpoint what triggers it. It's also difficult to confirm without some or all plugins enabled.

  1. Use VSCode for some amount of time
  2. Edit a TS file with errors in it
  3. Fix the errors
  4. The red squigglies are still shown
  5. Switch to another file
  6. Switch back
  7. Errors are gone

The expected behavior is obviously that the red squigglies would go away after step 3.

VS Code version: Code 1.83.1 (Universal) (f1b07bd25dfad64b0167beb15359ae573aecd2cc, 2023-10-10T23:46:55.789Z) OS version: Darwin arm64 22.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Max (10 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|9, 10, 10| |Memory (System)|64.00GB (0.23GB free)| |Process Argv|. --crash-reporter-id d03b914e-23da-4b9f-9ed2-7e40a42cdb21| |Screen Reader|no| |VM|0%|
Extensions (38) Extension|Author (truncated)|Version ---|---|--- vscode-openapi|42C|4.18.6 pgformatter|bra|1.27.0 macos-modern-theme|dav|2.3.19 vscode-eslint|dba|2.4.2 xml|Dot|2.5.1 gitlens|eam|14.4.0 EditorConfig|Edi|0.16.4 prettier-vscode|esb|10.1.0 copilot|Git|1.126.0 copilot-chat|Git|0.8.0 vscode-pull-request-github|Git|0.74.0 haskell|has|2.4.1 Ionide-fsharp|Ion|7.15.0 language-haskell|jus|3.6.0 theme-karyfoundation-themes|kar|34.3.0 vscode-docker|ms-|1.27.0 csharp|ms-|2.6.24 vscode-dotnet-runtime|ms-|1.8.1 isort|ms-|2023.10.1 python|ms-|2023.18.0 jupyter|ms-|2023.9.1102792234 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.315.1 vsliveshare|ms-|1.0.5883 sqltools|mtx|0.28.0 rose-pine|mvl|2.9.0 vscode-xml|red|0.26.1 vscode-yaml|red|1.14.0 synthwave-vscode|Rob|0.1.15 rust-analyzer|rus|0.3.1697 jinjahtml|sam|0.20.0 vscode-fileutils|sle|3.10.3 ayu|tea|1.0.5 shellcheck|tim|0.34.0 vim|vsc|1.26.1 (27 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 py29gd2263:30856252 vscaac:30438847 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 282f8724:30602487 f6dab269:30613381 2i9eh265:30646982 showlangstatbar:30737416 962ge761:30841074 03d35959:30757346 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30797651 pythonidxpt:30805730 pythonnoceb:30805159 copilotsettingt:30839829 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30821572 dsvsc015:30845448 ```
sgronblo commented 1 year ago

See the following video for a demo:

https://github.com/microsoft/vscode/assets/320449/373d8140-04a3-4191-baa6-f8409311d66b

As you can see red squigglies should aready be gone since the value of for example executiveChairs has been changed from null to 0. However the red squiggly line only goes away after switching to another file and then switching back.

IllusionMH commented 1 year ago

/confirmPlease

vscodenpa commented 1 year ago

Please diagnose the root cause of the issue by running the command F1 > Help: Troubleshoot Issue and following the instructions. Once you have done that, please update the issue with the results.

Happy Coding!

sgronblo commented 1 year ago

Thanks. It's a bit difficult to use plugin bisect because the error doesn't manifest until after a substantial time of usage. Today it started happening again and I noticed the following runaway process in the Process Explorer:

image

vscodenpa commented 11 months ago

Hey @mjbvz, this issue might need further attention.

@sam-gronblom-rj, you can help us out by closing this issue if the problem no longer exists, or adding more information.

sgronblo commented 11 months ago

Hello bot. It still happens quite frequently. But it's not instantly reproducible. It usually starts happening after having run VSCode for a while, and sometimes it happens on some files but not others. I was hoping by filing a GH issue that somebody might have some ideas what I could check to get more details when it happens.

mjbvz commented 11 months ago

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

sgronblo commented 11 months ago

The difficult part about verifying this is that it doesn't usually happen immediately so earlier when I tried to do the plugin bisect I seemed to be back to the working state when VSCode was reset with some of the plugins disabled.

vscodenpa commented 8 months ago

Hey @mjbvz, this issue might need further attention.

@sam-gronblom-rj, you can help us out by closing this issue if the problem no longer exists, or adding more information.

mjbvz commented 8 months ago

Closing because based on the last comment it sounds like it only happens when plugins are enabled. Please file the issue against the plugin that causes this

sgronblo commented 8 months ago

Thanks... I am happy to file the issue in the right place. I was hoping that VSCode would have a way to help me figure out which plugin is to blame.