-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Update to monaco-vscode-api 9.0.x #749
Conversation
- Updated dependencies - Streamlined LanguageClientWrapper#disposeLanguageClient due to a failing test after vitest update
Indeed, I've missed that change because it wasn't announced: there is a
Are you aware of the breaking changes of the v9.0.0 ? the error you get seems to be
|
Yes, the names are adjusted. That error above is not thrown. There is something async going on. When I halt in the debugger in the factory, it does not occur.
The settings are applied too late. That is different in your demo. I have to adjust. |
…can be passed to wrapper config
@CGNonofr update: Setting Regarding the worker loading issue, I still need to investigate the root cause why loading the |
… classic preset (used in Langium Classic example)
@CGNonofr I don't understand what actually the problem is. I have the suspicion the worker itself contains illegal code. When Btw, I have reworked the logger and now rely on what monaco-vscode-api/vscode supplies. Also, the |
@CGNonofr let's defer the resolution of this problem (I could create a new issue) and merge this PR (after review, of course). Especially "unplanned" enhancements to logging, worker factory and start order make this PR very useful apart from the mva version upgrade. |
@CGNonofr this is ready. Any ideas regarding my findings: #749 (comment) |
You can reproduce this by simply doing it manually. Something must happen in the worker and then the error is thrown, but the error content does not help me at least to understand why it dies: const worker = new Worker(new URL('@codingame/monaco-vscode-textmate-service-override/worker', import.meta.url), { type: 'module' });
worker.addEventListener('error', (e) => {
console.error(e);
}); |
I tried to debug |
Do you want me to have a look? Please tell me how to reproduce the issue like I am 5yo (: |
Sorry, it is too late for this 😆
Yes, please have a look and reproduce it first and tell me I am not insane. It works in your demo. Something odd is going on here. You can use the Langium-DSL example and flip here or just the code snippet from #749 (comment) That is sufficient to reproduce. |
@CGNonofr let's merge this. If you have any further idea regarding the issue above let's just write it down here or continue in a new issue. Both is fine with me. One difference between your demo and the usage here is that you reference local packages/ locally build code and here the npm packages are used. That should no make a difference, but it is the only obvious difference. |
I'm not sure to understand, you want to merge something that's not fully working? |
When the Textmate Worker is disabled, then it is working fine. I could force that temporarily. WDYT? We should fix/understand/find a solution for the issue before performing the next major version release. |
@kaisalmen the solution is to add The issue is that those libraries are still published in commonjs andthe worker is configured as type: module I think |
btw, I didn't find any way to debug workers in any browser, that's really a pain in the *ss. You just received an "Error" without any explanation nor details, while the error is that the worker code is not valid |
@CGNonofr awesome. It works. Thank you very much! How long did it take you to find out? Can I buy you a beer or something equivalent? 😆
Once they are loaded (that is sometimes like here the nasty point) you can add debug points and that works with Chrome. If you use a VSCode launch config that works (also in this project, btw). |
No worries! :) It didn't really took me that long because I already had similar problem in the monaco-vscode-api demo some time ago |
@kaisalmen do we have a release eta for this one |
@cdietrich there are a pre-releases available (latest main commit): No fixed ETA, yet |
ahhh got it. |
@CGNonofr I have a weird observation. When I use monach
TextEditorWorker
is loaded and working and there is no error in the console.When I use textmate, first I now need to specify the
TextMateWorker
otherwise there are errors printed (first screenshot). That wasn't required before. Once I do specify it, I see the warning in the second screenshot. The worker iscreated in the factory, but then something goes wrong. It can be reproduced with the langium example. It can be loaded with both configurations. I don't see this beahviour in the monaco-vscode-api demo locally. Do you have any idea?No
TextMateWorker
provided:TextMateWorker
provided: