Fork me on GitHub
#cider
<
2021-08-01
>
diego.videco15:08:48

I've got a dependency issue between shadow-cljs , cider and deps.edn. I have a project that depends on another local project, but one new dependency in my local-lib is not being recognized when I run the project using cider.

local-lib/
  deps.edn
  src/
    ...

my-project/
  deps.edn
  shadow-cljs.edn
  src/
    ...
The thing is that recently I added a new dependency to local-lib and I am not being able to build the project using cider-jack-in-cljs , as I am getting this error: The required namespace "com.gfredericks.exact" is not available, it was required by "erv/cps/core.cljc". Now, this is not the first dependency that I add to my local-lib , but it's the first time this happens to me. If I run the project on the command line npm run watch:browser , then it compiles correctly and I am able to use this new dependency, but I can't seem to be able to do it with cider. I am not sure if this is a shadow-clj problem or a cider one, but any help could be greatly appreciated.

diego.videco15:08:51

My deps.edn files look like this:

;; erv a.k.a local-lib
{:deps {org.clojure/clojure {:mvn/version "1.10.0"}
        org.clojure/math.combinatorics {:mvn/version "0.1.6"}
        time-time {:local/root "../time-time"}
        overtone {:mvn/version"0.10.6"}
        com.taoensso/timbre {:mvn/version"4.10.0"}
        com.gfredericks/exact {:mvn/version"0.1.11"}}}
;; my-project
{:paths ["src"]
 :deps {thheller/shadow-cljs {:mvn/version "2.11.4"}
        reagent {:mvn/version "1.0.0-alpha2"}
        erv {:local/root "/home/diego/sc/overtone/erv"}}}

diego.videco15:08:04

Oh, just tried changing the "unnamespaced" dependencies to namespaced and it seems to have finally worked. I.e. I changed time-time to time-time/time-time and so on... I know the unnamespaced version is deprecated... but does anyone understand what was happening, and why might it have stopped working when I added a new dependency?

dpsutton15:08:38

you made it into an invalid deps.edn file and i suspect it used a cached version that lacked the new dependency