Build Diagnostics
The source generator checks your actors as you build, so mistakes surface in the IDE instead of at runtime.
| Code | |
|---|---|
| SACT001 | An interface member can’t be proxied (a property, a generic method, or ref/out/in parameters) |
| SACT002 | A method doesn’t return Task, Task<T>, ValueTask or ValueTask<T> |
| SACT003 | A [OneWay] method returns a value |
| SACT004 | A class implements an actor interface but doesn’t derive from Actor |
| SACT005 | An actor can’t be constructed (it’s generic, private, or has ambiguous constructors) |
| SACT006 | Warning: two classes implement one interface. Pick one with actors.AddActor<IFoo, Foo>() |
| SACT007 | Warning: a state or event type (Actor<T>, JournaledActor<,>, [ActorState]) isn’t on any JsonSerializerContext |
| SACT008 | An actor interface is generic or not reachable |
| SACT009 | Two actors share an [ActorName] |
| SACT010 | An [ActorState] parameter isn’t an IActorState<T> |
| SACT011 | A [StatelessWorker] has persistent state (Actor<T>, JournaledActor<,> or [ActorState]) |
What the generator writes
Section titled “What the generator writes”For each actor interface, it writes a local proxy, a remote proxy and a wire contract. For each class, it writes a
registration. A single module initializer wires all of it up, which is why AddShinyActors() needs no list of actors
and nothing is found by reflection.


