Fork me on GitHub
Lucy Wang10:02:07

The latest 2.17.1 throws me an error when I have a namespace aliased as foo and also refers to a foo symbol

  (:require [myapp.ns1 :as foo]
            [myapp.ns2 :refer [foo]]))

;; how i use them:
foo/var1 ;; resolves to myapp.ns1/var1
foo ;; resolves to myapp.ns2/foo
"Error: The alias foo is already used for namespace myapp.ns1" Reverting to 2.16.12 has no such issue.


oops, fixed in 2.17.2

Lucy Wang01:02:30

Thanks Thomas!


I need help figuring out how to configure dependencies when having three direct dependencies that all want different version of a transitive dependency. Specifically they all depend on different version of rewrite-clj. I naively thought this would just work, but it seems the three dependencies get to share the same version of rewrite-clj.


I can almost get it to work by reordering the dependencies. But one of them is extra tricky. It doesn't even need rewrite-clj, because I am only really using rewrite-cljs ... Trying this, but it doesn't work:

[pez/cljfmt "0.0.5-SNAPSHOT" :exclusions [rewrite-clj]]


Wait, I'm thinking about it in the wrong way, right? It is not so much the library name that clashes, it's the top namespace. Hmmm. Is a solution to let Leiningen handle deps and use mranderson?


easiest way is to just configure the rewrite-clj version you need in your dependencies


that'll always win, no need to mess with exclusions and such then


The dependencies need different rewrite-clj implementations...


I solved it by copying rewrite-cljs into my project and renaming the top-level ns. 😃


Doesn't sound like a solution I would like to resort to.


It’s a special situation. rewrite-cljs is a frozen/archived library.


But how can it happen that the versions are so incompatible that different dependencies conflict because of it? I don't understand.


It’s a long story.

❤️ 1