Skip to content

Enable STJ source-gen for actor state/event serialization#219

Merged
kzu merged 1 commit intomainfrom
dev/stj
Apr 16, 2026
Merged

Enable STJ source-gen for actor state/event serialization#219
kzu merged 1 commit intomainfrom
dev/stj

Conversation

@kzu
Copy link
Copy Markdown
Member

@kzu kzu commented Apr 16, 2026

Adds JsonContextGenerator to invoke System.Text.Json source generator at build time for actor state and event types. Updates ActorState codegen to emit a nested ActorJsonContext and implement IActorState.JsonOptions. StreamstoneStorage now uses the generated context for serialization/deserialization. Refactors serialization paths to pass JsonSerializerOptions. Updates docs and tests to verify correct context usage. Enhances cecil.cs to strip specific attributes from types.

Fixes #138

Adds JsonContextGenerator to invoke System.Text.Json source generator at build time for actor state and event types. Updates ActorState codegen to emit a nested ActorJsonContext and implement IActorState.JsonOptions. StreamstoneStorage now uses the generated context for serialization/deserialization. Refactors serialization paths to pass JsonSerializerOptions. Updates docs and tests to verify correct context usage. Enhances cecil.cs to strip specific attributes from types.

Fixes #138
@kzu kzu added the enhancement New feature or request label Apr 16, 2026
@kzu kzu enabled auto-merge (rebase) April 16, 2026 21:07
@kzu
Copy link
Copy Markdown
Member Author

kzu commented Apr 16, 2026

51 passed 51 passed
51 passed 51 passed
51 passed 51 passed

🧪 Details on Ubuntu 24.04.4 LTS
🧪 Details on macOS Unix 15.7.4
🧪 Details on Microsoft Windows 10.0.26100

from retest v1.1.0 on .NET 10.0.6 with 💜 by @devlooped

@kzu kzu merged commit e27630b into main Apr 16, 2026
6 checks passed
@kzu kzu deleted the dev/stj branch April 16, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve performance of ActorState by generating JsonContext for it

1 participant