Skip to content

fix(csv/parser): pre-type fns array so gawk doesn't empty the parse on Linux#10

Merged
alexzhangs merged 1 commit into
masterfrom
fix/csv-parser-gawk-array-typing
Jun 14, 2026
Merged

fix(csv/parser): pre-type fns array so gawk doesn't empty the parse on Linux#10
alexzhangs merged 1 commit into
masterfrom
fix/csv-parser-gawk-array-typing

Conversation

@alexzhangs

Copy link
Copy Markdown
Collaborator

csv/parser.awk's output_variable() built fns[length(fns)+1]; under gawk the first length(fns) typed fns scalar → empty -e output on Linux (BSD awk tolerated it). Add split("", fns) (same fix as ini/parser), plus a /csv/parser -e regression test. Surfaced by xsh-lib/xsql query tests failing on every Linux job.

…n Linux

output_variable() built fns[length(fns)+1]; under gawk the first reference length(fns) typed fns as a scalar -> 'attempt to use scalar as an array' -> empty -e/variable output on Linux (BSD awk on macOS tolerated it). Add split("", fns), same fix as ini/parser. Adds a /csv/parser -e regression test (surfaced by xsh-lib/xsql query failures on Linux).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alexzhangs alexzhangs merged commit 8fa0e05 into master Jun 14, 2026
6 checks passed
@alexzhangs alexzhangs deleted the fix/csv-parser-gawk-array-typing branch June 14, 2026 17:51
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