Skip to content

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

Merged
ammario merged 1 commit into
mainfrom
pr9564
Sep 7, 2023
Merged

ammario merged 1 commit into
mainfrom
pr9564

Conversation

@ammario

@ammario ammario commented Sep 7, 2023 •

Copy link
Copy Markdown
Member

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

ammario commented Sep 7, 2023

Copy link
Copy Markdown
Member Author

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

ammario commented Sep 7, 2023

Copy link
Copy Markdown
Member Author

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

ammario commented Sep 7, 2023

Copy link
Copy Markdown
Member Author

737c80f:

No more compilation or lint issues!

@ammario

ammario commented Sep 7, 2023

Copy link
Copy Markdown
Member Author

50a0f2a:

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

@ammario

ammario commented Sep 7, 2023 •

Copy link
Copy Markdown
Member Author

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