cursive

Issues at: https://git.io/cursive-issues
Joel 2020-10-27T05:07:40.162900Z

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.

cfleming 2020-10-27T07:38:01.163100Z

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?

cfleming 2020-10-27T07:39:02.163300Z

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 | <your module> | Dependencies

Joel 2020-10-27T17:35:54.163500Z

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.

Joel 2020-10-27T19:27:18.165400Z

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

2020-10-27T17:50:03.165300Z

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.

2020-10-28T18:13:19.165800Z

(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

cfleming 2020-10-27T22:21:34.165600Z

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.