fulcrologic / fulcro

A library for development of single-page full-stack web applications in clj/cljs
http://fulcro.fulcrologic.com
MIT License
1.54k stars 137 forks source link

Dependency issue with taoensso.encore/dissoc-in #541

Closed kreutter closed 1 year ago

kreutter commented 1 year ago

When building a minimal project I get the following error:

$ npx shadow-cljs compile main
[...]
------ WARNING #2 - :fn-arity --------------------------------------------------
 Resource: com/fulcrologic/fulcro/algorithms/data_targeting.cljc:163:8
--------------------------------------------------------------------------------
 160 |        (and remove-source?
 161 |            (not (eql/ident? source-path))
 162 |            (vector? source-path))
 163 |        (enc/dissoc-in source-path)))))
--------------^-----------------------------------------------------------------
 Wrong number of args (2) passed to taoensso.encore/dissoc-in
--------------------------------------------------------------------------------

This seems to be related to loading an older version of the com.taoensso/encore library where the function signature as used in data_targeting.cljc does not yet exist. In fulcro's deps.edn file com.taoensso/encore {:mvn/version "3.45.0"} is declared but for some reason not used. My test projects des.edn file:

{:paths   ["src/main" "resources"]

 :deps    {org.clojure/clojure    {:mvn/version "1.11.1" :scope "provided"}
           com.fulcrologic/fulcro {:mvn/version "3.6.4"}}

 :aliases {:dev {:extra-paths ["src/dev"]
                 :extra-deps  {org.clojure/clojurescript {:mvn/version "1.11.54" :scope "provided"}
                               thheller/shadow-cljs      {:mvn/version "2.23.8"}
                               binaryage/devtools        {:mvn/version "1.0.6"}}}}
 }

Checking dependencies reveals:

 $ clj -X:deps tree | grep encore
  X com.taoensso/encore 2.120.0 :superseded
    . com.taoensso/encore 3.12.1 :newer-version
      . com.taoensso/encore 3.12.1
    X com.taoensso/encore 2.91.0 :parent-omitted

I would expect to see com.taoensso/encore:3.45.0 here, because it is a direct dependency of com.fulcrologic:fulcro:3.6.4?

I'm new to fulcro and by no means a Clojure expert, so I hope this is not an obvious thing that I just don't understand.

It seems that pom.xml is the problem, since it references version com.taoensso/encore:2.120.0.

When adding com.taoensso/encore {:mvn/version "3.45.0"} to my deps, the compiler warning disappears.

awkay commented 1 year ago

Thanks. I'll look into updating the version in a future release.

awkay commented 1 year ago

pom fixed