Replace prettytable-rs with comfy-table #2413
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace the
prettytable-rs
dependency withcomfy-table
.Motivation
The table output by
rover config whoami
was misalgined, due to this issue inprettytable-rs
:As pointed out in the comparison with other libraries in the
comfy-table
docs, it appears thatprettytable-rs
may be abandoned. The fix for the above issue has had an open PR for several months, but it has not been merged and released.comfy-table
appears to be actively developed, and had a new version release 12 days ago.Differences
Dropping in
comfy-table
is almost seamless. There are a few very slight differences in the output, in addition to fixing the above alignment issue:prettytable-rs
, but they do work withcomfy-table
comfy-table
uses a double line between the header row and the next row, more clearly delineating the headerscomfy-table
preset uses dashed lines inside the table, and solid lines for the table border, provding a nice visual separation.prettytable-rs
used solid lines everywhere.Comparison
Note that the examples below do not show bold fonts or colors that would appear in the terminal.
rover config whoami
prettytable-rs
comfy-table
rover docs list
prettytable-rs
comfy-table
rover subgraph list
prettytable-rs
comfy-table