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

review carapace #327

Open
plastikfan opened this issue Nov 22, 2024 · 3 comments
Open

review carapace #327

plastikfan opened this issue Nov 22, 2024 · 3 comments
Assignees
Labels
research work requiring research rather than implementation

Comments

@plastikfan
Copy link
Contributor

plastikfan commented Nov 22, 2024

See: carapace

How can this be used with cobrass?

You can delete anything to do with named enums as these are all surplice to requirements. They can be replaced by the use of carapace. However, this integration with carapace can't be done in a generic way as it is application specific.

@plastikfan plastikfan added the research work requiring research rather than implementation label Nov 22, 2024
@plastikfan plastikfan self-assigned this Nov 22, 2024
@plastikfan
Copy link
Contributor Author

I think carapace means end of life for cobrass. Cobrass was built upon a naive basis, I was not privy to the world of completions when I launched this. It's not until recently that I discovered carapace and the more I learn about it the more I think this is the end of Cobrass.

@plastikfan
Copy link
Contributor Author

plastikfan commented Nov 25, 2024

Actually the previous comment is overly pessimistic. I can remove all the functionality relating to option validation and those fake enums which designed to try and assist the end user type in values which needs to be mapped into enums values internally.

We can retain the concept of parameter sets, but without the validation aspect.

Cobrass does implement parameter sets defined in stores which we can still use as a mechanism for building consistent CLIs.

Largely, the use of carapace will exhibit itself in end applications, but we can still use carapace to define completions for parameter sets.

Lesson to learn from this is, do much more upfront research on the domain. This has happened to me before when I built a v3 of GoRx which ended up not being useful as I had envisioned.

@plastikfan
Copy link
Contributor Author

plastikfan commented Nov 29, 2024

I think I would prefer to retire cobrass and move the remaining functionality (anything to do with the store and anything defined to be a general CLI helper) to a new repo.

The new repo will provide cobra and carapace assistance but may not have wide appeal as was the original intention for cobrass. This new repo will serve to make snivilised projects as consistent as possible but should resist including non generic functionality that should be left to a client application to provide.

Also note there is an alternative way of bootstrapping the code for a new client application. A user should define a cli according to carapace spec and then generate the code using the carapace cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
research work requiring research rather than implementation
Projects
None yet
Development

No branches or pull requests

1 participant