Skip to content

docs (v2): the Spans change compiles silently in Go; how a column_defaults value is read - #667

Merged
EricAndrechek merged 2 commits into
v2from
v2-docs-spans-nil
Oct 21, 2026
Merged

EricAndrechek merged 2 commits into
v2from
v2-docs-spans-nil

Conversation

@EricAndrechek

@EricAndrechek EricAndrechek commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Spec batch 2 (#655) made each binding's BatchResult.spans hold one entry per row, with an empty entry for a row the export did not carry: Go []*Span, Python Span | None, TS Span | null, Rust Option<Span>.

A downstream user found that in Go the change compiles silently. Code written for []Span that reads r.Spans[i].Off still builds, because Go dereferences the pointer, and then panics at run time on a nil entry. Python and TS fail the same way at run time; Rust's Option makes the compiler catch it.

  • Each binding's CHANGELOG breaking-change bullet now says how old code fails there, and to check each entry before reading it.
  • The spans row in docs/reference/bindings-v1.md says the same (dprint realigned that table).

Also: how a column_defaults value is read (docs/guides/batches.md, plus one CHANGELOG bullet per binding). The value is read in the body format's own field encoding, by the reader that reads that column's field. Measured by a downstream user on build 20261021.025722 (darwin-arm64):

  • CSV "a,""b" is read, and an unquoted a,b is refused with error 27;
  • TSV a\tb is read, and a raw tab is refused with error 27;
  • JSON "42" and 42 both read into UInt32;
  • a value that doesn't read is refused at the call, before any body byte.

spec/abi-v2/docs.md already states the rule; it isn't edited here.

Docs only, with no code change. Nothing under spec/abi-v2/ or include/v2/ changes. The ABI v2 fingerprint is sha256:d53239933966…41c2 both before and after this change (measured with gen.py --major 2 --fingerprint).

Test plan

  • markdownlint-cli2@0.18.1, dprint@0.57.4 check, lint-spelling.sh, parity-surface.py --selftest and lint-public.sh.
  • CI.

🤖 Generated with Claude Code

EricAndrechek and others added 2 commits October 21, 2026 02:18
BatchResult.Spans became []*Span (Python: Span | None, TS: Span | null),
nil for a row the export did not carry. In Go, code written for []Span
that reads r.Spans[i].Off still compiles and panics at run time on a nil
entry; Python and TS fail the same way at run time; Rust's Option makes
the compiler catch it. The four CHANGELOG bullets and the bindings-v1.md
row now say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The value is read in the body format's own field encoding, by the reader
that reads that column's field: CSV quoting, TSV escapes, a JSON string
or number. Measured by a downstream user on build 20261021.025722
(darwin-arm64). A value that does not read is refused at the call,
before any body byte. Guide subsection plus one CHANGELOG bullet per
binding; spec/abi-v2/ is untouched and the ABI v2 fingerprint is
unchanged (d53239933966...41c2, measured before and after).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EricAndrechek EricAndrechek changed the title docs (v2): the Spans change compiles silently in Go — check each entry docs (v2): the Spans change compiles silently in Go; how a column_defaults value is read Oct 21, 2026
@EricAndrechek
EricAndrechek merged commit 1c6ceca into v2 Oct 21, 2026
54 checks passed
@EricAndrechek
EricAndrechek deleted the v2-docs-spans-nil branch October 21, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant