dotnet / dotnet/orleans

IPersistentState<> should generate compile-time errors not runtime errors

Open
#8,522 1 comment 0 reactions 0 assignees View on GitHub
Needs: triage :mag:
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.