Skip to content

chore(cli): replace lipgloss with coder/pretty #9564

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

Merged
merged 1 commit into from
Sep 7, 2023
Merged

chore(cli): replace lipgloss with coder/pretty #9564

merged 1 commit into from
Sep 7, 2023

Conversation

ammario
Copy link
Member

@ammario ammario commented Sep 7, 2023

chore(cli): replace lipgloss with coder/pretty

This change will improve over CLI performance and "snappiness" as well as
substantially reduce our test times. Preliminary benchmarks show
coder server --help times cut from 300ms to 120ms on my dogfood
instance.

The inefficiency of lipgloss disproportionately impacts our system, as all help
text for every command is generated whenever any command is invoked.

The pretty API could clean up a lot of the code (e.g., by replacing
complex string concatenations with Printf), but this commit is too
expansive as is so that work will be done in a follow up.

@ammario
Copy link
Member Author

ammario commented Sep 7, 2023

f11d5ce:

Begun porting over cli and enterprise/cli.

65 problems left.

@ammario ammario force-pushed the pr9564 branch 2 times, most recently from 10dccc1 to 801c013 Compare September 7, 2023 16:35
@ammario
Copy link
Member Author

ammario commented Sep 7, 2023

801c013:

  • Finished converting cliui

41 problems left.

@ammario ammario force-pushed the pr9564 branch 2 times, most recently from 3231854 to 737c80f Compare September 7, 2023 18:14
@ammario
Copy link
Member Author

ammario commented Sep 7, 2023

737c80f:

No more compilation or lint issues!

@ammario
Copy link
Member Author

ammario commented Sep 7, 2023

50a0f2a:

  • cmd/cliui presents nicely
  • also, added help to cmd/cliui

@ammario
Copy link
Member Author

ammario commented Sep 7, 2023

c495ef6: cli tests pass
0974381: make gen && fix typo


Sep 07 - 07:55PM - 0655f72
fixed more lint issues

Sep 07 - 08:17PM - 7fc78f2
fixed cli doc gen

@ammario ammario force-pushed the pr9564 branch 4 times, most recently from 7fc78f2 to 2538308 Compare September 7, 2023 20:40
@ammario ammario marked this pull request as ready for review September 7, 2023 20:43
@ammario ammario requested a review from sreya September 7, 2023 20:43
This change will improve over CLI performance and "snappiness" as well as
substantially reduce our test times. Preliminary benchmarks show
`coder server --help` times cut from 300ms to 120ms on my dogfood
instance.

The inefficiency of lipgloss disproportionately impacts our system, as all help
text for every command is generated whenever any command is invoked.

The `pretty` API could clean up a lot of the code (e.g., by replacing
complex string concatenations with Printf), but this commit is too
expansive as is so that work will be done in a follow up.
@ammario ammario merged commit dd97fe2 into main Sep 7, 2023
@ammario ammario deleted the pr9564 branch September 7, 2023 21:28
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants