Skip to content

Release v22.83.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 02:02
fa2b29a

Summary

[GeneratedValue] handler parameters now support concepts whose generation depends on time or tenant, and command scenarios can fix that time and tenant. New analyzers guide inline value generation into generated parameters.

Added

  • A [GeneratedValue] parameter whose concept implements IGeneratableInContext<T> from Cratis Fundamentals 7.24 is created with a GenerationContext holding the command's received time and the current tenant (the default tenant maps to GenerationContext.DefaultTenant). When a concept implements both IGeneratable<T> and IGeneratableInContext<T>, the context form is used. A command without a received time fails instead of falling back to the system clock (#3165)
  • CommandScenario.Clock(DateTimeOffset) and CommandScenario.Tenant(TenantId) fix the time and tenant a scenario's commands run with, including nested commands. Set Clock before the first Execute or Validate and Tenant before the first Execute; later changes throw (#3165)
  • ARC0027 warns when a generated parameter's type implements both generation interfaces, since Arc only calls the context form (#3165)
  • ARC0028 reports a generatable concept created inside Handle (X.New() or GenerateValue.*) and offers a code fix that moves it to a [GeneratedValue] parameter, so scenarios can pin the value (#3165)
  • ARCCHR0022 warns when a command injects an aggregate keyed by the command's event source while appending its events to a generated event source (#3165)

Changed

  • Arc requires Cratis Fundamentals 7.24.0 or later (#3165)
  • ARC0022 accepts concepts that implement IGeneratableInContext<T> (#3165)