Back to Blog

RIDDL 2.1.0 Released

RIDDL 2.1.0 is now available.

release riddl compiler

RIDDL 2.1.0 is now available. This release of the RIDDL compiler and language tooling includes the following changes:

What’s New

The first release on the 3.0 compatibility promise: from here on RIDDL may rename and deprecate, but it will never delete an old spelling. A model that parses today parses forever. RIDDL models are authored artifacts that outlive the tool, and a modeller who wrote valid RIDDL should never have to rewrite it to move forward.

What’s New

Features

  • streamlet is the generic streaming-processor keyword — Every other kind of processor already names a thing (entity, repository, projector, adaptor, context), so processor named the abstraction rather than a definition, and did not match the AST node it has always produced, which is Streamlet. Write streamlet X as flow is { … }.

    processor keeps working indefinitely. Both spellings run through one parser and build the identical AST node. The old one emits a deprecation, stream-processor-keyword, and the prettifier emits streamlet, so a model converges on the new spelling the first time it is formatted. Migration is mechanical:

    riddlc validate --fix --fix-rule stream-processor-keyword <model>.conf

    The shape-keyword deprecation (source/sink/flow/…) now points at streamlet too, rather than at a keyword that had itself become deprecated.

  • riddlc find validates its selector values — -shape, -intention, -cardinality and -option now reject an unknown value and list what is accepted, instead of silently matching nothing and reporting an empty result. A typo used to be indistinguishable from a model that genuinely had no matches. -intention also accepts the hyphenated spellings consistently.

Bug Fixes

  • Entity-instance references are one AST node again — Id(E), Id(entity E), reference E, reference to E and reference to entity E all name the same thing — a pointer to an instance of entity E — and produced two AST nodes that had made opposite decisions about whether to keep the disambiguating keyword. Because every addressing check in riddlc is keyed on UniqueId, a field typed reference to entity E was not usable as a tell address despite denoting exactly that, and reported “carries no field typed Id(E)”. All five spellings now produce UniqueId. The reference spellings are deprecated and, per the compatibility promise, keep parsing; the prettifier converges them on Id(entity E).

    Consumers reading the AST, please read this. EntityReferenceTypeExpression is retained — it still exists, and BAST and JSON still deserialize it, so nothing fails to compile and no stored artifact stops loading — but the parser no longer produces it. A case _: EntityReferenceTypeExpression arm with no UniqueId alongside it will now never match, silently. If you match on it, write case _: UniqueId | _: EntityReferenceTypeExpression =>, which is how most existing call sites are already written.

  • 17 keywords were missing from the tokenizer — parseToTokens classified them as identifiers rather than keywords, so editors and syntax highlighters built on the token stream mis-coloured them. A drift guard now fails the build if the keyword tables disagree.

  • invariant … requires was reported as never applied even when it was — the applier was looked up under the wrong symbol-table key, because statements are keyed on their enclosing on-clause rather than the handler.

  • noANSIMessages is honoured by the JavaScript API — RiddlAPI set the option outside the scope in which messages were rendered, so formatted output kept its ANSI escapes and callers had to strip them by hand.

Improvements

  • The new deprecation is mechanically fixable — stream-processor-keyword joins the rule registry carrying a constant replacement, so validate --fix-rule applies it without a judgement call. Every diagnostic already names the rule that produced it; this one is fixable as well as nameable.

Internal

  • The EBNF grammar annotates entity_reference_type as the deprecated spelling of unique_id_type; the rule is unchanged, since the form still parses.
  • CI no longer pins the riddl-models corpus to a branch — that corpus is on main.
  • Documentation of the compatibility promise, and the backlog item that opened the 3.x line.

Verification

Certified on all three platforms from a clean build: 7,203 tests across 19 module legs — JVM, Scala.js and Scala Native — with zero failures and zero skipped suites. The EBNF grammar validator passes 191/191 entry points of the riddl-models corpus, which is itself already migrated to streamlet.