Skip to content

wr: type-verify csv and tsv 3-arg overloads#197

Merged
danieljohnmorris merged 1 commit into
mainfrom
fix/csv-tsv-writer
May 12, 2026
Merged

wr: type-verify csv and tsv 3-arg overloads#197
danieljohnmorris merged 1 commit into
mainfrom
fix/csv-tsv-writer

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Collaborator

The 3-arg form wr 'foo.csv' headers rows was slipping past type verification, accepting wrong shapes and erroring deep in the writer.

Implementation:

  • verifier matches the 3-arg overloads for csv and tsv
  • checks headers is list of text and rows is list of lists before dispatch
  • same treatment for tsv

Tests: cross-engine regression tests + examples/csv-tsv-writer.ilo with -- run: directives.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

❌ Patch coverage is 64.48598% with 38 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/interpreter/mod.rs 51.94% 37 Missing ⚠️
src/vm/mod.rs 96.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@danieljohnmorris danieljohnmorris force-pushed the fix/csv-tsv-writer branch 6 times, most recently from b3dfe22 to b0ebef6 Compare May 12, 2026 23:31
wr 'foo.csv' xs already worked for writing CSV but the 3-arg form
wr 'foo.csv' headers rows that takes an explicit header row was
slipping past type verification, accepting wrong shapes and
erroring deep in the writer.

Verifier now matches the 3-arg overloads for csv and tsv,
checking headers is a list of text and rows is a list of lists
before dispatch. Same for tsv.
@danieljohnmorris danieljohnmorris merged commit 1c344d4 into main May 12, 2026
4 of 5 checks passed
@danieljohnmorris danieljohnmorris deleted the fix/csv-tsv-writer branch May 12, 2026 23:38
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