-
-
Notifications
You must be signed in to change notification settings - Fork 95
Closed
Description
Description
- The current Spyglass API uses runtime reflection to discover aggregates and states, which is slow and incompatible with AOT compilation
- Need to shift discovery to compile-time using Roslyn incremental source generators
- Must support both traditional aggregates and standalone state types for functional command services
- Generated code should auto-register via module initializers with no DI setup required
Deliverables
- Generator Implementation — Create
SpyglassGeneratorincremental source generator that discoversAggregate<T>andState<T>types at compile-time - Registry System — Implement static
SpyglassRegistryto hold discovered types and their metadata (methods, events, load delegates) - API Refactoring — Update
SpyglassApiendpoints to query registry instead of using reflection-basedInsidePeek - Standalone States — Support registration of state-only types without aggregates for functional patterns
- Comprehensive Tests — Add unit tests for generator discovery logic and integration tests for API endpoints
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels