Repository navigation
Serialization.V2: validation returns diagnostics; one gate ladder shared by both outputs (S2, stacked on #8521) - #8522
Conversation
…red by both outputs
|
Benchmark re-measured on a quiet machine (load average under 1, no other test runs), same short-run config, 5 serializers x 100 messages:
Against the S1 baseline in #8521 (75 / 115 / 60 / 70 ms) this is flat within the short-run error bars, which are wide (the full-run error column reads 99 ms on this run). Allocations are identical to the byte, which is the number this PR could have moved and did not. The earlier table in the description was taken while multi-node test loops were running on the same box and should be ignored. Later PRs in this series will use a longer job for the final numbers so the error bars are meaningful. |
|
Closing: this change is being reopened as part of a native GitHub stack with all branches in akkadotnet/akka.net (stacks cannot span a fork). Same commits, same content; the new PR will link back here. |
Summary
Part of #8384. Step S2 of the generator architecture pass. Stacked on #8521 (S1); this PR's base is that branch, and its diff is one commit. No behavior change: the set of diagnostics reported for any input is identical, emitted output is byte-identical, and
GoldenOutput/andWireSnapshots/are untouched.What changes
Validate*andReport*helper appends a value-equatableDiagnosticSpecto a builder. ADiagnosticSpeccarries aDiagnosticKey, one enum member per descriptor field, and the message arguments. The key, not the public id, disambiguates the three ids that have two descriptor variants (AKKASG003 plain and polymorphic-hint; AKKASG007 and AKKASG015 same-assembly and cross-assembly). A privateDiagnosticRegistryis the single place a key becomes a descriptor and a spec becomes aDiagnostic, still atLocation.Noneuntil S6.EvaluateGatereturns whether a serializer is emittable plus its gate diagnostics. Both the emission callback and the protocol-coverage output call it; the silent duplicate ladder inReportProtocolCoverageis deleted.isValidchain implemented; warnings and infos still allow emission.Validate(SerializerInfo, ImmutableArray<MessageInfo>)andEvaluateGate(...)run on models with no generator driver.GeneratorValidatorSpecadds nine facts that assert on keys and arguments, not message substrings, covering a valid pair, AKKASG005, 006, 012, 015, 023, 029, 032, and 034.The pipeline wiring in
AkkaSerializerGenerator.csis untouched, and the four tracked stages are unchanged.GeneratorIncrementalScenariosSpecandGeneratorIncrementalCachingSpecpass with their original pins.Testing
dotnet test src/core/Akka.Serialization.V2.Tests -c Release: 287 passed (278 from S1 plus 9). Generator builds with warnings as errors.Akka.Remotebuilds.Benchmark
The numbers below were measured while other agents were running multi-node test loops on the same machine, so they are not comparable to S1's baseline yet. They will be re-measured on a quiet machine and posted as a comment before this PR is considered for merge. Nothing in this PR touches a cached pipeline input; the change is confined to the bodies of the two
RegisterSourceOutputcallbacks.Stack
Base:
feature/serialization-v2-generator-harness(#8521). When #8521 merges, this PR is rebased ontodevand retargeted.