Skip to content

JasperFx 2.82.0

Choose a tag to compare

@jeremydmiller jeremydmiller released this 09 Oct 17:12

Event Modeling

  • #992: definitions without a Name join the application's model. EventModelDefinition.Name now defaults to the service name (JasperFxOptions.ServiceName), so a definition per chapter merges with the model derived from code. Before, each definition became its own model, named after its class.
  • #993: AOT-safe definition discovery. JasperFx.SourceGenerator now emits a DiscoveredEventModels manifest per assembly. The new AddDiscoveredEventModels(assembly) registers definitions from it, without scanning types.
  • #994: default and opt-out aggregates.
    • ForAggregate<T>() sets the default aggregate for the command slices declared after it.
    • On a single slice, NoAggregate() and DeciderModel<T>() override that default.
    • Each slice records why it has its aggregate in the new AggregateDeclaration.
  • #995: specification links.
    • New typed LinksToSpecification<TSpec>(nameof(...)).
    • The new SpecificationBindingDescriptor contract and EventModelSpecifications.Link join specs to slices by command type.
    • A new Specified provenance rung ranks between Declared and Derived. Compare rungs with Rank() / Outranks(), not the raw enum value.
    • New UnresolvedSpecification hotspot.

Source generator

  • #990: emitted-events manifest. JasperFx.Events.SourceGenerator infers which events a handler emits from its body, and records them as [assembly: EmittedEvents(...)].
    • New ICarriesEvents marker.
    • Pass 2 now recognizes aggregate parameters by the IRefersToAggregate marker rather than by attribute name.

Event store

  • #985: InMemoryDocumentStore implements IEventStore.
  • #989: a composite single-pass replay that ends on an empty page now persists its progression.

Wire additions

These are appended enum members, so existing integer values don't change:

  • EventModelProvenance.Specified
  • HotspotOrigin.UnresolvedSpecification
  • EventModelRole.AggregateDeclaration and EventModelRole.DeciderModel