Repository navigation
sbe: diagnose a stale descriptor in Codec::New, as protowire-go does - #124
Conversation
6327608 to
9427122
Compare
40e95fa to
5baa283
Compare
dd54f84 to
212cd45
Compare
5baa283 to
f75124d
Compare
|
Rebased onto #123's new head 212cd45 (this PR's head is now f75124d). The only conflict was |
212cd45 to
3f0565a
Compare
f75124d to
801d607
Compare
A file or message carrying its SBE option at the pre-v1.12.0 number is reported as stale instead of missing or silently skipped, and the missing-schema-id error uses Go's words. The check moves to annotations.cc, shared with ProtoToXML.
801d607 to
76f7a4e
Compare
|
Rebased onto main df6b102 (#123 merged); head is now 76f7a4e. The rest of the stack moved with it in one rebase: #137 bcedc19, #140 43eabbe, #143 456dd6e, #147 db34ed3. Each layer's diff against its base is unchanged. Local ctest at the top (#147): 705 of 705. Unmodified |
Fixes #122
Stacked on #123 (the XML converters), whose
ProtoToXMLcarried the first copy of this check. Merge #121, then #123, then this.sbe::Codec::Newnow diagnoses a descriptor compiled against the pre-v1.12.0sbe/annotations.protothe way protowire-go does:(sbe.schema_id)sits at the retired number 50100 getssbe: file <name> carries (sbe.schema_id) at retired option number 50100 (registered as 1319 since protowire v1.12.0): the descriptor predates ... must be recompiled ....(sbe.template_id)sits at 50200 gets the same diagnosis. It used to be skipped silently, as if it weren't a template, so the codec just didn't know the message.sbe: file <name> missing (sbe.schema_id) option, Go's text, where it said<name> missing (sbe.schema_id) file option.The check,
StaleFileErrorandStaleMessageErrorinannotations.cc, is now shared withProtoToXML. A retired number that the descriptor's pool declares as an extension counts as a known option, not a stale one. That's how Go's compiler stores it, and the #123 differential fixturestale.protopins it.Evidence
SbeStale.CodecNewDiagnosesStaleDescriptorsbuilds descriptors whose options carry 50100 or 50200 as unknown fields, and checks Go's text for both, plus that a plain message is still skipped.SbeStale.CodecNewMissingSchemaIDTextchecks the new missing text with a pool that declares 50100.error:lines. The--sbe-xmldifferential output is unchanged and still identical to Go main's. Formatted with clang-format 18.1.8.