microsoft / microsoft/TypeScript
IntelliSense not functioning in large project sometimes
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
🔎 Search Terms
language server loading
updateGraphWorker
IntelliSense not working
🕗 Version & Regression Information
- This is a crash
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
⏯ Playground Link
No response
💻 Code
No response
🙁 Actual behavior
While working on a large TypeScript project, we have encountered a decline in the developer experience as the project continues to grow. One particular issue we have experienced is that IntelliSense consistently gets stuck without any apparent reason. To investigate this further, I attempted to enable the debug mode of the TypeScript server and discovered that it hangs at the updateGraphWorker stage.
Info 17820[15:27:03.183] -----------------------------------------------
Info 17820[15:27:03.195] event:
{"seq":0,"type":"event","event":"projectLoadingFinish","body":{"projectName":"/path/to/some/json"}}
Info 17820[15:27:03.202] event:
{"seq":0,"type":"event","event":"telemetry","body":{"telemetryEventName":"projectInfo","payload":{"projectId":"xxxx","fileStats":{"js":0,"jsSize":0,"jsx":0,"jsxSize":0,"ts":1744,"tsSize":2689631,"tsx":108,"tsxSize":347124,"dts":3944,"dtsSize":8979876,"deferred":0,"deferredSize":0},"compilerOptions":{"experimentalDecorators":true,"emitDecoratorMetadata":true,"strict":true,"allowUnreachableCode":false,"outDir":"","target":"es2022","declaration":true,"module":"esnext","esModuleInterop":true,"moduleResolution":"node10","verbatimModuleSyntax":true,"useDefineForClassFields":false,"sourceMap":true,"skipLibCheck":true,"plugins":[""],"jsx":"preserve","baseUrl":"","paths":"","composite":true,"rootDir":"","declarationDir":"","resolveJsonModule":true},"typeAcquisition":{"enable":false,"include":false,"exclude":false},"extends":true,"files":false,"include":true,"exclude":false,"compileOnSave":false,"configFileName":"tsconfig.json","projectType":"configured","languageServiceEnabled":true,"version":"5.2.2"}}}
Info 17820[15:27:03.203] Creating configuration project /path/to/some/json
Info 17820[15:27:03.203] event:
{"seq":0,"type":"event","event":"projectLoadingStart","body":{"projectName":"/path/to/some/json"}}
Info 17820[15:27:03.204] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.205] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.206] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.206] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.207] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.207] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.208] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.223] Starting updateGraphWorker: Project: /path/to/some/json
Info 17821[15:27:03.311] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17821[15:27:03.311] Elapsed:: 0.012974977493286133ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17821[15:27:03.311] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] Elapsed:: 0.0058460235595703125ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] Elapsed:: 0.0055010318756103516ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] Elapsed:: 0.011311054229736328ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] Elapsed:: 0.004781007766723633ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.312] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.312] Elapsed:: 0.008038997650146484ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.312] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17823[15:27:03.316] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:03.316] Elapsed:: 0.010488033294677734ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:03.317] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17823[15:27:03.319] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17823[15:27:03.322] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17823[15:27:03.824] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:03.824] Elapsed:: 0.0059119462966918945ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:03.915] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:03.915] Elapsed:: 0.008075952529907227ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:04.015] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:04.532] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:05.703] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:05.748] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:07.812] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:07.843] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:08.790] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
# log stops here
🙂 Expected behavior
In our large project, we expect IntelliSense to work smoothly since the project can be type checked within approximately 2 minutes.
Additional information about the issue
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、大規模プロジェクトで IntelliSense がハングする問題を再現し、レポートが停止する箇所として名前が示されているステージ updateGraphWorker の周辺で TypeScript server debug log を取得します。ログに示されているプロジェクトの読み込みとファイル監視のアクティビティを調査します。IntelliSense がプロジェクトの読み込みを完了し、ハングせずに引き続き使用できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- developer-experience, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100