Skip to content

JS: Maximum call stack size exceeded at getTypeFromJSDocValueReference in 3.7.2 #34926

Closed
@brendankenny

Description

@brendankenny

TypeScript Version: 3.7.2, 3.8.0-dev.20191105

Search Terms:
JSDoc Type reference Maximum call stack size exceeded getTypeFromJSDocValueReference

Code
Unfortunately I don't have a small case test case yet. The easiest steps I have so far:

  • git clone https://github.com/GoogleChrome/lighthouse.git
  • cd lighthouse
  • yarn
  • yarn add -D typescript@3.7.2
  • yarn tsc

Expected behavior:
Complete tsc run

Actual behavior:

~/lighthouse/node_modules/typescript/lib/tsc.js:78629
                throw e;
                ^

RangeError: Maximum call stack size exceeded
    at getTypeFromJSDocValueReference (~/lighthouse/node_modules/typescript/lib/tsc.js:35334:48)
    at getTypeReferenceType (~/lighthouse/node_modules/typescript/lib/tsc.js:35323:33)
    at getTypeFromJSDocValueReference (~/lighthouse/node_modules/typescript/lib/tsc.js:35348:32)
    at getTypeReferenceType (~/lighthouse/node_modules/typescript/lib/tsc.js:35323:33)
    at getTypeFromJSDocValueReference (~/lighthouse/node_modules/typescript/lib/tsc.js:35348:32)
    at getTypeReferenceType (~/lighthouse/node_modules/typescript/lib/tsc.js:35323:33)
    at getTypeFromJSDocValueReference (~/lighthouse/node_modules/typescript/lib/tsc.js:35348:32)
    at getTypeReferenceType (~/lighthouse/node_modules/typescript/lib/tsc.js:35323:33)
    at getTypeFromJSDocValueReference (~/lighthouse/node_modules/typescript/lib/tsc.js:35348:32)
    at getTypeReferenceType (~/lighthouse/node_modules/typescript/lib/tsc.js:35323:33)
error Command failed with exit code 1.

In 3.7.1-rc there were many of the Property 'methodName' does not exist on type 'typeof ClassName' errors that were being worked on in #34671, but it looks like the fix(es) struggles with something in our dependency graph and/or styles of declarations.

No issues or compilation errors using typescript@3.6.3 (though we're fine if there are new errors exposed by 3.7 that will need to be fixed in our code :)

Related Issues:
This seems very related to the cluster of issues @sandersn was working on in #34671, #34707, #34685, and #34802

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions