Repository navigation
Adopt spancodec v0.1.2 and spanvalue v0.8.1 in EncodeOptions - #7
Conversation
spancodec v0.1.2 fixed []T inference from element WithGoType registrations (apstndb/spancodec#1, filed from this package), so the slice-type registration workarounds are gone, and the new WithTypedValueEncoder collapses each encoder+type pair into one option. The PGNumericValue rounding hazard doc now points at spanvalue v0.8.1 PGNumericValueExact (apstndb/spanvalue#249, also filed from here). Behavior verified unchanged by the integration probes against the PG-dialect emulator, including the RowTypeFor annotation inference test that now exercises the fixed element-based slice inference. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the dependencies spancodec to v0.1.2 and spanvalue to v0.8.1. In encode_options.go, the EncodeOptions function is refactored to use WithTypedValueEncoder instead of WithValueEncoder paired with WithGoType. Redundant slice-type registrations are removed because spancodec v0.1.2 now automatically resolves slice types from element registrations via static inference. The documentation has been updated accordingly. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Closes the feedback loop this package opened: both upstream changes were filed from spanpg and are now consumed back.
[]Tinference lets the four slice-typeWithGoTypeworkaround registrations be deleted; the newWithTypedValueEncoder(Add WithTypedValueEncoder, the pre-composed encoder+type registration spancodec#3, surveyed from this very file) collapses each encoder+type pair —EncodeOptionsdrops from 12 option entries to 4.PGNumericValue9-digit rounding hazard note now points atPGNumericValueExactfor exact wider-scale values.Verification:
mise run checkgreen;mise run test-integrationgreen against the PG-dialect emulator — the round-trip and spancodec e2e probes (includingRowTypeForannotation inference, which now exercises the fixed slice inference) pass unchanged, proving the rewrite is behavior-identical.🤖 Generated with Claude Code