Skip to content

Release v19.52.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 17:26
3dac2e5

Summary

Every Chronicle artifact can now be registered explicitly in ChronicleOptions.ExplicitArtifacts, without attributes or marker interfaces. Contract assemblies no longer need a Chronicle reference, and existing markers keep working with the same identifiers. See Explicit artifacts.

Added

  • RegisterEventType<T>() and RegisterEventType(Type) register event types, with optional WithId, Generation, Public, Private, ForEventStore and PublishTo settings. Defaults match the identifiers markers produce today. (#4732)
  • RegisterReactor, RegisterReducer, RegisterConstraint, RegisterEventSource and RegisterMigration register plain classes without IReactor, IReducerFor<T>, IConstraint, IEventSource or migration markers. A reducer's read model is inferred from its methods, and a constraint only needs Define(IConstraintBuilder). (#4732)
  • A plain migration class with typed Upcast and Downcast methods can be registered explicitly, and EventTypeMigration<TUpgrade, TPrevious> gains a constructor that takes the store's IEventTypes, so migrations between unmarked event generations resolve their identifiers from the owning store. (#4732)
  • IReactors and IReducers gain Type-based Register, GetStateFor and Replay operations, plus generic extension methods for plain observer classes. (#4732)
  • IJsonSchemaGenerator gains overloads that take the store's IEventTypes, so compensation schemas resolve explicitly registered target events. Existing generators keep their current output. (#4732)
  • ReadModelScenario, ReactorScenario and EventScenario honor explicitly registered artifacts, and ReactorScenario accepts plain reactor classes. (#4732)
  • Analyzers CHR0001, CHR0002, CHR0003, CHR0005 and CHR0007 accept event types registered through RegisterEventType in the same compilation. (#4732)

Changed

  • Conflicting explicit registrations, such as two different identifiers or generations for the same type, or two types sharing an identifier and generation, now fail at startup with ConflictingArtifactDeclaration or ConflictingArtifactKind instead of registering silently. (#4732)
  • A store registers nothing with the kernel until all of its artifacts have been prepared successfully. A preparation failure is reported through the registration outcome and is not retried as a connection failure. (#4732)