TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

TS Server fatal error: Maximum call stack size exceeded

Open fz6m opened this issue 1 year ago • 3 comments

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: v1.94
  • OS Version: macos 14.2.1

Steps to Reproduce:

  1. clone the minimal reproduction repo
  2. open src/file-0.ts
  3. TS server crashed

Additional info

  1. We have a repo with 1000+ TS files and 100k lines of code. TS <= v5.4.5 works fine, but > v5.4.5 doesn't work.

  2. The minimal reproduction has 1500 TS files and 200k lines of code, and TS v5.4.5 doesn't work.

  3. In real cases, we will have a repo with 10,000+ ts files and 4 million lines of code. i hope TS LSP can work in this scenario.

fz6m avatar Oct 05 '24 13:10 fz6m

I tried webstorm, it works well, our code is growing fast, VSCode is still my favorite IDE, I hope the VSCode team can fix it.

fz6m avatar Oct 05 '24 14:10 fz6m

The relevant piece here seems to be a linked list formed by 1,500 files, each of which imports the next file in the list. Not sure why this would happen organically.

RyanCavanaugh avatar Oct 16 '24 17:10 RyanCavanaugh

Yes, in a real project in our production env, there is a part of the library where over 1000 files import more than 10 library files each. This creates a complex import tree, which causes TS to crash.

fz6m avatar Oct 16 '24 18:10 fz6m

Closing language service bugs related to the 6.0 implementation. For more information, see #62827

RyanCavanaugh avatar Dec 03 '25 00:12 RyanCavanaugh