Back to Blog

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

  • create is the value that brings an instance into being. create entity Order("5") creates an instance, runs its on init clause with the arguments, and yields the new instance’s Id. It was spelled initiate, which named the operation after its second half: creation is instantiation, and initialization is the on init clause it then runs. initiate still parses and always will, as a deprecation (value-initiate-keyword) that riddlc validate --fix rewrites to create, and it produces exactly the same AST. Prettify emits create; JSON writes "value": "create" and still reads "initiate".
  • A streamlet can be referenced by flow, router, streamlet or processor. A reference to a streamlet used to accept only source, sink, merge, split and void, 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:N was a parse error. All of them work now. processor is accepted as the deprecated synonym of streamlet, as it already was for declarations. One exception: in an epic step’s send … from <ref>, flow X still means a GROUP (as it always has, since flow is also a group keyword); write streamlet X there.
  • riddlc find and riddlc dump can 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 initiate had 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 own value-reference records) are not. -type initiate selects create values.
  • 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-uncompensated and saga-step-too-many-fail-points, and the field-name check now reports field-should-be-lowercase. Message text and severity are unchanged.

Bug Fixes

  • BAST: a contained group could never be read back. contains X as group Y shared its binary tag with group while writing a different payload, and the reader always decoded it as a Group: 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 .bast file written by 2.6.0 or earlier must be regenerated with riddlc bastify before 2.7.0 can import it. RIDDL source, JSON, and the Scala/JS APIs are unaffected.

Improvements

  • Diagnostics say create wherever they used to say initiate. The rule id stmt-initiate-id-unused keeps its published code.
  • Binary compatibility with 2.6.0 is preserved. The AST node is written AST.Create (and the JSON DTO CreateValueDto); these are aliases of the unchanged classes AST.Initiate and InitiateValueDto, so code compiled against 2.6.0 links unchanged. JavaScript exports both names. The classes themselves are renamed at 3.0.

Internal

  • Finder.nestedValues exposes the values a node holds in its fields; Finder’s table of field-held children is now shared by Finder and the projection rather than private to one.
  • The EBNF grammar is updated for create and 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.