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

Split up CLI into packages #239

Open
knothed opened this issue Jun 21, 2022 · 2 comments
Open

Split up CLI into packages #239

knothed opened this issue Jun 21, 2022 · 2 comments

Comments

@knothed
Copy link
Contributor

knothed commented Jun 21, 2022

Currently, CLI handling is done exclusively in Main.

Library authors which depend on happy packages would however benefit from a model where the CLI handling is also distributed to the packages which use the CLI flags.

An option would be to create an additional -cli package for each currently existing happy package. For example, the happy-frontend-cli package would then contain the CLI flags and the CLI handling that is relevant for the happy-frontend package.

All logic which is currently held in Main would be split into these -cli packages, and Main would just stitch these separate CLI stubs together in a sensible way.
This would enable library authors to exchange happy package components without having to copy and adapt the whole Main file.

I'd be happy to work on an implementation if desired.

@sgraf812
Copy link
Collaborator

@knothed would you still say that a CLI package is absolutely necessary?

I don't think we'll see it for happy 2.0. But extracting one more subcomponent is not really a breaking change, so it would be realistic for happy 2.1 (say).

@knothed
Copy link
Contributor Author

knothed commented Oct 7, 2024

No, I don’t think it’s necessary.
In happy-rad for example I now only support RAD so there is not much code duplication of happy’s main file. So it depends on what users of happy-lib want, which we don’t know yet.

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

No branches or pull requests

2 participants