Skip to content

Serialization V2: fix docs and diagnostics drift; diagnose private nested message types - #8721

Merged
Aaronontheweb merged 1 commit into
akkadotnet:devfrom
Aaronontheweb:fix/serialization-v2-docs-drift
Oct 2, 2026
Merged

Aaronontheweb merged 1 commit into
akkadotnet:devfrom
Aaronontheweb:fix/serialization-v2-docs-drift

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Member

Closes #8717. Part of #8675.

Changes

Docs text (docs/articles/serialization/source-generated-serialization.md):

  • The "Not supported" paragraph, the "Limitations Today" section and the planned-work list no longer say an object collection element is unsupported. It has worked since Treat object elements inside collections the same as an object field #8528. They now say only an object dictionary key is rejected (AKKASG003).
  • The Envelope Payloads section now says a collection element typed object is an envelope payload.

Diagnostic text:

New diagnostic (G-11):

  • AKKASG045 (error), "Message type is not accessible to generated code". A private or protected [AkkaSerializable] type, or one nested inside such a type, used to fail with CS0122 in generated code and no AKKASG id. The generator now reports AKKASG045 at the type declaration and emits nothing for it. The message says to make the type and its containers internal or public.
  • Added a docs paragraph and a row in the diagnostics reference table.

Tests (in AkkaSerializerGeneratorDiagnosticsSpec): private nested type, public type inside a private type, internal and public nested types stay clean, and the new cross-assembly AKKASG007 text.

Overlap with #8715

The generator PR for G-1 and G-3 (#8715) changes the supported-types table, the collections section and AKKASG007's text for TimeSpan and small scalars. This PR does not touch the table or any TimeSpan or scalar wording. The AKKASG007 change here is limited to the cross-assembly descriptor. The one-sentence edit in the "Not supported" paragraph sits just below the table, so a small textual merge may be needed.

Breaking changes

None

…sted message types

Docs no longer say an object collection element is unsupported (akkadotnet#8528).
AKKASG007 and AKKASG015 cross-assembly text no longer says the generator
cannot read a schema from a referenced assembly (akkadotnet#8534, akkadotnet#8537).
New AKKASG045 reports an [AkkaSerializable] type that is private or
protected, or nested in one, instead of CS0122 in generated code.

Closes akkadotnet#8717
@Aaronontheweb
Aaronontheweb merged commit 752b104 into akkadotnet:dev Oct 2, 2026
5 of 15 checks passed
@Aaronontheweb Aaronontheweb added this to the 1.6.0 milestone Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serialization V2 docs/diagnostics drift

1 participant