I am a small-time but appreciative user of Cursive and am working on a Clojure project now for the first time in a long time. I set up IntelliJ and Cursive from scratch on a new machine, am having trouble with dependencies, and would love a pointer or two.
My project is a Leiningen one. When I add a dependency (e.g. ["hiccup", 1.0.5]), Cursive notices this and offers to download the new package. Great. But when I put [hiccup.core :as h] in the namespace in my code and reload the file in the REPL, I get an error, saying that hiccup__core isn't in the classpath, or something very close to that.
When I restart IntelliJ, all is good. I just can't seem to use a newly-chosen dependency without restarting, and I figure there must be a way.
I currently have two clojure files in my project, let's call them main.clj and util.clj, where the first one requires the second in the namespace. When I start IntelliJ afresh, naturally I need to load these into my REPL. Logically, I should only have to load main.clj and it would pull in the contents of util.clj. But that's not what happens. I actually need to load util.clj myself and then load main.clj.
That's fine, I can do that, but a "real" Clojure project would not just have two files, so there must be something I've done wrong for this not to work automatically.
I'm pretty sure I've read all the info on the website, but I may have missed or misunderstood something. Also, my understanding of Leiningen and project structures in general is embarrassingly superficial.
Thanks a lot for any help,