RIDDL 2.7.0 Released
RIDDL 2.7.0 is now available.
release riddl compiler
RIDDL 2.7.0 is now available. This release of the RIDDL compiler and language tooling includes the following changes:
What’s New
What’s New
Features
createis the value that brings an instance into being.create entity Order("5")creates an instance, runs itson initclause with the arguments, and yields the new instance’sId. It was spelledinitiate, which named the operation after its second half: creation is instantiation, and initialization is theon initclause it then runs.initiatestill parses and always will, as a deprecation (value-initiate-keyword) thatriddlc validate --fixrewrites tocreate, and it produces exactly the same AST. Prettify emitscreate; JSON writes"value": "create"and still reads"initiate".- A streamlet can be referenced by
flow,router,streamletorprocessor. A reference to a streamlet used to accept onlysource,sink,merge,splitandvoid, so a flow or router streamlet — or any streamlet named by its declaration keyword — could not be referenced at all:relationship R to flow X as 1:Nwas a parse error. All of them work now.processoris accepted as the deprecated synonym ofstreamlet, as it already was for declarations. One exception: in an epic step’ssend … from <ref>,flow Xstill means a GROUP (as it always has, sinceflowis also a group keyword); writestreamlet Xthere. riddlc findandriddlc dumpcan select values. The projection used to contain definitions and statements but never a value held inside one, so no value kind could be selected —-type initiatehad never matched anything. Every composite value (create,ask,call, constructors, comparisons, prompts, queries, …) is now a node, at any depth; plain literals and value references (which keep their ownvalue-referencerecords) are not.-type initiateselectscreatevalues.- Ten more diagnostics carry a rule id, so tools can name and filter them:
entity-empty-handlers,entity-fsm-too-few-states,entity-state-no-handlers,entity-no-handlers-or-states,field-method-should-be-lowercase,field-method-arg-should-be-lowercase,type-pattern-invalid-regex,saga-step-uncompensatedandsaga-step-too-many-fail-points, and the field-name check now reportsfield-should-be-lowercase. Message text and severity are unchanged.
Bug Fixes
- BAST: a contained group could never be read back.
contains X as group Yshared its binary tag withgroupwhile writing a different payload, and the reader always decoded it as aGroup: it failed with “Invalid string table index”, or, in a model with enough strings, read back silently as the wrong node. It now has its own tag. - BAST: positions after a UI group were shifted. Reading a group moved the location-decoding base without restoring it, so the group’s name — and positions keyed on it, such as click-to-open in an editor — came back offset by the width of the keyword.
Breaking for stored files
- BAST format revision 30 → 31. The reader requires an exact revision match, so every
.bastfile written by 2.6.0 or earlier must be regenerated withriddlc bastifybefore 2.7.0 can import it. RIDDL source, JSON, and the Scala/JS APIs are unaffected.
Improvements
- Diagnostics say
createwherever they used to sayinitiate. The rule idstmt-initiate-id-unusedkeeps its published code. - Binary compatibility with 2.6.0 is preserved. The AST node is written
AST.Create(and the JSON DTOCreateValueDto); these are aliases of the unchanged classesAST.InitiateandInitiateValueDto, so code compiled against 2.6.0 links unchanged. JavaScript exports both names. The classes themselves are renamed at 3.0.
Internal
Finder.nestedValuesexposes the values a node holds in its fields;Finder’s table of field-held children is now shared byFinderand the projection rather than private to one.- The EBNF grammar is updated for
createand the new streamlet-reference keywords, and new fixtures keep both the canonical and the deprecated spellings under the TatSu validator. - A test now scans every validation source for diagnostics constructed without a rule id.
- MiMa baseline moved to 2.6.0.