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
The Langium Yeoman generator is great to kickstart a working project around a small "hello world" DSL, and the provided examples of code to be written around the AST (eg. the example validator) are very useful to understand Langium.
However, a typical flow is:
generate a langium project with yo langium
modify the default .langium file,
run npm run langium:generate
run npm run build
If no other change is done, step 4 will always fail because the provided examples of generator, validator and CLI won't compile anymore. This is because these examples are made for the "hello world" default DSL, which is not there anymore because of step 2.
This means that two extra steps are in fact always required:
modify generator, validator and CLI by commenting/changing/removing the parts that cannot compile
run npm run build once again, and hope it compiles
A problem I encountered when I was starting with Langium, and that I now currently encounter when I try to teach Langium to students, is that the additional step 5 is quite difficult for people who are just starting with Langium. Because at this stage one does not know how things works, it is hard to know how to make the changes, and it is easy to make mistakes (eg. commenting too many things).
Idea
I would find very useful to be offered the choice, in the Yeoman generator, to either kickstart a project with the "hello world" example DSL (and accompanying generator, validator and CLI), or to have a "blank" project without any semantic model nor grammar rules. Such blank project could still provide files for the generator, validator and CLI, but where one would simply find // TODO in each place where a change will be required for the component to work in the future.
This would allow kickstarting a project with steps 1 to 4, avoiding the hazardous steps 5-6 (especially for beginners).
The text was updated successfully, but these errors were encountered:
Problem
The Langium Yeoman generator is great to kickstart a working project around a small "hello world" DSL, and the provided examples of code to be written around the AST (eg. the example validator) are very useful to understand Langium.
However, a typical flow is:
yo langium
.langium
file,npm run langium:generate
npm run build
If no other change is done, step 4 will always fail because the provided examples of generator, validator and CLI won't compile anymore. This is because these examples are made for the "hello world" default DSL, which is not there anymore because of step 2.
This means that two extra steps are in fact always required:
npm run build
once again, and hope it compilesA problem I encountered when I was starting with Langium, and that I now currently encounter when I try to teach Langium to students, is that the additional step 5 is quite difficult for people who are just starting with Langium. Because at this stage one does not know how things works, it is hard to know how to make the changes, and it is easy to make mistakes (eg. commenting too many things).
Idea
I would find very useful to be offered the choice, in the Yeoman generator, to either kickstart a project with the "hello world" example DSL (and accompanying generator, validator and CLI), or to have a "blank" project without any semantic model nor grammar rules. Such blank project could still provide files for the generator, validator and CLI, but where one would simply find
// TODO
in each place where a change will be required for the component to work in the future.This would allow kickstarting a project with steps 1 to 4, avoiding the hazardous steps 5-6 (especially for beginners).
The text was updated successfully, but these errors were encountered: