Skip to content

Per Request Cancellation Tokens For TSServer Do not Work #14593

@mjbvz

Description

@mjbvz

While working on microsoft/vscode#22437 that adds TSServer per request cancellation to VSCode, I keep hitting this error:

shell.ts:468 Error processing request. Mismatched request id, expected undefined, actual 4
Error: Mismatched request id, expected undefined, actual 4
    at Object.resetRequest (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/cancellationToken.js:57:27)
    at IOSession.Session.resetCurrentRequest (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:73291:40)
    at IOSession.Session.executeWithRequestId (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:73299:26)
    at IOSession.Session.executeCommand (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:73305:33)
    at IOSession.Session.onMessage (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:73325:35)
    at Interface.<anonymous> (/Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js:74477:27)
    at emitOne (events.js:96:13)
    at Interface.emit (events.js:188:7)
    at Interface._onLine (readline.js:232:10)
    at Interface.<anonymous> (readline.js:365:12)

It seems the expected request id is always undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions