vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.87k stars 405 forks source link

Problems count goes bananas (up and down ad infinitum) #4519

Open Gregoor opened 4 months ago

Gregoor commented 4 months ago

Vue - Official extension or vue-tsc version

Vue - Official extension

VSCode version

1.90.2

Vue version

3.4.30

TypeScript version

5.5.2

System Info

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M3
    Memory: 171.89 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/Library/Caches/fnm_multishells/12157_1719844539387/bin/node
    Yarn: 1.22.22 - ~/Library/Caches/fnm_multishells/12157_1719844539387/bin/yarn
    npm: 10.2.4 - ~/Library/Caches/fnm_multishells/12157_1719844539387/bin/npm
    pnpm: 9.4.0 - ~/Library/Caches/fnm_multishells/12157_1719844539387/bin/pnpm
  Browsers:
    Safari: 17.4.1

Steps to reproduce

  1. clone https://github.com/varfish-org/varfish-server (needs git-lfs)
  2. open VSCode with the official Vue extension installed

What is expected?

A calm editing experience that does not heat up my laptop

What is actually happening?

https://github.com/vuejs/language-tools/assets/4051932/42d3ed60-203a-4cf4-be2c-a53e4f9d7099

(the loop is not in the video but in reality)

Link to minimal reproduction

No response

Any additional comments?

This problem disappears when disabling the extension, hence it looks like the culprit

davidmatter commented 4 months ago

@Gregoor What kind of errors are showing up in the Problems tab? I had a quick look into your repo and wasn't able to build it or run tests. Please define more comprehensive instructions how others can reproduce this issue.

Gregoor commented 4 months ago

thanks for getting back to me! I think the problems only show up in submodule files (so one needs to clone the repo recursively), and as soon as I open one of the submodule files, the error disappears and the problem count stabilizes (does no go bananas anymore). When I switch back to the other files, it goes bananas again.

Gregoor commented 4 months ago

Actually I can't reproduce the problem count stabilizing, when opening a submodule file, anymore. Maybe I was just correlating some other random behavior

Gregoor commented 4 months ago

Alright, as someone mentioned in #3981, using VSCode Insiders does resolve it.

I'd still take an infinite loop as indicative of a deeper problem, but as I'm not a maintainer here, I can't say what has priority here. Thanks for working on this extension!

Gregoor commented 4 months ago

Nevermind, the problem has returned, even with VSCode Insiders

johnsoncodehk commented 4 months ago

Can you provide more complete steps to reproduce? Such as how to clone recursively, whether to execute npm/pnpm install, and problems when switching from which file to which file.

Gregoor commented 4 months ago

Sure! A git clone --recursive should be enough. And then open e.g. frontend/src/cases/components/ModalPedigreeEditor.vue and the problem(s) should appear

Gregoor commented 4 months ago

I enabled logging vor the Vue language server and I did see a constant stream of

[Trace - 4:08:46 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:46 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:46 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:46 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:46 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didClose'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didClose'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didClose'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didClose'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didClose'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didClose'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didClose'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didClose'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didClose'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didClose'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didOpen'.
[Trace - 4:08:47 PM] Sending notification 'textDocument/didOpen'.

without me actually opening or closing documents. Not sure what it means

johnsoncodehk commented 4 months ago

Can you help us investigate the issue via remote desktop? https://github.com/vuejs/language-tools/wiki/Help-Us-Investigate-Issues-Remotely

Gregoor commented 4 months ago

@johnsoncodehk I'd prefer not to, for security reasons. I'd be happy to do a video call and follow instructions though!

johnsoncodehk commented 4 months ago

@Gregoor Video call sounds great, what is your discord ID?

Gregoor commented 4 months ago

@johnsoncodehk it's gregor91

johnsoncodehk commented 4 months ago

Investigation record:

  1. The problem still exists when disabling all extensions and only enabling Vue - Official
  2. The problem disappears when Hybird Mode is disabled.
  3. The problem no longer occurs when Hybrid Mode is enabled again.

Other informations: