Repository navigation
Cache one resolved model per serializer so one message edit regenerates one file (S3) - #8527
Merged
Merged
Conversation
This was referenced Sep 9, 2026
Aaronontheweb
added this pull request to stack #8531
September 9, 2026 01:53
This was referenced Sep 9, 2026
Merged
Aaronontheweb
force-pushed
the
feature/serialization-v2-generator-resolve
branch
from
September 9, 2026 13:31
cd99ece to
6b2f11f
Compare
This was referenced Sep 9, 2026
Aaronontheweb
force-pushed
the
feature/serialization-v2-generator-resolve
branch
from
September 9, 2026 17:14
6b2f11f to
d5c7e33
Compare
Aaronontheweb
force-pushed
the
feature/serialization-v2-generator-resolve
branch
from
September 9, 2026 18:08
d5c7e33 to
161c569
Compare
Base automatically changed from
feature/serialization-v2-generator-validator
to
dev
September 9, 2026 22:52
Aaronontheweb
force-pushed
the
feature/serialization-v2-generator-resolve
branch
2 times, most recently
from
September 10, 2026 23:44
904b82d to
52434fe
Compare
…it re-emits one serializer
Aaronontheweb
force-pushed
the
feature/serialization-v2-generator-resolve
branch
from
September 11, 2026 15:05
52434fe to
99ac592
Compare
Aaronontheweb
deleted the
feature/serialization-v2-generator-resolve
branch
September 11, 2026 17:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Renaming a field in a message now regenerates one file, the serializer that owns that message. Before, it regenerated every serializer's file, and the unchanged ones matched byte for byte only by luck. Generated text is byte-identical. No golden, wire, or model snapshot changed. The diagnostic set is unchanged.
ResolvedSerializerholds everything emission needs: the gate result, the messages this serializer can reach, the top-level set as aClosedSet, the closed-generic registrations after resolution, formatter overrides, a typedUnionPlanin place of a string-keyed dictionary, the derived method names, and the validation diagnostics. It compares by content.ClosedSettype for the top-level dispatch set and the union sets. Decision 18 later expands over this object.Why
Roslyn reuses a step's output when its inputs compare equal. A model that holds only what one serializer needs stays equal when another serializer's message changes. A first version stored the whole message table in every serializer's model, and a probe test showed every model changing on every edit.
Savings
Short run, 5 serializers x 100 messages, machine at moderate load.
The rename row drops from the full-corpus figure to the no-change floor plus one serializer's emission. Wall clock carries noise at this load.
How it was checked
Scenario b in the caching tests flips: the rename runs one serializer's emit step, and the other never runs. 293 tests pass (287 plus 6): resolve tests on models with no driver, and a Verify snapshot of each serializer's resolved model over the golden corpus. Generator builds with warnings as errors.
Akka.Remotebuilds.Known follow-up
The protocol-coverage scan (AKKASG029) now runs once per serializer instead of once per compilation. Same output, more scanning when a project has several serializers. S5 moves it into one cached step.