Repository navigation
Release v22.112.0
The Screenplay generator now turns protected command reads into executable Screenplay output, so a command with read protection on round-trips its read-backed decision rules instead of keeping them in code.
Added
- When a command's effective read protection is
On(from the command, an inherited base, the assembly or theCratisReadProtectionMSBuild property), the generator writes its keyed read-model reads, therequireconditions over them and the event mappings from them as ESM v25 output under thecommand reads protectedpreamble. This covers nullable[LookUpBy]reads guarded by a leading null check, non-nullable reads, and guards inProvideandHandle(includingOneOfandResultreturns). See Generating a Screenplay. (#3298) - A read Screenplay does not admit (for example a view without a removal, a stream-scoped read model, an ambiguous key or a nullable read without a null check) is left in code and reported with the new
SP0079diagnostic and its reason, instead of being written as an unprotected read.
Changed
- Generated default output for applications whose commands use read protection
Onis now an ESM v25 document. Reads underOff,Measureor[Unprotected]stay advisory and are not written asreadsin a document that declares protected reads. WhenMaximumExecutableModelVersionis below v25, the output is unchanged and a warning names the version needed. - In authoring output, a read is named after its view when the parameter name matches it (
reads Current by sourceId), and[LookUpBy]is honored in every read protection mode.