Closed bryfox closed 3 months ago
It's not clear to me why other commands need to use the original formatter rather than this one
My goal was to leave the output of mcap info
exactly as-is. I was not able to get correct formatting for both 'info' and other commands using the same formatter. They're really different formats. Most are column-aligned tables; info has left-aligned labels with tabs in the row content itself to indent some rows.
Changelog
Fix: table output from list commands supports wide columns such as large amounts of metadata
Docs
None
Description
Previously, listing the metadata for an mcap file with many (>64kb) key/value pairs failed silently.
The Scanner used in the table formatter has a buffer limit of 64kb, and the error result was being ignored. This removes the scanner entirely from most table output. It was introduced to trim leading whitespace from lines, but the formatter accepts other options to make this happen.
I've given the info command its own formatter, which I think is appropriate because it's formatting data differently, even including tabs in its row data. The scanner's error result is now checked, though we shouldn't see this in practice for
mcap info
.As a side effect, this also fixes the column alignment for something like
list schemas
that contains linebreaks:This also makes a couple of copy fixes to the inline help for the metadata commands.
Fixes #1189.