-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
Repro
Present in 4.7.4. and main.
git clone https://github.com/apache/echartscd echartsgit reset --hard c58437740899254aeb318595d4e5e324ad48961dcd ..npm install @typescript/server-replay- Download replay.txt
npx tsreplay ./echarts path/to/replay.txt path/to/tsserver.js
replay.txt
{"rootDirPlaceholder":"@PROJECT_ROOT@","serverArgs":["--disableAutomaticTypingAcquisition"]}
{"seq":1,"type":"request","command":"configure","arguments":{"preferences":{"includePackageJsonAutoImports":"off"},"watchOptions":{"excludeDirectories":["**/node_modules"]}}}
{"seq":2,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"@PROJECT_ROOT@/dist/echarts.common.min.js","projectRootPath":"@PROJECT_ROOT@"}]}}
{"seq":3,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/dist/echarts.common.min.js","line":45,"offset":362884}}RangeError: Invalid string length
at JSON.stringify (<anonymous>)
at formatMessage (typescript/built/local/tsserver.js:174550:29)
at IOSession.Session.writeMessage (typescript/built/local/tsserver.js:175529:31)
at IOSession.Session.send (typescript/built/local/tsserver.js:175526:22)
at IOSession.Session.doOutput (typescript/built/local/tsserver.js:175579:22)
at IOSession.Session.onMessage (typescript/built/local/tsserver.js:177220:30)
One (of several?) problematic reference is at line 45, offsets 280-284 of echarts/dist/echarts.common.min.js.
A nice solution would truncate before and after a range containing the offset of interest. A minimal solution would truncate from the end, possibly cutting off the actual reference.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue