You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, WorkerTaskTerminal is somewhat WebAssembly worker specific. Based on some extension setting, the task terminal should either use a WebAssembly worker or a native worker (using the child_process Node.js module probably). Ideally, they share as much code as possible.
I think we have two options for implementing it:
Split it into two subclasses
abstract class WorkerTaskTerminal
class NativeWorkerTaskTerminal extends WorkerTaskTerminal
class WebAssemblyWorkerTaskTerminal extends WorkerTaskTerminal
Keep the single WorkerTaskTerminal class, but move WebAssembly/native code into separate functions. Those functions could be in separate files. The functions could even create a new class instance, so WebAssembly/native code can be separated that way (e.g. NativeWorker/ WebAssemblyWorker).
The first approach would mean we also need two classes for Yosys/nextpnr, so that's not ideal.
For the configuration, I think we should use the extension configuration instead of our project configuration. What worker to use depends on the user's environment, so it should not be included in the project configuration. The VS Code API provides a configuration section in the contribution points (docs).
Our first priority is implementing this feature, but in the future we can ensure that native code (e.g. child_process imports) never occurs in the web based environment (docs). This means the extension can still work on vscode.dev (even though it is currently broken, see #7).
The text was updated successfully, but these errors were encountered:
Currently,
WorkerTaskTerminal
is somewhat WebAssembly worker specific. Based on some extension setting, the task terminal should either use a WebAssembly worker or a native worker (using thechild_process
Node.js module probably). Ideally, they share as much code as possible.I think we have two options for implementing it:
abstract class WorkerTaskTerminal
class NativeWorkerTaskTerminal extends WorkerTaskTerminal
class WebAssemblyWorkerTaskTerminal extends WorkerTaskTerminal
WorkerTaskTerminal
class, but move WebAssembly/native code into separate functions. Those functions could be in separate files. The functions could even create a new class instance, so WebAssembly/native code can be separated that way (e.g.NativeWorker
/WebAssemblyWorker
).The first approach would mean we also need two classes for Yosys/nextpnr, so that's not ideal.
For the configuration, I think we should use the extension configuration instead of our project configuration. What worker to use depends on the user's environment, so it should not be included in the project configuration. The VS Code API provides a
configuration
section in the contribution points (docs).Our first priority is implementing this feature, but in the future we can ensure that native code (e.g.
child_process
imports) never occurs in the web based environment (docs). This means the extension can still work on vscode.dev (even though it is currently broken, see #7).The text was updated successfully, but these errors were encountered: