Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty Printing: Table-making functions should support auto-breaking any column #5550

Open
xmbhasin opened this issue Jan 18, 2025 · 0 comments
Labels

Comments

@xmbhasin
Copy link
Contributor

xmbhasin commented Jan 18, 2025

Describe and demonstrate the bug

The table-making functions in Unison.Util.Pretty, such as column2Header and column3Header only support auto-breaking of content in the last column. Content in other columns stretches out the column to fit, leading to potentially very long lines.

Screenshots

I don't have an easy to use reproduction right now, which may be best done with unit tests covering the table-making functions. But from working on a new alternative output for the names command (see #5521), when I tried putting names in the first column, I observed this behaviour:

scratch/main> names max

  'max':
  Hash                                                                        Kind          Names
  a.max, b.max, bar.max, c.max, d.max, e.max, f.max, foo.max, g.max, my.max   #u496htu1d7   Term
  builtin.Float.max                                                           ##Float.max   Term

Another odd issue I encountered is that with many names, the output gets paged through less and everything ends up in one column. TODO: Add example.

Environment (please complete the following information):

  • release/0.5.32-21-gdce127d97 (built on 2025-01-18)
  • Windows 11, Intel CPU

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant