taoensso / carmine

Redis client + message queue for Clojure
https://www.taoensso.com/carmine
Eclipse Public License 1.0
1.15k stars 130 forks source link

error compiling carmine.clj #190

Closed mprokopov closed 7 years ago

mprokopov commented 7 years ago

There is include error with when I try include dependency carmine 2.15.1

nREPL server started on port 53959 on host 127.0.0.1 - nrepl://127.0.0.1:53959 REPL-y 0.3.7, nREPL 0.2.12 Clojure 1.8.0 Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b14 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) Results: Stored in vars 1, 2, 3, an exception in e

user=> (ns my-app

_=> (:require [taoensso.carmine :as car :refer (wcar)]))

CompilerException java.lang.IllegalArgumentException: No matching method: sha1Hex, compiling:(taoensso/carmine.clj:149:29)

mprokopov commented 7 years ago

fixed with moving dependency up

yayitswei commented 7 years ago

I'm also running into this problem. Can you clarify what you mean by moving dependency up?

yayitswei commented 7 years ago

I solved it by including

[commons-codec/commons-codec "1.10"]

in my dependencies.

ptaoussanis commented 7 years ago

Hi @yayitswei, @mprokopov, please see here for details on how to identify and resolve dependency conflicts in general. In your case you'll just want to look for commons-codec instead of encore.

Unfortunately this hassle is sometimes necessary since there's no inherently fool-proof way of resolving transitive dependency conflicts.

Say you're using the following two libraries:

  1. Library A (which also uses library C version 1.1.0).
  2. Library B (which also uses library C version 1.2.0).

There's a dependency conflict on library C; you're indirectly asking for two different versions. In many/most cases what you want is to resolve the conflict by manually instructing your dependency manager (Leiningen for example) to use the later version of library C.

That's not always the correct choice though, so it's not a decision that Leiningen and co. can make for you automatically.

That's why you need to check for and resolve conflicts yourself.

Hope that helps!