I’m having a problem with a library dependency that does not seem to want to update, and I can’t figure out what is going on.
I’m using clojure.core.memoize, and recently upgraded to 0.7.1. There was a specific bug that was fixed in 0.7.0, so I assumed the bug would be fix with the upgrade. However, the bug is still there.
The weird thing is that the code loaded into the repl seems to be different than the code on disk. For example, if I do (meta #'clojure.core.memoize/fifo)
, I get :line 242
.
But, when I go to definition in cider, the fifo
function seems to be on line 292.
This is really weird, because when I look at the history of the memoize library, I can see that the fifo
function used to be on line 242, back in version 0.5.9:
What I am assuming this means is that the wrong version of clojure.core.memoize is loaded into memory from somewhere, but I can’t figure out where. I’ve tried deleting my ~/.m2
folder but that didn’t help.
When I run clj -Spath | sed -e 's/:/\'$'\n/g' | grep memoize
, all I get is the reference to version 0.7.1:
/home/matthys/.m2/repository/org/clojure/core.memoize/0.7.1/core.memoize-0.7.1.jar$
Same with clj -Stree -Sverbose | grep memoize
:
org.clojure/core.memoize 0.7.1
When I deleted the ~/.m2
dir, and re-ran the clj
tool, it only showed the 0.7.1 version of memoize being installed:
Downloading: org/clojure/core.memoize/0.7.1/core.memoize-0.7.1.pom from https://repo1.maven.org/maven2/
And, running (require '[clojure.java.classpath :as cp]) (cp/classpath)
shows:
#object[java.io.File "0x2f910320" "/home/matthys/.m2/repository/org/clojure/core.memoize/0.7.1/core.memoize-0.7.1.jar"]