Skip to content
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

[TypeScript] TSServer createFileSystemWatcher crashes with yarn PnP #212042

Closed
BurningEnlightenment opened this issue May 5, 2024 · 9 comments
Closed
Assignees
Labels
file-watcher File watcher typescript Typescript support issues under-discussion Issue is under discussion for relevance, priority, approach

Comments

@BurningEnlightenment
Copy link

BurningEnlightenment commented May 5, 2024

TL;DR "typescript.tsserver.experimental.useVsCodeWatcher": true + yarn PnP = TSServer constantly crashing. Related Tickets #210687, #208872, #193848 (MCVE: https://github.com/BurningEnlightenment/reprex-vscode-ts-filewatcher)

After starting VSCode today I got greeted with an error about TSServer being unavailable due to repeated crashes without any helpful log output:

2024-05-05 09:15:01.395 [info] Starting TS Server
2024-05-05 09:15:01.395 [info] Using tsserver from: d:\devel\source\zenbox\repro-vscode-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-05 09:15:01.395 [info] <syntax> Forking...
2024-05-05 09:15:01.395 [info] <syntax> Starting...
2024-05-05 09:15:01.395 [info] <semantic> Forking...
2024-05-05 09:15:01.395 [info] <semantic> Starting...
2024-05-05 09:15:01.693 [error] TSServer exited. Code: 1. Signal: null

Enabling the verbose log didn't reveal anything interesting either:

Info 0    [08:23:19.874] Starting TS Server
Info 1    [08:23:19.874] Version: 5.4.5
Info 2    [08:23:19.874] Arguments: D:\Program Files\Microsoft VS Code\Code.exe d:\devel\source\zenbox\repro-vscode-filewatcher\.yarn\sdks\typescript\lib\tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName C:\Users\<redacted>\AppData\Local\Temp\vscode-typescript\3ef5e001a09f1e55f983\tscancellation-707e108b83851806c795.tmp* --logVerbosity verbose --logFile c:\Users\<redacted>\AppData\Roaming\Code\logs\20240505T082314\window1\exthost\vscode.typescript-language-features\tsserver-log-yHjYLz\tsserver.log --locale en --noGetErrOnBackgroundUpdate --canUseWatchEvents --validateDefaultNpmLocation --useNodeIpc
Info 3    [08:23:19.874] Platform: win32 NodeVersion: v18.18.2 CaseSensitive: true
Info 4    [08:23:19.875] ServerMode: undefined hasUnknownServerMode: undefined
Info 5    [08:23:19.877] Binding...
Info 6    [08:23:19.885] FileWatcher:: Added:: WatchInfo: d:\devel\source\zenbox\repro-vscode-filewatcher\.pnp.cjs 250 undefined WatchType: Config file

So I started flipping extension settings and was able to narrow it down to typescript.tsserver.experimental.useVsCodeWatcher. If enabled TSServer started crashing and if disabled it worked again. I think this is related to how yarn hooks the SDK in PnP mode.

I assembled a MCVE over here: https://github.com/BurningEnlightenment/reprex-vscode-ts-filewatcher

A/B Experiment Info ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 ccp2r3:30993541 dsvsc020:30976470 pythonait:31006305 chatpanelc:31018788 dsvsc021:30996838 9c06g630:31013171 pythoncenvpt:31022790 a69g1124:31038041 dwnewjupytercf:31035177 ```
@bpasero
Copy link
Member

bpasero commented May 6, 2024

I cannot reproduce this on Windows at least:

image

After opening main.ts can you do this:

  • command palette
  • developer: set log level
  • pick "trace"
  • from the output panel view
  • select the "file watcher" entry
  • paste the contents here

@bpasero bpasero self-assigned this May 6, 2024
@bpasero bpasero added info-needed Issue requires more information from poster typescript Typescript support issues file-watcher File watcher labels May 6, 2024
@BurningEnlightenment
Copy link
Author

Hi, thanks for the quick response 🙂

I cannot reproduce this on Windows at least:

I am also using Windows and I have reproduced this on two different machines (Win10 and Win11). Additionally I have tested this with a new Profile in order to eliminate interference from other extensions or misconfiguration.

After opening main.ts can you do this:

I've attached TSServer and File Watcher logs from the same session, i.e. the timestamps should match properly. However, I didn't see anything suspicious.

File Watcher (trace) logs
2024-05-06 09:46:50.380 [trace] 

[File Watcher] request stats:

[Summary]
- Recursive Requests:     total: 1, suspended: 0, polling: 0
- Non-Recursive Requests: total: 14, suspended: 0, polling: 0
- Recursive Watchers:     total: 1, active: 1, failed: 0, stopped: 0
- Non-Recursive Watchers: total: 14, active: 7, failed: 7, reusing: 0
- I/O Handles Impact:     total: 8

[Recursive Requests (1, suspended: 0, polling: 0)]:
 d:\source\zenbox\reprex-vscode-ts-filewatcher	(excludes: **/.git/objects/**,**/.git/subtree-cache/**,**/node_modules/*/**,**/.hg/store/**, includes: <all>, filter: <none>, correlationId: <none>)

[Recursive Watchers (1, active: 1, failed: 0, stopped: 0)]:
 d:\source\zenbox\reprex-vscode-ts-filewatcher              	(excludes: **/.git/objects/**,**/.git/subtree-cache/**,**/node_modules/*/**,**/.hg/store/**, includes: <all>, filter: <none>, correlationId: <none>)

[Non-Recursive Requests (14, suspended: 0, polling: 0)]:
 c:\Users\<redacted>\AppData\Roaming\Code\User                                    	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af                 	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\keybindings.json	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\settings.json   	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\snippets        	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\tasks.json      	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\settings.json                      	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.git                             	(excludes: <none>, includes: ["**/.git/objects/**/**","**/.git/subtree-cache/**/**","**/node_modules/*/**/**","**/.hg/store/**/**"], filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.git\refs\remotes\origin\master  	(excludes: <none>, includes: ["**/.git/objects/**/**","**/.git/subtree-cache/**/**","**/node_modules/*/**/**","**/.hg/store/**/**"], filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode                          	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\extensions               	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\launch.json              	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\settings.json            	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\tasks.json               	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)

[Non-Recursive Watchers (14, active: 7, failed: 7, reusing: 0)]:
 c:\Users\<redacted>\AppData\Roaming\Code\User                                    	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af                 	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\snippets        	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\settings.json                      	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.git                             	(excludes: <none>, includes: ["**/.git/objects/**/**","**/.git/subtree-cache/**/**","**/node_modules/*/**/**","**/.hg/store/**/**"], filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode                          	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\settings.json            	(excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\keybindings.json	[FAILED] (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\settings.json   	[FAILED] (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\tasks.json      	[FAILED] (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.git\refs\remotes\origin\master  	[FAILED] (excludes: <none>, includes: ["**/.git/objects/**/**","**/.git/subtree-cache/**/**","**/node_modules/*/**/**","**/.hg/store/**/**"], filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\extensions               	[FAILED] (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\launch.json              	[FAILED] (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
 d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\tasks.json               	[FAILED] (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)


2024-05-06 09:46:52.879 [trace] [File Watcher (node.js)] Request to start watching: c:\Users\<redacted>\AppData\Roaming\Code\User (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>),c:\Users\<redacted>\AppData\Roaming\Code\User\settings.json (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>),c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>),c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\settings.json (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>),d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>),d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\settings.json (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>),d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\tasks.json (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>),d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\launch.json (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>),c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\keybindings.json (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
2024-05-06 09:46:52.879 [trace] [File Watcher (node.js)] ignoring a path for watching who's stat info failed to resolve: d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\tasks.json (error: Error: ENOENT: no such file or directory, stat 'd:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\tasks.json')
2024-05-06 09:46:52.879 [trace] [File Watcher (node.js)] ignoring a path for watching who's stat info failed to resolve: d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\launch.json (error: Error: ENOENT: no such file or directory, stat 'd:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\launch.json')
2024-05-06 09:46:52.879 [trace] [File Watcher (node.js)] Started watching: 'd:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode'
2024-05-06 09:46:52.879 [trace] [File Watcher (node.js)] ignoring a path for watching who's stat info failed to resolve: c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\settings.json (error: Error: ENOENT: no such file or directory, stat 'c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\settings.json')
2024-05-06 09:46:52.879 [trace] [File Watcher (node.js)] ignoring a path for watching who's stat info failed to resolve: c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\keybindings.json (error: Error: ENOENT: no such file or directory, stat 'c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\keybindings.json')
2024-05-06 09:46:52.879 [trace] [File Watcher (node.js)] Started watching: 'd:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\settings.json'
2024-05-06 09:46:52.879 [trace] [File Watcher (node.js)] Started watching: 'c:\Users\<redacted>\AppData\Roaming\Code\User'
2024-05-06 09:46:52.879 [trace] [File Watcher (node.js)] Started watching: 'c:\Users\<redacted>\AppData\Roaming\Code\User\settings.json'
2024-05-06 09:46:52.879 [trace] [File Watcher (node.js)] Started watching: 'c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af'
2024-05-06 09:46:52.968 [trace] [File Watcher (node.js)] Request to start watching: c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\tasks.json (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
2024-05-06 09:46:52.968 [trace] [File Watcher (node.js)] ignoring a path for watching who's stat info failed to resolve: c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\tasks.json (error: Error: ENOENT: no such file or directory, stat 'c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\tasks.json')
2024-05-06 09:46:52.987 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:46:52.987 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:46:52.987 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:46:52.987 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:46:53.003 [trace] [File Watcher (node.js)] Request to start watching: c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\snippets (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
2024-05-06 09:46:53.004 [trace] [File Watcher (node.js)] Started watching: 'c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\snippets'
2024-05-06 09:46:53.068 [trace] [File Watcher (node.js)]  >> normalized [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:46:53.083 [trace] [File Watcher (parcel)] Request to start watching: d:\source\zenbox\reprex-vscode-ts-filewatcher (excludes: **/.git/objects/**,**/.git/subtree-cache/**,**/node_modules/*/**,**/.hg/store/**, includes: <all>, filter: <none>, correlationId: <none>)
2024-05-06 09:46:53.083 [trace] [File Watcher (parcel)] Started watching: 'd:\source\zenbox\reprex-vscode-ts-filewatcher' with backend 'windows'
2024-05-06 09:46:53.251 [trace] [File Watcher (node.js)] Request to start watching: d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\extensions (excludes: <none>, includes: <all>, filter: <none>, correlationId: <none>)
2024-05-06 09:46:53.252 [trace] [File Watcher (node.js)] ignoring a path for watching who's stat info failed to resolve: d:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\extensions (error: Error: ENOENT: no such file or directory, stat 'd:\source\zenbox\reprex-vscode-ts-filewatcher\.vscode\extensions')
2024-05-06 09:46:53.426 [trace] [File Watcher (node.js)] Request to start watching: d:\source\zenbox\reprex-vscode-ts-filewatcher\.git (excludes: <none>, includes: ["**/.git/objects/**/**","**/.git/subtree-cache/**/**","**/node_modules/*/**/**","**/.hg/store/**/**"], filter: <none>, correlationId: <none>)
2024-05-06 09:46:53.429 [trace] [File Watcher (node.js)] Started watching: 'd:\source\zenbox\reprex-vscode-ts-filewatcher\.git'
2024-05-06 09:46:53.436 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:46:53.436 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:46:53.436 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:46:53.436 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:46:53.513 [trace] [File Watcher (node.js)]  >> normalized [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:46:53.670 [trace] [File Watcher (node.js)] Request to start watching: d:\source\zenbox\reprex-vscode-ts-filewatcher\.git\refs\remotes\origin\master (excludes: <none>, includes: ["**/.git/objects/**/**","**/.git/subtree-cache/**/**","**/node_modules/*/**/**","**/.hg/store/**/**"], filter: <none>, correlationId: <none>)
2024-05-06 09:46:53.670 [trace] [File Watcher (node.js)] ignoring a path for watching who's stat info failed to resolve: d:\source\zenbox\reprex-vscode-ts-filewatcher\.git\refs\remotes\origin\master (error: Error: ENOENT: no such file or directory, stat 'd:\source\zenbox\reprex-vscode-ts-filewatcher\.git\refs\remotes\origin\master')
2024-05-06 09:46:55.402 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:46:55.402 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:46:55.402 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:46:55.402 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:46:55.478 [trace] [File Watcher (node.js)]  >> normalized [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:46:56.031 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:46:56.032 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\globalStorage
2024-05-06 09:46:56.032 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:46:56.032 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\globalStorage
2024-05-06 09:46:56.109 [trace] [File Watcher (node.js)]  >> normalized [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\globalStorage
2024-05-06 09:47:30.224 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:47:30.224 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:47:30.224 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:47:30.224 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:47:30.301 [trace] [File Watcher (node.js)]  >> normalized [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\profiles\-30d8f5af\globalStorage
2024-05-06 09:47:36.973 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:47:36.973 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\globalStorage
2024-05-06 09:47:36.974 [trace] [File Watcher (node.js)] [raw] ["change"] globalStorage
2024-05-06 09:47:36.974 [trace] [File Watcher (node.js)] [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\globalStorage
2024-05-06 09:47:37.064 [trace] [File Watcher (node.js)]  >> normalized [CHANGED] c:\Users\<redacted>\AppData\Roaming\Code\User\globalStorage
TSServer (trace) logs
2024-05-06 09:45:27.853 [info] Starting TS Server
2024-05-06 09:45:27.853 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:45:27.853 [info] <syntax> Forking...
2024-05-06 09:45:27.853 [info] <syntax> Starting...
2024-05-06 09:45:27.853 [info] <semantic> Forking...
2024-05-06 09:45:27.853 [info] <semantic> Starting...
2024-05-06 09:45:28.182 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:45:28.182 [info] Starting TS Server
2024-05-06 09:45:28.182 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:45:28.182 [info] <syntax> Forking...
2024-05-06 09:45:28.182 [info] <syntax> Starting...
2024-05-06 09:45:28.182 [info] <semantic> Forking...
2024-05-06 09:45:28.182 [info] <semantic> Starting...
2024-05-06 09:45:28.517 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:45:28.518 [info] Starting TS Server
2024-05-06 09:45:28.518 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:45:28.518 [info] <syntax> Forking...
2024-05-06 09:45:28.518 [info] <syntax> Starting...
2024-05-06 09:45:28.518 [info] <semantic> Forking...
2024-05-06 09:45:28.518 [info] <semantic> Starting...
2024-05-06 09:45:28.843 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:45:28.843 [info] Starting TS Server
2024-05-06 09:45:28.843 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:45:28.843 [info] <syntax> Forking...
2024-05-06 09:45:28.843 [info] <syntax> Starting...
2024-05-06 09:45:28.843 [info] <semantic> Forking...
2024-05-06 09:45:28.843 [info] <semantic> Starting...
2024-05-06 09:45:29.169 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:45:29.169 [info] Starting TS Server
2024-05-06 09:45:29.169 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:45:29.169 [info] <syntax> Forking...
2024-05-06 09:45:29.169 [info] <syntax> Starting...
2024-05-06 09:45:29.169 [info] <semantic> Forking...
2024-05-06 09:45:29.169 [info] <semantic> Starting...
2024-05-06 09:45:29.513 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:45:29.514 [info] Starting TS Server
2024-05-06 09:45:29.514 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:45:29.514 [info] <syntax> Forking...
2024-05-06 09:45:29.514 [info] <syntax> Starting...
2024-05-06 09:45:29.514 [info] <semantic> Forking...
2024-05-06 09:45:29.514 [info] <semantic> Starting...
2024-05-06 09:45:29.787 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:46:53.118 [info] Starting TS Server
2024-05-06 09:46:53.118 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:46:53.118 [info] <syntax> Forking...
2024-05-06 09:46:53.118 [info] <syntax> Starting...
2024-05-06 09:46:53.119 [info] <semantic> Forking...
2024-05-06 09:46:53.119 [info] <semantic> Starting...
2024-05-06 09:46:53.119 [trace] <syntax> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:53.119 [trace] <semantic> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:53.119 [trace] <semantic> Sending request: compilerOptionsForInferredProjects (1). Response expected: no. Current queue length: 0 {
    "options": {
        "module": "ESNext",
        "moduleResolution": "Bundler",
        "target": "ES2020",
        "jsx": "react",
        "allowImportingTsExtensions": true,
        "strictNullChecks": true,
        "strictFunctionTypes": true,
        "sourceMap": true,
        "allowJs": true,
        "allowSyntheticDefaultImports": true,
        "allowNonTsExtensions": true,
        "resolveJsonModule": true
    }
}
2024-05-06 09:46:53.119 [trace] <syntax> Sending request: updateOpen (1). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:53.119 [trace] <semantic> Sending request: updateOpen (2). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:53.119 [trace] <syntax> Canceled request with sequence number 2
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 4
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 5
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 6
2024-05-06 09:46:53.119 [trace] <syntax> Canceled request with sequence number 3
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 7
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 8
2024-05-06 09:46:53.119 [trace] <syntax> Canceled request with sequence number 4
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 9
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 10
2024-05-06 09:46:53.119 [trace] <syntax> Canceled request with sequence number 5
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 11
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 12
2024-05-06 09:46:53.119 [trace] <syntax> Canceled request with sequence number 6
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 13
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 14
2024-05-06 09:46:53.119 [trace] <syntax> Canceled request with sequence number 7
2024-05-06 09:46:53.119 [trace] <semantic> Canceled request with sequence number 15
2024-05-06 09:46:53.257 [trace] <semantic> Canceled request with sequence number 16
2024-05-06 09:46:53.257 [trace] <syntax> Canceled request with sequence number 8
2024-05-06 09:46:53.257 [trace] <semantic> Canceled request with sequence number 17
2024-05-06 09:46:53.411 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:46:53.411 [info] Starting TS Server
2024-05-06 09:46:53.411 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:46:53.411 [info] <syntax> Forking...
2024-05-06 09:46:53.411 [info] <syntax> Starting...
2024-05-06 09:46:53.411 [info] <semantic> Forking...
2024-05-06 09:46:53.411 [info] <semantic> Starting...
2024-05-06 09:46:53.411 [trace] <syntax> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:53.411 [trace] <semantic> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:53.411 [trace] <semantic> Sending request: compilerOptionsForInferredProjects (1). Response expected: no. Current queue length: 0 {
    "options": {
        "module": "ESNext",
        "moduleResolution": "Bundler",
        "target": "ES2020",
        "jsx": "react",
        "allowImportingTsExtensions": true,
        "strictNullChecks": true,
        "strictFunctionTypes": true,
        "sourceMap": true,
        "allowJs": true,
        "allowSyntheticDefaultImports": true,
        "allowNonTsExtensions": true,
        "resolveJsonModule": true
    }
}
2024-05-06 09:46:53.412 [trace] <syntax> Sending request: updateOpen (1). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:53.412 [trace] <semantic> Sending request: updateOpen (2). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:53.751 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:46:53.751 [info] Starting TS Server
2024-05-06 09:46:53.751 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:46:53.751 [info] <syntax> Forking...
2024-05-06 09:46:53.751 [info] <syntax> Starting...
2024-05-06 09:46:53.751 [info] <semantic> Forking...
2024-05-06 09:46:53.751 [info] <semantic> Starting...
2024-05-06 09:46:53.751 [trace] <semantic> Canceled request with sequence number 4
2024-05-06 09:46:53.751 [trace] <syntax> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:53.751 [trace] <semantic> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:53.751 [trace] <semantic> Sending request: compilerOptionsForInferredProjects (1). Response expected: no. Current queue length: 0 {
    "options": {
        "module": "ESNext",
        "moduleResolution": "Bundler",
        "target": "ES2020",
        "jsx": "react",
        "allowImportingTsExtensions": true,
        "strictNullChecks": true,
        "strictFunctionTypes": true,
        "sourceMap": true,
        "allowJs": true,
        "allowSyntheticDefaultImports": true,
        "allowNonTsExtensions": true,
        "resolveJsonModule": true
    }
}
2024-05-06 09:46:53.767 [trace] <syntax> Sending request: updateOpen (1). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:53.767 [trace] <semantic> Sending request: updateOpen (2). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:54.090 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:46:54.090 [info] Starting TS Server
2024-05-06 09:46:54.090 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:46:54.090 [info] <syntax> Forking...
2024-05-06 09:46:54.090 [info] <syntax> Starting...
2024-05-06 09:46:54.090 [info] <semantic> Forking...
2024-05-06 09:46:54.090 [info] <semantic> Starting...
2024-05-06 09:46:54.090 [trace] <semantic> Canceled request with sequence number 4
2024-05-06 09:46:54.090 [trace] <syntax> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:54.090 [trace] <semantic> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:54.090 [trace] <semantic> Sending request: compilerOptionsForInferredProjects (1). Response expected: no. Current queue length: 0 {
    "options": {
        "module": "ESNext",
        "moduleResolution": "Bundler",
        "target": "ES2020",
        "jsx": "react",
        "allowImportingTsExtensions": true,
        "strictNullChecks": true,
        "strictFunctionTypes": true,
        "sourceMap": true,
        "allowJs": true,
        "allowSyntheticDefaultImports": true,
        "allowNonTsExtensions": true,
        "resolveJsonModule": true
    }
}
2024-05-06 09:46:54.295 [trace] <syntax> Sending request: updateOpen (1). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:54.295 [trace] <semantic> Sending request: updateOpen (2). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:54.403 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:46:54.403 [info] Starting TS Server
2024-05-06 09:46:54.403 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:46:54.403 [info] <syntax> Forking...
2024-05-06 09:46:54.403 [info] <syntax> Starting...
2024-05-06 09:46:54.403 [info] <semantic> Forking...
2024-05-06 09:46:54.403 [info] <semantic> Starting...
2024-05-06 09:46:54.403 [trace] <semantic> Canceled request with sequence number 3
2024-05-06 09:46:54.404 [trace] <syntax> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:54.404 [trace] <semantic> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:54.404 [trace] <semantic> Sending request: compilerOptionsForInferredProjects (1). Response expected: no. Current queue length: 0 {
    "options": {
        "module": "ESNext",
        "moduleResolution": "Bundler",
        "target": "ES2020",
        "jsx": "react",
        "allowImportingTsExtensions": true,
        "strictNullChecks": true,
        "strictFunctionTypes": true,
        "sourceMap": true,
        "allowJs": true,
        "allowSyntheticDefaultImports": true,
        "allowNonTsExtensions": true,
        "resolveJsonModule": true
    }
}
2024-05-06 09:46:54.603 [trace] <syntax> Sending request: updateOpen (1). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:54.603 [trace] <semantic> Sending request: updateOpen (2). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:54.719 [error] TSServer exited. Code: 1. Signal: null
2024-05-06 09:46:54.719 [info] Starting TS Server
2024-05-06 09:46:54.719 [info] Using tsserver from: d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
2024-05-06 09:46:54.719 [info] <syntax> Forking...
2024-05-06 09:46:54.719 [info] <syntax> Starting...
2024-05-06 09:46:54.719 [info] <semantic> Forking...
2024-05-06 09:46:54.719 [info] <semantic> Starting...
2024-05-06 09:46:54.719 [trace] <semantic> Canceled request with sequence number 3
2024-05-06 09:46:54.719 [trace] <syntax> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:54.719 [trace] <semantic> Sending request: configure (0). Response expected: no. Current queue length: 0 {
    "hostInfo": "vscode",
    "preferences": {
        "providePrefixAndSuffixTextForRename": true,
        "allowRenameOfImportPath": true,
        "includePackageJsonAutoImports": "auto",
        "excludeLibrarySymbolsInNavTo": true
    },
    "watchOptions": {}
}
2024-05-06 09:46:54.719 [trace] <semantic> Sending request: compilerOptionsForInferredProjects (1). Response expected: no. Current queue length: 0 {
    "options": {
        "module": "ESNext",
        "moduleResolution": "Bundler",
        "target": "ES2020",
        "jsx": "react",
        "allowImportingTsExtensions": true,
        "strictNullChecks": true,
        "strictFunctionTypes": true,
        "sourceMap": true,
        "allowJs": true,
        "allowSyntheticDefaultImports": true,
        "allowNonTsExtensions": true,
        "resolveJsonModule": true
    }
}
2024-05-06 09:46:54.919 [trace] <syntax> Sending request: updateOpen (1). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:54.919 [trace] <semantic> Sending request: updateOpen (2). Response expected: yes. Current queue length: 0 {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
        {
            "file": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher\\main.ts",
            "fileContent": "console.log(\"hello world\");\n",
            "projectRootPath": "d:\\source\\zenbox\\reprex-vscode-ts-filewatcher",
            "scriptKindName": "TS"
        }
    ]
}
2024-05-06 09:46:54.988 [error] TSServer exited. Code: 1. Signal: null

@bpasero
Copy link
Member

bpasero commented May 6, 2024

@BurningEnlightenment there is no indication that the setting is applied. It requires the latest version of 5.4.4 to function and will otherwise be ignored (unless there is a bug in our logic).

See: https://github.com/microsoft/vscode/pull/193848/files#diff-49ee781157fc84a00e31c1094f827b26eaba9e688e54cacd48f64a93525ba82dR274

@BurningEnlightenment
Copy link
Author

BurningEnlightenment commented May 6, 2024

@bpasero Just so that we don't talk past each other: 5.4.4 is the typescript SDK version? I think the MCVE references 5.4.5

I stalled the ts server at startup with a busy loop in .yarn\sdks\typescript\lib\tsserver.js to prevent it from crashing and extracted the startup command line with Process Explorer:
With "typescript.tsserver.experimental.useVsCodeWatcher": true (forced via .vscode/settings.json):

"C:\Users\<redacted>\AppData\Local\Programs\Microsoft VS Code\Code.exe"
--max-old-space-size=3072 d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
--useInferredProjectPerProjectRoot
--enableTelemetry
--cancellationPipeName C:\Users\<redacted>\AppData\Local\Temp\vscode-typescript\a051bfc47e46f2259b02\tscancellation-4b11bc3d299edcf87653.tmp*
--locale en
--noGetErrOnBackgroundUpdate
--canUseWatchEvents
--validateDefaultNpmLocation
--useNodeIpc

With "typescript.tsserver.experimental.useVsCodeWatcher": false:

"C:\Users\<redacted>\AppData\Local\Programs\Microsoft VS Code\Code.exe"
--max-old-space-size=3072 d:\source\zenbox\reprex-vscode-ts-filewatcher\.yarn\sdks\typescript\lib\tsserver.js
--useInferredProjectPerProjectRoot
--enableTelemetry
--cancellationPipeName C:\Users\<redacted>\AppData\Local\Temp\vscode-typescript\6c192d3f873d1e35e117\tscancellation-9dc053c4aac4ccbc09c9.tmp*
--locale en
--noGetErrOnBackgroundUpdate
--validateDefaultNpmLocation
--useNodeIpc

So --canUseWatchEvents does get passed to tsserver.

@BurningEnlightenment
Copy link
Author

Of course it is possible that yarn's tsserver patch is at fault. I just stumbled accross yarnpkg/berry#6270 which exactly describes the issue I am facing.

However, if this needs to be fixed by the yarn team, it would be nice if either the problematic versions could be automatically detected or some way to opt-out like typescript.tsserver.experimental.useVsCodeWatcher is kept until the issue is fixed by the yarn team.

@bpasero
Copy link
Member

bpasero commented May 6, 2024

I am not aware how TS server is patched as that is not an area of expertise for me, I would have to ask @mjbvz to chime in.

It is true that we are A/B testing the setting on 1/4 of the stable VS Code population and there is no extra checks being done whether a patched version of TS server exists or not, I wouldn't even know how to detect that at all.

@bpasero bpasero added under-discussion Issue is under discussion for relevance, priority, approach and removed info-needed Issue requires more information from poster labels May 6, 2024
@bpasero
Copy link
Member

bpasero commented May 6, 2024

I am sorry, but we feel this is nothing VS Code can support given that this is a source modification of a built-in extension. The component will have to address this.

@bpasero bpasero closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
@BurningEnlightenment
Copy link
Author

@bpasero quite understandable. Can you keep typescript.tsserver.experimental.useVsCodeWatcher around for some more time? Another mitigation would be to downgrade to TS 5.4.3, I guess.

However, I think it would be nice to improve the error message / popup. Sooner or later this will impact quite a few people and currently it is quite hard to figure out what went wrong and what can be done about it.

@bpasero
Copy link
Member

bpasero commented May 6, 2024

I think the setting would be around at least until our June release early July, maybe even beyond that. But we plan on enabling the experiment for almost all users by end of this month unless there are critical issues on our end to address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
file-watcher File watcher typescript Typescript support issues under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

3 participants