Closed frademacher closed 5 months ago
Note that this is only relevant for developers answering the web worker question with yes. We cannot downgrade the vscode-languageserver dependency, as Langium depends on that itself.
cc @kaisalmen Any idea why this appears in the first place?
@msujew was just writing something. 🙂 @frademacher the template needs to be adjusted. I simply forgot that. A PR will come very soon. v7 of monaco-languageclient
uses the newer vscode-languageclient
as well.
And we need to prevent that incompatible version of @codingame/monaco-vscode-api
are installed. Its versions are coupled to
vscode
versioning and therefore patch versions are not what they seem to be. We should change that, too. I will open an issue there as well.
Thanks a lot for your prompt responses and technical clarifications @msujew @kaisalmen. I can confirm that the issue is not existent when responding with No to yo langium
's question for web worker inclusion (as pointed out by Mark in https://github.com/eclipse-langium/langium/issues/1315#issuecomment-1845776962). For my current endeavors, this workaround is perfectly fine, thanks :-)
changed package.json config with "monaco-editor-wrapper": "~3.5.0", can work fine.
Do we have a workaround for this issue? I don't get it so far.
As a new Langium user, I also stumbled across this problem. I am especially interested in the web worker integration. I already used Monaco with Chevrotain in a web worker before, but have some hopes that Langium could make some things easier. Is a fix planned for the web worker integration, or is it dependent on some 3rd party package that the Langium project doesn't have any influence on?
Hi @medihack this has been fixed with #1317 but there was not official release after 2.1.3
. v3 got delayed a bit.
As a workaround you can apply the changes from the PR locally. Only the template adjustments are required. And then run the generator. A new official release should become available before the end of January.
Hi @tobiashochguertel sorry I missed your question. The workaround sketched above ⬆️ should get it going.
This has been fixed with the 3.0 release.
Steps To Reproduce
yo langium
, and use default "Hello World" values for extension name, language name, and file extensions. Also, reply Yes to the questions for VSCode extension, CLI inclusion, and web worker inclusion.The current behavior
During the execution of
yo langium
, and more precisely at the following stepI run into the following error:
Unfortunately, I'm not very familiar with Node.js but could find the following oddities (at least they seem odd to me):
package.json
in the generatedhello-world
folder states that the generated Langium project depends onvscode-languageclient ~9.0.1
andmonaco-languageclient ~6.6.0
.monaco-languageclient ~6.6.0
seems to however depend onvscode-languageclient ~8.1.0
.monaco-languageclient ~7.2.0
seems to plan to get rid of the erroneous import of theinitialize
function fromvscode/extensions
(possibly becausevscode-languageclient ~9.0.1
doesn't provide it anymore or elsewhere).Could it be that
yo langium
should generate a dependency onvscode-languageclient ~8.1.0
rather thanvscode-languageclient ~9.0.1
to be compatible withmonaco-languageclient ~6.6.0
; or, alternatively, have generated projects depend on (the upcoming?)monaco-languageclient ~7.2.0
in casevscode-languageclient ~9.0.1
is required?If you could use the generated
hello-world
Langium project please let me know. However, as stated above, I just invokeyo langium
following https://langium.org/docs/getting-started to run into the above error (this behavior is repeatable).As a side note: When executing
npm list langium
in the generatedhello-world
folder I get the following response:The expected behavior
Behave as described at https://langium.org/docs/getting-started after the successful execution of
yo langium
.