language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Problems count goes bananas (up and down ad infinitum)

Open Gregoor opened this issue 1 year ago • 13 comments

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

Gregoor avatar Jul 01 '24 14:07 Gregoor

@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.

davidmatter avatar Jul 02 '24 22:07 davidmatter

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 avatar Jul 04 '24 10:07 Gregoor

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 avatar Jul 10 '24 11:07 Gregoor

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 avatar Jul 12 '24 09:07 Gregoor

Nevermind, the problem has returned, even with VSCode Insiders

Gregoor avatar Jul 12 '24 09:07 Gregoor

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.

johnsoncodehk avatar Jul 12 '24 11:07 johnsoncodehk

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 avatar Jul 12 '24 12:07 Gregoor

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

Gregoor avatar Jul 15 '24 14:07 Gregoor

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

johnsoncodehk avatar Jul 15 '24 15:07 johnsoncodehk

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

Gregoor avatar Jul 15 '24 15:07 Gregoor

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

johnsoncodehk avatar Jul 15 '24 15:07 johnsoncodehk

@johnsoncodehk it's gregor91

Gregoor avatar Jul 15 '24 15:07 Gregoor

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:

  • Cannot reproduce on my machine with same repo setup.

johnsoncodehk avatar Jul 15 '24 16:07 johnsoncodehk

@Gregoor did you solve the problem? I have a similar situation with a looping call on my mac: [Trace - 12:58:26] Sending notification 'textDocument/didClose'. [Trace - 12:58:26] Sending notification 'textDocument/didClose'. [Trace - 12:58:26] Sending notification 'textDocument/didClose'. [Trace - 12:58:26] Sending notification 'textDocument/didClose'. [Trace - 12:58:26] Sending notification 'textDocument/didClose'. [Trace - 12:58:26] Sending notification 'textDocument/didClose'. [Trace - 12:58:26] Sending notification 'textDocument/didClose'. [Trace - 12:58:26] Sending notification 'textDocument/didClose'. [Trace - 12:58:26] Sending notification 'textDocument/didOpen'. [Trace - 12:58:26] Sending notification 'textDocument/didOpen'. [Trace - 12:58:26] Sending notification 'textDocument/didOpen'. [Trace - 12:58:26] Sending notification 'textDocument/didOpen'.

On a project with a small number of files, this is almost unnoticeable - need to wait a long time for these logs to appear. On a large project, spam Trace occur immediately after it is opened. On a Windows computer, the same project opens without problems and the extension "Vue - official" works without problems.

@johnsoncodehk I always have a problem, regardless of whether Hybrid Mode is on/off.

WebMBX avatar Dec 10 '24 10:12 WebMBX

I fix my problem. In global VS Code settings file I found line: "typescript.tsserver.experimental.enableProjectDiagnostics": true I removed this line and it resolve problem

WebMBX avatar Jan 09 '25 16:01 WebMBX

I fix my problem. In global VS Code settings file I found line: "typescript.tsserver.experimental.enableProjectDiagnostics": true I removed this line and it resolve problem

It would be really nice if this actually worked. This has evidently been a problem for a while: https://stackoverflow.com/questions/78126814/vue-volar-extension-in-visual-studio-code-keeps-crashing-the-js-ts-language-s

dkattan avatar Jun 24 '25 10:06 dkattan