Repository navigation
sbe-android: decode through a generated SbeCodec that takes limits - #175
Conversation
|
CI passed on 692839c, the PR head read back from the remote: Build + Test, Conformance (Go reference), Analyze and CodeQL. |
692839c to
bfce30e
Compare
|
I rebased onto main 1323944, after #170 and #171 merged. The new head is bfce30e, read back from the remote.
Run locally with
Merge order: spec #528, then spec #541, then re-pin here, then this PR. |
The plugin now gives <Message>SbeCodec unmarshal overloads that take MaxMessageSize and MaxRepeatedCount. check-decode-android calls one, so the corpus rows that lower a limit prove the generated entry point, not only SbeWireCodec under it. The pin moves to the plugin branch until it merges.
bfce30e to
1d8043b
Compare
|
I rebased onto main 35d1341, after #172 and #174 merged. The new head is 1d8043b, read back from the remote. main pins ee27eba (spec #528 plus #532). I stacked spec #541 on that commit (now 474e8ec) and pinned this PR there. The CHANGELOG conflict kept both entries. Run locally with
Merge order: spec #528, spec #532, spec #541, then re-pin to spec main. |
A caller of a generated lite
<Message>SbeCodeccan now setMaxMessageSizeandMaxRepeatedCount. The lite security harness now decodes through that codec, so the gate tests what a caller actually uses.Fixes #148
What changes
protoc-gen-pxf-java-meta(plugin: give a generated SbeCodec overloads that take limits protowire#541) gives the generated codecunmarshaloverloads that take the two limits.gradle.propertiespins that branch commit (3561bdd) for now.check-decode-androidcallsSbeWithGroupSbeCodec.unmarshal(data, maxMessageSize, maxRepeatedCount)instead ofSbeWireCodecdirectly.SbeCodecLimitsTestlowers each limit through the generated overload.Classification: reversible by a revert. It adds methods to generated code, and nothing is removed. Measured.
Evidence
Run at bf8df62 (the head before a CHANGELOG-only amend to 692839c) with
-PpxfJavaMeta.repo=/nonexistent, so the plugin is fetched at the pin, as in CI:./gradlew build: 657 tests, 0 failures, 5 skipped. The skips are pb: null and zero big numbers in Pb.marshal differ from protowire-go, and a null list element throws #159's, which pb: write null and zero big numbers as protowire-go does, and a BigFloat normalised #170 enables.SbeCodecLimitsTest(2 tests) passes. It compiles against the new overload, which confirms the pinned plugin was used.sbe/group-count-16with--limit MaxRepeatedCount=8givesreject: sbe: group entries declares 16 entries, MaxRepeatedCount=8, exit 1.Merge order and conflicts
sbecase ofcheck-decode-android. Whichever merges second needs a small rebase. I'll do it.