Fork me on GitHub
#cider
<
2023-12-01
>
Ben Wiz20:12:37

I cannot get enrich-classpath https://docs.cider.mx/cider/config/basic_config.html#use-enrich-classpath to work with deps.edn project. The issue I'm facing is I'm unable to go to definition on java functions and classes. It works with lein projects. Here is a minimal deps.edn file I created with clj-new

{:paths ["src" "resources"]
 :deps {org.clojure/clojure {:mvn/version "1.11.1"}}
 :aliases
 {:run-m {:main-opts ["-m" "com.benwiz.temptest"]}
  :run-x {:ns-default com.benwiz.temptest
          :exec-fn greet
          :exec-args {:name "Clojure"}}
  :build {:deps {io.github.seancorfield/build-clj
                 {:git/tag "v0.8.2" :git/sha "0ffdb4c"
                  ;; since we're building an app uberjar, we do not
                  ;; need deps-deploy for clojars.org deployment:
                  :deps/root "slim"}}
          :ns-default build}
  :test {:extra-paths ["test"]
         :extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}
                      io.github.cognitect-labs/test-runner
                      {:git/tag "v0.5.0" :git/sha "48c3c67"}}}}}
executed with cider-jack-in-clj
/usr/local/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.30.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
entrich-classpath works with the following minimal project.clj file generated with lein new
(defproject xreftest "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url ""
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url ""}
  :dependencies [[org.clojure/clojure "1.11.1"]]
  :main ^:skip-aot xreftest.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all
                       :jvm-opts ["-Dclojure.compiler.direct-linking=true"]}})
executed with cider-jack-in-clj
$HOME/bin/lein update-in :dependencies conj \[nrepl/nrepl\ \"1.0.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.30.0\"\] -- update-in :plugins conj \[mx.cider/enrich-classpath\ \"1.9.0\"\] -- update-in :middleware conj cider.enrich-classpath/middleware -- repl :headless :host localhost
Any idea what I'm missing?

👀 1
vemv20:12:28

You're on pretty old cider-nrepl and enrich versions 😬

vemv20:12:07

Update CIDER (.el) and you should be good