Closed
Description
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
- JSON is exchanged directly so we can get rid of this parsing logic on the VS Code side: https://github.com/microsoft/vscode/blob/53350bc6661449bc097496b04a1d8712474bd301/extensions/typescript-language-features/src/tsServer/serverProcess.electron.ts#L27
- Accidental
console.log
in a ts server plugin will not crash the process (this currently happens if any non-json content is written to stdout) - This would align the desktop TS Server more with the web version