Fork me on GitHub

The REPL isn't loading java classes from my maven project (multi-module). It gives an error when loading the java class as part of the import statement. The class is found in a dependency (as listed in the pom) I am using nREPL with the radio button "use intellij class path"... Is there something more I need to do? I tried using a deps.edn, but couldn't figure out how to refer to the maven subproject.


Yes, IntelliJ classpath is what you want to use. A few things - is the module which you’re using for your run config one which has access to the class dependency?


If so, it’s worth checking that the dependency has actually been added correctly to the module you think it has - check that at File | Project Structure | Modules | &lt;your module&gt; | Dependencies


interestingly the only dependencies listed there were clojure ones (eg. instaparse), i presume those are coming from the pom. I added the other module and that succeeded in the clj import highlighting properly, not grayed out now. However, even after restart of repl/intellij still doesn't understand import when trying to load file to repl. (?) Thanks for help so far, this is pretty important to using clojure/cursive at work.


i reimported my maven project, and redid the REPL... yay, seems to work now!


Hey @cfleming, small QOL fix that would be great: When generating a test for CLJS instead of :refering all can you just alias test or :refer a known set of useful vars? :refer :all isn’t valid in CLJS land.


Oops, my mistake, I’ll fix that. In the meantime you can edit the template yourself: Settings | Editor | File and Code Templates | CLJS Test NS. I’d be interested to know what you come up with.


(ns $NS_NAME
  (:require [cljs.test :refer [async deftest is testing use-fixtures]] 
            #if($TEST_SUBJECT_NS != "")[$TEST_SUBJECT_NS :as sut])#else)#end)
is what I will be using for the moment, not sure what the standard is for cljs.test :requires s