RIDDL 2.1.0 Released
RIDDL 2.1.0 is now available.
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
-
streamletis the generic streaming-processor keyword — Every other kind of processor already names a thing (entity,repository,projector,adaptor,context), soprocessornamed the abstraction rather than a definition, and did not match the AST node it has always produced, which isStreamlet. Writestreamlet X as flow is { … }.processorkeeps 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 emitsstreamlet, 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>.confThe shape-keyword deprecation (
source/sink/flow/…) now points atstreamlettoo, rather than at a keyword that had itself become deprecated. -
riddlc findvalidates its selector values —-shape,-intention,-cardinalityand-optionnow 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.-intentionalso accepts the hyphenated spellings consistently.
Bug Fixes
-
Entity-instance references are one AST node again —
Id(E),Id(entity E),reference E,reference to Eandreference to entity Eall name the same thing — a pointer to an instance of entityE— 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 onUniqueId, a field typedreference to entity Ewas not usable as atelladdress despite denoting exactly that, and reported “carries no field typedId(E)”. All five spellings now produceUniqueId. Thereferencespellings are deprecated and, per the compatibility promise, keep parsing; the prettifier converges them onId(entity E).Consumers reading the AST, please read this.
EntityReferenceTypeExpressionis 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. Acase _: EntityReferenceTypeExpressionarm with noUniqueIdalongside it will now never match, silently. If you match on it, writecase _: UniqueId | _: EntityReferenceTypeExpression =>, which is how most existing call sites are already written. -
17 keywords were missing from the tokenizer —
parseToTokensclassified 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 … requireswas 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. -
noANSIMessagesis honoured by the JavaScript API —RiddlAPIset 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-keywordjoins the rule registry carrying a constant replacement, sovalidate --fix-ruleapplies 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_typeas the deprecated spelling ofunique_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.