Fork me on GitHub

Is there any way in cursive/idea to find all the unused function definitions in the project?

Lennart Buit09:10:03

Would Analyze > Inspect code help you?


It only seems to find unused local symbols, which don't seem to contain unused functions.

AJ Jaro12:10:55

In the most recent version of Cursive, cmd-clicking a re-frame namespaced keyword does not show usages anymore. A user needs to right-click and Find Usages in order to show where that keyword is used. :sad-panda:


Do you mean the most recent EAP? Is this problem new in that version?

AJ Jaro01:10:03

This is happening here: 1.9.4-2020.2 @U0567Q30W


Thanks, I’ll take a look.

AJ Jaro01:10:22

Let me know if there’s anything I can do to help with this


It looks like this has been broken again in 2020.2 due to platform changes.

AJ Jaro10:10:29

Thanks for checking it out @U0567Q30W. I think there might be a similar problem with finding CLJC usages that are in CLJS namespaces but I haven't nailed the scenario down yet. I'll let you know when I figure it out in more detail


That’s possible, yeah - unfortunately the CLJC support needs a total re-vamp, the current impl is not very robust and violates some IntelliJ invariants.

Michael W19:10:36

Why does IDEA tell me it cannot resolve when the code works?

(ns com.repsrv.lib.csv
       [ :as io])
    [ :as csv]))

   (defn take-csv
     "input path to file, output csv as coll of coll"
     (with-open [file (io/reader filename)]
       (-> (slurp file)
IDEA says csv/read-csv can't be resolved. Am I missing something?

Michael W19:10:43

This was a problem with clojure deps, I had to update src paths and refresh on clojure deps tab for it to resolve correctly again.