This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-12
Channels
- # beginners (36)
- # boot (11)
- # cider (10)
- # cljs-dev (10)
- # cljsrn (3)
- # clojure (103)
- # clojure-greece (1)
- # clojure-italy (16)
- # clojure-nl (3)
- # clojure-spec (59)
- # clojure-uk (129)
- # clojurescript (125)
- # data-science (29)
- # datomic (30)
- # emacs (12)
- # events (5)
- # fulcro (61)
- # graphql (5)
- # keechma (3)
- # leiningen (9)
- # luminus (7)
- # onyx (26)
- # re-frame (3)
- # reagent (56)
- # reitit (25)
- # ring-swagger (16)
- # shadow-cljs (44)
- # spacemacs (4)
- # specter (2)
- # tools-deps (7)
- # vim (8)
I have an exciting thing happening with a plugin
I've wittled it down to a pretty basic setup where there's a plugin ns with a hooks function that adds an empty-function-hook to an empty task in another ns
i.e., there's no functionality here, other than adding an empty hook to an empty task that never gets run
the symptom is that lein check
works fine but lein with-profiles -dev check
throws an NPE
note there is no dev profile, so it should be a NOOP; adding an empty dev profile doesn't change anything
also lein with-profiles -somethingelse check
also fails
seems like the hooks metadata got removed from some var (presumably the task being hooked, which never gets called?); very strange
any ideas?
@gfredericks I don’t have any great insight there. The only thought that sprung to mind was that lein check
does a clojure.core/load
on namespaces given for the “classpath” in question. That is a forceful reload of namespaces that could perhaps wipe out something like var metadata. However, I don’t see any reason that’d cause the problem you see (I don’t get how the metadata would be removed from the relevant vars in this situation).
One way to troubleshot it may be to run it against your own modified leiningen
or robert.hooke
, where you add a print for the var that is being deref’ed for metadata prior to the NPE. May help.
👍 I'll poke around
the NPE is happening in a finally, so I guess it could be masking a real exception
what's the easiest way to experiment with the installed leiningen? e.g., how could I get a user.clj
onto lein's classpath so I could do some monkeypatching?
@gfredericks I’d typically just checkout the leiningen
from github, use the tag for whatever release version you are interested in (if it matters).