Release v1.7.0
·
103 commits
to ba9b203e607b5f2df95ab908e521afce919806de
since this release
Summary
Eight language additions delivered together, each one all the way through: grammar, compiler, printer, Monaco/VS Code language service, documentation, and the invoicing sample. The theme is that a Screenplay should be complete and meaningful before any code exists — several of these close gaps where the language could only point at code instead of describing behavior.
Added
type <Name>declares a composite value type — the child-record shapes events routinely carry (lines InvoiceLine[]). Referencable from event, command and type properties (#29)pii reason "…"/sensitive reason "…"in a concept body records why a value is personal data — purpose, lawful basis, whose subject it lives under — instead of losing it to a bare marker (#38)identifiermarks the command property a runtime resolves the event source id from. At most one per command; without it a newUuidis assumed (#52)then errorwith no reason states a rejection the specification does not name, replacingthen error ""as the only expressible form (#46)descriptionon a reactor and on eachontrigger, and reactor trigger bodies are now optional — a reactor is describable before any code exists (#40)- Queries gain a
description, parameters sourced from the context withfrom $context.…, and aperformerblock — the query's counterpart to a commandhandler, as afilereference or an inlinecsharp/sqlblock (#53) CommandContextandQueryContextinCratis.Screenplay.Contextsestablish what a command handler and a query performer are given — the command or arguments,TenantId,CausedBy,Causationand when it occurred (#54, #55)sqlas an inline code block language- Documentation pages for composite types and for the command and query context, plus a declarative-first section in the grammar stating that a document must be expressible — and meaningful — with zero
filereferences
Changed
$context.paths are validated against the members ofCommandContext/QueryContext—command,arguments,tenant,causedBy,causation,occurred,identity— and an unknown path is reported- Property and query-parameter type references resolve against the primitives, declared concepts, declared types and imports; a reference to something the document never declares is reported. Query return types name read models and are not checked
- Concept and type names share one namespace, so declaring both is an error
ConceptSyntax.Attributesis nowIEnumerable<ConceptAttributeSyntax>(name plus optional reason);ConceptSyntax.AttributeNamesgives the previous string sequenceSpecificationErrorSyntax.Nameis nullable —nullis a rejection with no named reason- The Monaco language service and the VS Code extension know every new construct: keywords, completions, hover, embedded SQL highlighting, and diagnostics matching the compiler