Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will update clap to v4 and replace the deprecated yaml macro with a struct derive macro.
Thanks for this very useful tool and library. When using this to infer jtd schemas from code and not the actual cli tool I noticed that the
clap
package uses an old version that depends onyaml-rust
which has a known vulnerability.I thought about putting the cli behind a feature flag but figured it was easier to maintain to just bump clap version. Let me know if you rather use a feature flag or any other approach.
All flags and names are the same but moving to v4 will change two things in the
--help
outputI tried setting
color = ColorChoice::Always
which compiles but doesn't add colored output.I did a template but could not make a 1:1 map since v4 groups
FLAGS
andOPTIONS
together. It also handles line breaks of help text differently. Below is the closest template I could make. Since I couldn't map it 1:1 I figured I just use the v4 default output instead.