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
deftask macro: missing arguments #487
Comments
@pesterhazy Why do you say the line numbers don't correspond to the correct lines in build.boot? Are you using For example: $ boot -v mytask
cli: expected short option, got println
cli: expected long option, got nil
cli: option nil: expected optarg, got "foo"
clojure.lang.ExceptionInfo: Wrong number of args (1) passed to: cli/argspec->cli-argspec
data: {:file
"/var/folders/rj/8lnf662s3mlgzv5mcq2r2fnc0000gn/T/boot.user7782529942334603268.clj",
:line 23}
clojure.lang.ArityException: Wrong number of args (1) passed to: cli/argspec->cli-argspec
...
boot.main/-main/fn main.clj: 196
boot.main/-main main.clj: 196
...
boot.App.runBoot App.java: 399
boot.App.main App.java: 488
...
boot.Loader.main Loader.java: 253 $ boot -vb mytask |cat -n
1 (ns boot.user
2 (:use boot.core boot.util boot.task.built-in))
3
4 ;; start boot script
... |
The |
That was ⚡ fast! I didn't know about the |
When
deftask
is called without a an argument vector inbuild.boot
, the following exception is thrown:An example:
A better user experience would be an exception with the message "Parameter declaration "println" should be a vector." (which is what
defn
throws). I think clojure.spec could help though I'm not sure boot can rely on clojure 1.9 anytime soon.Another problem is that the line numbers displayed in the exception do not correspond to the faulty lines in
build.boot
, so you need to guess which definition contains the syntax error.The text was updated successfully, but these errors were encountered: