Skip to content

Release v22.112.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 06:21
a4822aa

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 the CratisReadProtection MSBuild property), the generator writes its keyed read-model reads, the require conditions over them and the event mappings from them as ESM v25 output under the command reads protected preamble. This covers nullable [LookUpBy] reads guarded by a leading null check, non-nullable reads, and guards in Provide and Handle (including OneOf and Result returns). 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 SP0079 diagnostic and its reason, instead of being written as an unprotected read.

Changed

  • Generated default output for applications whose commands use read protection On is now an ESM v25 document. Reads under Off, Measure or [Unprotected] stay advisory and are not written as reads in a document that declares protected reads. When MaximumExecutableModelVersion is 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.