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

Thoughts on upstreaming? #12

Closed
WhyNotHugo opened this issue Jan 30, 2023 · 2 comments
Closed

Thoughts on upstreaming? #12

WhyNotHugo opened this issue Jan 30, 2023 · 2 comments

Comments

@WhyNotHugo
Copy link

The types here are very useful, and it feels like clap_complete should actually include them.

Do you have any thoughts on pushing the helpers in this crate as additions to the upstream clap_complete crate? Has this been discussed before?

@nihaals
Copy link
Owner

nihaals commented Jan 31, 2023

This would be nice, but there are a few things that make it hard:

  • clap_complete_fig is a separate crate that depends on clap_complete
    • This adds a circular dependency and the crates would need to be merged
  • clap_complete uses the same major version as clap, but this crate's smoother API would include breaking changes
  • clap_complete is unlikely to include extra things that just fit in well with the API like Add man page support #10
  • clap_complete is unlikely to include third-party/smaller clap_complete::Generators created in the future (and there would again be a circular dependency, unless every generator is added to upstream, which is also unlikely), while this crate can add them as features

For these reasons, I think there will always be a use for a wrapper crate separating the traits and generators from the actual interface for people to use, and implementing this yourself in each project can feel a bit awkward and cause duplication (which is what lead to me making this crate).

It's also important to note that some of these are intentional design decisions made by clap_complete and so make sense for them.

@WhyNotHugo
Copy link
Author

Thanks for the detailed answer. It's all very clear, I've nothing to add. :)

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