-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Regression from 4.2 to 4.3 : RangeError: Maximum call stack size exceeded #45632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Possibly related/duplicate #45576 |
Ah, if it's happening in 4.3 it's more likely related to #44281 |
You should be able to get some info by following the tracing instructions in the wiki: https://github.com/microsoft/TypeScript/wiki/Performance-Tracing Let us know if that helps you solve the problem or create a repro. |
Thank you @andrewbranch for the hints. Looking at #44281 it is closed, but my issue is still happening in Will continue to debug / trace today |
One common root cause of #44281 was fixed, but it has become clear there are more, but we haven’t been able to identify common patterns yet. Really hoping your tracing session helps us figure it out 😄 |
Ok we succeed to isolate the issue in our base code, but it is very hard yet to reproduce it in a playground. To sum it up, there are 2 files involved, one full of type def, the second with types & components. There is some circular dep because the 1st import some types from the second, and the second import some types from the 1st. Checking those files with tsc separately does not trigger the error, BUT, here is the issue, when those two modules are imported together in another module, then 💥 |
sure, will give it a try |
I have a similar Issue Typescript version
I can't figure out the root cause, but could create a small file to reproduce the error. // test-call-stack.ts
interface Dimension {
values: `${string},` | null;
}
function getTimeValueFromDimensions(dim: Dimension) {
const input = dim.values;
if (!input) {
console.log('is null');
}
}
getTimeValueFromDimensions({values: null}); // npx tsc test-call-stack.ts
.../tsc.js:87014
throw e;
^
RangeError: Maximum call stack size exceeded
at getBaseConstraintOfType (.../tsc.js:43728:22) // or getBaseConstraintOfType (.../tsc.js:43727:41)
... The error is not there if the function is as follows function getTimeValueFromDimensions(dim: Dimension) {
const input = dim.values;
console.log(input);
} |
4.1 is super old... that sample was fixed in 4.2. Not the same issue. |
@ahejlsberg tested with |
@JSteunou thanks for testing! |
Bug Report
Since TypeScript 4.3 we are unable to run TypeScript check on our projet (more than 10.000 ts modules)
We are trying to upgrade from TypeScript 4.0 to 4.4 and stuck on 4.2
The error is quite generic
RangeError: Maximum call stack size exceeded
If there is a way to get more log or to see which module trigger this behavior it would help a lot!
Maybe close to #44281?
🔎 Search Terms
🕗 Version & Regression Information
⏯ Playground Link
Sorry no playground I'm unable to isolate the part linked to the bug
💻 Code
🙁 Actual behavior
🙂 Expected behavior
no error :)
The text was updated successfully, but these errors were encountered: