CodinGame / monaco-vscode-api

VSCode public API plugged on the monaco editor
MIT License
205 stars 29 forks source link

Improve code splitting #416

Closed CGNonofr closed 2 months ago

CGNonofr commented 2 months ago

Extract the service identifiers into their own files

Many services (especially those not browser or native specific) have their implementation in the same file as the service identifier, making it impossible to get the service identifier without the implementation.

In monaco-vscode-api, we import all service identifiers from missing-services.ts to create an empty overridable implementation of them, currently leading to importing the VSCode implementation as well, making the bundle bigger is the treeshaker is not able to remove them, and making the library tarball bigger anyway

Also update to monaco-editor 0.48 which was released in the meantime but there is no change expected

CGNonofr commented 2 months ago

@kaisalmen 1610bf38e7c38af692a8796cf8276c44065b45dc may impact your monaco-editor-wrapper, you may want to import the new monarch service override when textmate is not used

Related to https://github.com/microsoft/monaco-editor/issues/4463

kaisalmen commented 2 months ago

Related to https://github.com/microsoft/monaco-editor/issues/4463

@CGNonofr Thank you, for seeing that. And thank you for providing the additional service override.

I am building this branch locally right now and will test it today. This is a big change, but welcome one. Do you want to create another pre-release or do you want to release a new version soon (as soon as I approve)? What do you prefer?

As usual I will test this with the wrapper and the all examples in the mlc repo and provide feedback. From my point of view we can directly release new version. I also wanted to implement another improvement in the wrapper, but did not had the time, yet.

CGNonofr commented 2 months ago

Related to microsoft/monaco-editor#4463

@CGNonofr Thank you, for seeing that. And thank you for providing the additional service override.

I am building this branch locally right now and will test it today. This is a big change, but welcome one. Do you want to create another pre-release or do you want to release a new version soon (as soon as I approve)? What do you prefer?

As usual I will test this with the wrapper and the all examples in the mlc repo and provide feedback. From my point of view we can directly release new version. I also wanted to implement another improvement in the wrapper, but did not had the time, yet.

I like to move fast and break things!

It will be a new minor version, anyone encountering issues can stay on the previous release

github-actions[bot] commented 2 months ago

:tada: This PR is included in version 4.5.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

kaisalmen commented 2 months ago

@CGNonofr I needed to some extra packages otherwise vite dev server complains: https://github.com/TypeFox/monaco-languageclient/pull/648/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519 image

Apart form that it looks good. I opened https://github.com/TypeFox/monaco-languageclient/pull/648

CGNonofr commented 2 months ago

well spotted...

CGNonofr commented 2 months ago

@kaisalmen https://github.com/CodinGame/monaco-vscode-api/pull/419