Skip to content

Make IEventSerializer AOT-compatible#524

Open
alexeyzimarev wants to merge 7 commits intodevfrom
feature/aot-serializer-cleanup
Open

Make IEventSerializer AOT-compatible#524
alexeyzimarev wants to merge 7 commits intodevfrom
feature/aot-serializer-cleanup

Conversation

@alexeyzimarev
Copy link
Copy Markdown
Contributor

Summary

  • Remove [RequiresUnreferencedCode] and [RequiresDynamicCode] from IEventSerializer interface and all 43 consumer files across core and integration packages
  • Extract reflection-based DefaultEventSerializer to new Eventuous.Serialization.Json package (intentionally not AOT-compatible)
  • Add EventSerializer static holder class replacing DefaultEventSerializer.Instance / SetDefaultSerializer()
  • DefaultStaticEventSerializer and core serialization interface are now fully AOT-clean with zero suppression attributes

Breaking changes

  • DefaultEventSerializer moved from Eventuous.Serialization to Eventuous.Serialization.Json package
  • DefaultEventSerializer.Instance replaced by EventSerializer.Default
  • DefaultEventSerializer.SetDefaultSerializer() replaced by EventSerializer.SetDefault()
  • Apps must explicitly configure a serializer (either DefaultStaticEventSerializer for AOT or DefaultEventSerializer from the new package)

Test plan

  • Full solution builds with zero errors (from this change)
  • Core tests pass (26/26)
  • Application tests pass (21/21)
  • Subscription tests pass (30/30)
  • DI extension tests pass (3/3)
  • Integration tests with infrastructure (require docker services)

🤖 Generated with Claude Code

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant