Currently, all the VSCode extension code runs on a thread controlled by VSCode. This is not ideal because it means the code is subject to whatever weirdness VSCode has in its version of node.js. In particular, VSCode seems to disallow dynamic import() statements in production desktop code. This is problematic because compiling desmoscript can involve executing arbitrary JavaScript code at compile time. The obvious solution is to move all the extension code to a separate process (or web worker on web) and execute it there instead.
Some thoughts on how to go about this:
I don't want to use LSP because that doesn't cover every feature I need (specifically, semantic highlighting)
I ideally want to just have this be a drop-in replacement where I can just make remote procedure calls from the separate process and have them return asynchronously. To that end, I might just make a simple little RPC library for calling functions across the boundary of web workers/nodejs process/anything else that exposes an interface that allows for message passing.
Currently, all the VSCode extension code runs on a thread controlled by VSCode. This is not ideal because it means the code is subject to whatever weirdness VSCode has in its version of node.js. In particular, VSCode seems to disallow dynamic
import()
statements in production desktop code. This is problematic because compiling desmoscript can involve executing arbitrary JavaScript code at compile time. The obvious solution is to move all the extension code to a separate process (or web worker on web) and execute it there instead.Some thoughts on how to go about this: