The `langium@3.1.0` changes broke existing grammars
Yokozuna59 opened this issue · 5 comments
Langium version: 3.1.0
Package name: langium
Steps To Reproduce
-
Create a Hello World example using the generator.
-
Modify the grammar to has a rule with multiplicity without assigning to any value:
grammar HelloWorld entry Model: + ID* (persons+=Person | greetings+=Greeting)*;
Link to code example:
The current behavior
The changes after #1401 broke the existing working grammars.
The expected behavior
No errors.
The change is as expected. What is your use case for a multiplicity without an assignment?
I your second example, I'd recommend to create a data type rule:
Newlines returns string: NEWLINE+;
and then use Newlines?
instead of NEWLINE*
.
We could consider making an exception for terminal rules, though.
@spoenemann I'd argue that we should make an exception for terminal and data type rules.
The latest release (3.1.1) includes a fix for this.
What should we do with the milestone assignment in such a case? Assign to v3.1.0 or v3.2.0? No milestone?
I think assigning to v3.1.0 would be most helpful.
I agree, I've added it to the v3.1.0 milestone.