Skip to content

Best way of handling dependencies when using clap_complete at compile time #3848

Answered by epage
tmccombs asked this question in Q&A
Discussion options

You must be logged in to vote

Heh, bringing derive features into the builder API also brings derive complications. Its been a while since I've provided completions in my programs, so I don't have first hand experience with this.

A variant of cfg would be to use a macro to either skip calls or put in dummy values.

Note that some value parser affect completions

  • #3840
  • If it provides possible values

We are also exploring an alternative approach to completions that cannot be built in a build.rs (#3166). If/when that is ready, I'm assuming we'll drop the level of support for the existing completions (which is already "not great" which is why we want to go this alternative approach)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tmccombs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants