Skip to content

Use node's ipc for desktop TypeScript server #46417

Description

@mjbvz

On desktop, VS Code currently communicates with the TypeScript server by passing messages over stdio. These messages are in a json rcp style format

We should instead explore using node's built-in ipc support which would let the two processes communicate using .send and .on('message', ...)

Advantages

Activity

  1. mjbvz commented on Oct 18, 2021

    @mjbvz
    Author

    I have work in progress that makes this change on the VS Code side and on the TS side (although I'll need help finalizing the TS part of this)

    Unfortunately we'll likely need to keep support for the exiting rpc mechanism for any older clients that upgrade to use the new TypeScript version

  2. mjbvz commented on Oct 18, 2021

    @mjbvz
    Author

    VS Code PR: microsoft/vscode#135341

    TS PR: #46418

  3. mjbvz commented on Oct 20, 2021

    @mjbvz
    Author

    Not sure if this matters too much, but I believe switching to ipc would also let us easily transfer some data as binary. The obvious candidate is encodedSemanticClassifications-full, which currently returns a big array of numbers. This could be a Uint32Array instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: APIRelates to the public API for TypeScriptDomain: LS: TSServerIssues related to the TSServerFixedA PR has been merged for this issueSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions