Bump spanvalue to v0.5.0#38
Conversation
Handle NewCSVWriter construction errors and regolden NUMERIC output to wire-as-is (99.5). Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Code Review
This pull request upgrades the github.com/apstndb/spanvalue dependency from v0.4.1 to v0.5.0. Consequently, calls to svwriter.NewCSVWriter have been updated to handle its new error return value in both main.go and csv_test.go. The golden test data for numeric values has also been updated to reflect formatting changes. There are no review comments, so 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.
apstndb
left a comment
There was a problem hiding this comment.
Mechanical, correct upgrade to spanvalue v0.5.0. Verified locally:
- All four
NewCSVWritercall sites (2 inmain.go, 3 in tests) now handle the new(*DelimitedWriter, error)signature;grepconfirms no call site was missed. - The
numeric.goldenregolden (99.500000000->99.5) matches the v0.5.0 release-note guidance to regolden NUMERIC exports for Simple-format wire-as-is output. spanvalue/writeris the only spanvalue package imported, so the other breaking constructors (NewJSONLWriter,NewSQLInsertWriter) don't affect this repo. Thego.modhash ingo.sumis unchanged, so there are no transitive dependency changes.go build ./...andgo test -run TestExperimentalCsv .pass.
LGTM. A couple of non-blocking notes inline.
| defer rowIter.Stop() | ||
|
|
||
| csvWriter := svwriter.NewCSVWriter(writer) | ||
| csvWriter, err := svwriter.NewCSVWriter(writer) |
There was a problem hiding this comment.
Non-blocking note: for the CSV case this error branch is effectively unreachable. NewCSVWriter only surfaces a configuration error for an invalid delimiter (Comma is hard-coded and always valid) or a failing option, and none of the call sites pass a fallible option. Handling it is still the right thing to do given the new signature, just flagging that it won't fire in practice.
| @@ -1,2 +1,2 @@ | |||
| v | |||
| 99.500000000 | |||
| 99.5 | |||
There was a problem hiding this comment.
Confirmed intentional: spanvalue v0.5.0 SimpleFormatConfig emits the NUMERIC wire decimal string as-is (no nine-digit scale padding), and the release notes explicitly call out regoldening CSV/JSONL exports when upgrading from v0.4.1 or older. This is a user-visible output change for the experimental_csv format's NUMERIC columns; acceptable given the format is still experimental.
Summary
github.com/apstndb/spanvaluefrom v0.4.1 to v0.5.0.NewCSVWriterreturning(*DelimitedWriter, error)at all call sites.testdata/experimental_csv/numeric.goldenfor Simple-format NUMERIC wire-as-is (99.5instead of99.500000000).Test plan
go test ./...Made with Cursor