Skip to content

chore(cli): replace clibase with external coder/serpent #12252

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 12 commits into from
Mar 15, 2024
Merged

Conversation

ammario
Copy link
Member

@ammario ammario commented Feb 21, 2024

I wanted to use clibase in a new thing I'm building, so it felt like a natural moment to move it into its own repo.

Unfortunately the help code is duplicated between this repo and serpent because we coupled our help handler with Coder specific concepts and I didn't want to make this change larger.

Most of the changes are simple find and replace except for apitypings/main.go.

TODO:

  • fix type generator

Copy link
Member Author

ammario commented Feb 21, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ammario and the rest of your teammates on Graphite Graphite

@ammario ammario changed the title chore(cli): use external coder/serpent instead of clibase chore(cli): replace clibase with external coder/serpent Feb 21, 2024
@ammario ammario requested a review from mafredri February 22, 2024 17:03
@mafredri
Copy link
Member

@ammario what's the plan for continuing development of serpent? I worry that splitting up the code base here will increase friction in improving the coder CLI.

At the moment, we're still missing critical features like shell completion. And some basic functionality like coder badcommand doesn't show that the subcommand doesn't exit, it just shows the help. I'm sure there are some other open issues for the cli/clibase as well.

@ammario
Copy link
Member Author

ammario commented Feb 23, 2024

There is no plan at the moment. It will make development marginally more difficult when trying to improve both the CLI base and coder/coder but the rate of changes (https://github.com/coder/coder/commits/main/cli/clibase) to clibase seems low enough to be insignificant.

On the other side, we can improve serpent without the complex development loop and CI of coder/coder.

Copy link
Member Author

ammario commented Feb 23, 2024

Plus, we can submit light changes to serpent without review.

Copy link
Member Author

ammario commented Feb 23, 2024

Going to tag @kylecarbs instead to hopefully get it merged before the weekend and not deal with more conflicts.

@ammario ammario requested review from kylecarbs and removed request for mafredri February 23, 2024 17:35
Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essentially rubber stamping this.

I agree with @mafredri that making significant changes may be a pain in the butt, but I think it's worthwhile for us to try and advertise serpent to other large Go services that have many configurable properties.

Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also giving my stamp, but I'd want to see the relevant issues ported over (or at least referenced) to the serpent repo.

This will increase visibility for shortcomings in the project and also has the chance to attract contributors.

@github-actions github-actions bot added the stale This issue is like stale bread. label Mar 8, 2024
@github-actions github-actions bot closed this Mar 11, 2024
@ammario
Copy link
Member Author

ammario commented Mar 11, 2024

Will revisit this when I have some free cycles.

@ammario ammario reopened this Mar 12, 2024
@matifali matifali removed the stale This issue is like stale bread. label Mar 12, 2024
Copy link
Member Author

ammario commented Mar 15, 2024

OK. Merging this in now. Will move the relevant issues to the new tracker and maybe knock some out today.

@ammario ammario merged commit 4962324 into main Mar 15, 2024
@ammario ammario deleted the emigrate-cli branch March 15, 2024 16:24
@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2024
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.

4 participants