IPersistentState<> should generate compile-time errors not runtime errors
- Dominant language
- C#
- Stars
- 10.9k
- Forks
- 2.1k
- Avg merge
- 14h 42m
- Merged PRs (30d)
- 354
Description
My understanding of the Orleans 7 serializer system is that by default any classes persisted via `IPersistentState<>` need to have `[GenerateSerializer]` (and `[Id]`) attributes applied to work correctly, and that if [GenerateSerializer] tags are not applied the serialization system will fail at runtime rather than generating an error at compile-time.
Is there a way to configure the default serializer behavior to produce compile-time errors if the type provided to `IPersistentState<>` does not have `[GenerateSerializer]` (and `[Id]`?) attributes?
Contributor guide
Research direction
Start by tracing how IPersistentState uses the Orleans 7 serializer and how [GenerateSerializer] and [Id] are validated. Determine whether the existing source-generation or analyzer path can report missing attributes at compile time. Done means the supported configuration or implementation reliably produces compile-time errors instead of runtime serialization failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100