RIDDL 2.8.6 Released
RIDDL 2.8.6 is now available.
release riddl compiler
RIDDL 2.8.6 is now available. This release of the RIDDL compiler and language tooling includes the following changes:
What’s New
What’s New
Features
- New Advisory
value-optional-operand. It reports an optional operand (T?) of an ordering comparison (<,<=,>,>=) or of arithmetic (+,-,*,/). Its first suggested fix isotherwise. The Computational Model now gives such an expression no value when the operand is absent, so a generator must refuse rather than substitute one: notfalse, not unknown, not zero.- Silenced by:
otherwise, awhenorrequireguard, or a short-circuitingx != empty and …orx == empty or …. - Equality is not affected:
x == emptyis the presence test, and an absent value equals onlyempty.
- Silenced by:
andandorshort-circuit, as a must-preserve. The right operand is evaluated only when the left has not decided the result, left to right. Validation now applies this inside a condition: inx != empty and x <= t, the guard coversx.
Bug Fixes
- A guard now covers a path through the value it guards (BACKLOG [1.34]).
- What was wrong: after
let line = one of … where …andwhen line == empty then error else …, a use ofline.unitCostwas still treated as optional. It drewvalue-optional-for-requiredand the new advisory. - Now: a path through a guarded
letorforeachelement is optional only if a segment after the guarded part is optional. - A guard on a longer path also counts: a guard on
line.quantityproveslinepresent. - Still not covered: paths anchored in entity state.
- What was wrong: after
Internal
- Census: across 191 riddl-models entry points,
value-optional-operandreports 2 sites, both genuine, at reactive-bbqInventoryItem.riddl:555 and :567. No other rule moved. Without the [1.34] fix it would also have reported two false positives. - Formats: there is no grammar, BAST or JSON change.
FORMAT_REVISIONstays at 39.