-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't use Monaco Concepts in Main/Ext Interface #4355
Comments
After investing a couple of days in this, I have been able to convert a lot of the main/ext protocol to use lsp types. However, I am not quite sure it makes sense to proceed anymore:
|
I don't think we need to stick purely to LSP types, but getting rid of Monaco dependencies from the plugin host process would be good. |
A bit off-topic: for Gitpod, we (TypeFox) would like to spawn the plugin host process in a user side-container, i.e where user filesystem, processes, terminals and tools live, and ssh into it. Obviously we don't want to install the whole Theia because of it in this container. It would be good to extract the code for the plugin host process in its own npm package. It should be self-contained and not use code from any Theia extensions, so by doing it dependencies to Monaco should be eliminated. cc @caseyflynn-google maybe you are interested in such Arch as well, not sure how you are using side-containers and whether your goal is to run VS Code extensions as close as possible to VS Code. |
I've pushed my current state to https://github.com/tsmaeder/theia/tree/4355_use_lsp_types |
So separate the ext side of the main/ext interface. Yes, I like it. To be precise, the ext side of the interface right now does not technically depend on monaco implementation, but it uses interfaces that are mostly compatible with monaco objects. |
For the completions, for example, the fact that we're using Monaco-compatible types, allows us to tunnel and "ident" attribute through the provide/resolve cycle: we rely on the fact that when we provide e.g. a code lens, to monaco, we will get the same object back when we are asked to resolve it. If we do some conversion, we would have explicitly remember the ident field when converting. |
@tsmaeder what is remaining before opening PR from your branch ? |
I'd like to discuss if it even makes sense to proceed with this at the current time. |
Right now, we are using Monaco conventions in the Main/Ext interface in the plugin-ext package. What I mean by this is that the shapes of interfaces used (See Range in model.ts, for example) are the same as in Monaco and positions are 1-based (instead of 0-based as in the Theia and VS Code plugin APIs).
I propose to move to a main/ext interface based on vscode-languageserver-types ("VLT"). Any conversion to monaco-specific types would be done on the main side of the main/ext interface. Here's why:
The text was updated successfully, but these errors were encountered: