Closed lread closed 10 months ago
I think you can validate with you use the :validate
option in your :org.babashka/cli
metadata, right? Yes, that part was written before that existed, but the validation will only happen if you invoke the function through babashka CLI.
Thanks for the compliment btw!
Oh, apologies, I forgot to follow up! Thanks for the response, makes sense, of course.
Jet is an example project that supports both -X
and -M
calling styles with shared processing/validation.
I'm not sure this even needs to be clarified in the README, but can-do if you want. Otherwise, feel free to close this sissue.
Yeah, I think it would help
I just deleted the confusing section.
First, Kudos!
The more I use babashka/cli, the more I like it!
Currently
The readme states:
I expect, it was after this was originally written, that babashka/cli has added argument validation support.
A use case I am looking at is using babashka/cli for an existing Clojure JVM project that supports both
-M
and-X
invocations (the latter via Clojure tools).I would love to share validation for both of these entrypoints, but I don't think that is a goal of babashka/cli. Perhaps babahka/bbin is a command-line-friendly alternative to Clojure tools.
So maybe
-X
style invocations more command-line friendly, but it certainly can make command-line friendly-M
style invocations that can delegate to-X
targets.Next Steps
There is always a good chance that I've misunderstood - maybe some or all of the above is not correct. Lemme know.
If you are interested, I can draft up doc changes in a PR for your review.