microsoft / microsoft/TypeScript

IntelliSense not functioning in large project sometimes

Aperta
#56,155 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Needs More Info
Lingua principale
Go
Stelle
111k
Fork
14.4k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

🔎 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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il blocco di IntelliSense in un progetto di grandi dimensioni e acquisendo il TypeScript server debug log relativo a updateGraphWorker, la fase indicata in cui il report si interrompe. Analizza le attività di caricamento del progetto e di osservazione dei file mostrate nel log; il lavoro è completato quando IntelliSense termina il caricamento del progetto e rimane utilizzabile invece di bloccarsi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.