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

Assumptive call to name in validate_builds #39

Open
seprich opened this issue Oct 12, 2015 · 2 comments
Open

Assumptive call to name in validate_builds #39

seprich opened this issue Oct 12, 2015 · 2 comments
Labels

Comments

@seprich
Copy link

seprich commented Oct 12, 2015

lein-garden version "0.2.6" crashes with:

$ lein garden auto
java.lang.NullPointerException: null
 at clojure.core$name.invoke (core.clj:1524)
    leiningen.garden$validate_builds.invoke (garden.clj:32)
    leiningen.garden$garden.doInvoke (garden.clj:139)
    clojure.lang.RestFn.invoke (RestFn.java:423)
    clojure.lang.Var.invoke (Var.java:383)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invoke (core.clj:632)
    leiningen.core.main$partial_task$fn__6030.doInvoke (main.clj:261)
    clojure.lang.RestFn.applyTo (RestFn.java:139)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invoke (core.clj:632)
    leiningen.core.main$apply_task.invoke (main.clj:311)
    leiningen.core.main$resolve_and_apply.invoke (main.clj:317)
    leiningen.core.main$_main$fn__6096.invoke (main.clj:390)
    leiningen.core.main$_main.doInvoke (main.clj:383)
    clojure.lang.RestFn.invoke (RestFn.java:421)
    clojure.lang.Var.invoke (Var.java:383)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invoke (core.clj:630)
    clojure.main$main_opt.invoke (main.clj:316)
    clojure.main$main.doInvoke (main.clj:421)
    clojure.lang.RestFn.invoke (RestFn.java:457)
    clojure.lang.Var.invoke (Var.java:394)
    clojure.lang.AFn.applyToHelper (AFn.java:165)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)

Leiningen:

$ lein --version
Leiningen 2.5.3 on Java 1.8.0_45-internal OpenJDK 64-Bit Server VM

And clojure in project dependencies is version "1.7.0"

@seprich
Copy link
Author

seprich commented Oct 12, 2015

Ok looking at those source lines and re-reading my project.clj it turned out to be user error: the content in my :builds section was just [...] instead of the required [{...}] . Perhaps more thorough validation for clearer error messages would be a good idea.

@noprompt
Copy link
Owner

noprompt commented Nov 3, 2015

@seprich Yeah, it looks like leiningen.garden/validate_builds has a call to clojure.core/name that's a little too assumptive. A patch is most certainly welcome.

@noprompt noprompt changed the title Nasty crash with "lein garden auto" Assumptive call to name in validate_builds Nov 3, 2015
@noprompt noprompt added the bug label Nov 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants