I have been using Clojure, ClojureScript, lein, shadow-cljs, re-frame, reagent, Emacs, and CIDER to work on a Clojure/ClojureScript dynamic web app project.
In my shadow-cljs.edn, I have:
{:source-paths ["src" "dev"]
:dependencies [[testdouble/clojurescript.csv "0.5.2-LOCAL-FORK"]
[testdouble/clojurescript.csv "0.5.1"]]
.
.
.
As you see, there is a duplicate of the same dependency being used two times.
How does shadow-cljs treat this?
Are both dependencies compiled? One over the other?
Just the latest one or the last one to be displayed on the file?
A library can only be added once, due to how the classpath works. In case of
:dependenciesinshadow-cljs.ednit'll pick the first one found.But really you shouldn't ever use two versions of the same lib. It may have unexpected results and should be avoided. In fact I'm a little surprised that doesn't already throw an error.