TS Server fatal error: Maximum call stack size exceeded
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:
- clone the minimal reproduction repo
- open
src/file-0.ts - TS server crashed
Additional info
-
We have a repo with
1000+TS files and100klines of code. TS<= v5.4.5works fine, but> v5.4.5doesn't work. -
The minimal reproduction has
1500TS files and200klines of code, and TSv5.4.5doesn't work. -
In real cases, we will have a repo with
10,000+ts files and4 millionlines of code. i hope TS LSP can work in this scenario.
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.
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.
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.
Closing language service bugs related to the 6.0 implementation. For more information, see #62827