microsoft / microsoft/TypeScript
Regression: Maximum call stack exceeded in TypeScript 5.8.3 with large type inference
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
Description:
We just upgraded our Angular app from version 18 to 20 and, consequently, our TS version to 5.8.3 (the latest compatible version with Angular 20) and are experiencing a "Maximum call stack exceeded" error when compiling our project with TypeScript 5.8.3 - but only in dev mode. It compiles without issue initially, but upon making any changes, we get this error. This appears to be a regression related to complex type inference or large type definitions and did not happen in Angular 18 when using TS 5.3.3.
This only happens in our complex app and not in simpler projects.
Reproduction Steps:
- Install TypeScript 5.8.3 and and Angular 20 app with complex types.
Expected Behavior:
The project should compile successfully without a "Maximum call stack exceeded" error, as it did in TypeScript 5.3.3 and Angular 18.
Actual Behavior:
The compilation fails with
RangeError: Maximum call stack size exceeded at getTypeAtFlowBranchLabel (/PATH_TO_FILE/node_modules/typescript/lib/typescript.js:74199:38) at getTypeAtFlowNode (/PATH_TO_FILE/node_modules/typescript/lib/typescript.js:74009:48) at getTypeAtFlowCondition (/PATH_TO_FILE/node_modules/typescript/lib/typescript.js:74161:24) at getTypeAtFlowNode (/PATH_TO_FILE/node_modules/typescript/lib/typescript.js:74001:18) at getTypeAtFlowCondition (/PATH_TO_FILE/node_modules/typescript/lib/typescript.js:74161:24) at getTypeAtFlowNode (/PATH_TO_FILE/node_modules/typescript/lib/typescript.js:74001:18) at getTypeAtFlowCondition (/PATH_TO_FILE/node_modules/typescript/lib/typescript.js:74161:24) at getTypeAtFlowNode (/PATH_TO_FILE/node_modules/typescript/lib/typescript.js:74001:18) at getTypeAtFlowCondition (/PATH_TO_FILE/node_modules/typescript/lib/typescript.js:74161:24) at getTypeAtFlowNode (/PATH_TO_FILE/node_modules/typescript/lib/typescript.js:74001:18)
Environment:
- TypeScript Version: 5.8.3
- Angular 20.1.5
- Node.js Version: 22.12.0
- Operating System: MacOS
- Build Tools: Vite - from Angular 20
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
報告された複雑なアプリケーションで、TypeScript 5.8.3、Angular 20.1.5、Node.js 22.12.0、Viteを使ってまず失敗を再現します。getTypeAtFlowBranchLabel、getTypeAtFlowNode、getTypeAtFlowConditionの周辺のスタックを調査し、その後TypeScript 5.3.3と比較します。インクリメンタルコンパイルがスタックオーバーフローなしで成功するようにリグレッションを特定して解決できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript, vite
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100