taoensso / timbre

Pure Clojure/Script logging library
https://www.taoensso.com/timbre
Eclipse Public License 1.0
1.44k stars 171 forks source link

RuntimeException: No such var: encore/simple-date-format #58

Closed twashing closed 10 years ago

twashing commented 10 years ago

Using [com.taoensso/timbre "3.1.6"] (from clojars as of Fri Mar 14 22:48:34 PDT 2014), running (require '[taoensso.timbre :as timbre]) gives me the below error (expanded with pst).

CompilerException java.lang.RuntimeException: No such var: encore/simple-date-format, compiling:(taoensso/timbre.clj:278:27)
        clojure.lang.Compiler.analyze (Compiler.java:6380)
        clojure.lang.Compiler.analyze (Compiler.java:6322)
        clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3573)
        clojure.lang.Compiler.analyzeSeq (Compiler.java:6562)
        clojure.lang.Compiler.analyze (Compiler.java:6361)
        clojure.lang.Compiler.analyze (Compiler.java:6322)
        clojure.lang.Compiler$HostExpr$Parser.parse (Compiler.java:915)
        clojure.lang.Compiler.analyzeSeq (Compiler.java:6560)
        clojure.lang.Compiler.analyze (Compiler.java:6361)
        clojure.lang.Compiler.analyzeSeq (Compiler.java:6548)
        clojure.lang.Compiler.analyze (Compiler.java:6361)
        clojure.lang.Compiler.analyze (Compiler.java:6322)
Caused by:
RuntimeException No such var: encore/simple-date-format
        clojure.lang.Util.runtimeException (Util.java:219)
        clojure.lang.Compiler.resolveIn (Compiler.java:6848)
        clojure.lang.Compiler.resolve (Compiler.java:6818)
        clojure.lang.Compiler.analyzeSymbol (Compiler.java:6779)
        clojure.lang.Compiler.analyze (Compiler.java:6343)
        clojure.lang.Compiler.analyze (Compiler.java:6322)
nil
ptaoussanis commented 10 years ago

Hi Timothy,

This is probably a Lein dependency conflict, see: https://github.com/ptaoussanis/timbre/issues/53

But do let me know if that doesn't help! Cheers :-)

twashing commented 10 years ago

Right, ok. So having a project dependency on [com.taoensso/encore "0.9.6"] fixed the error. But timbre (at least github version) already has a dependency on [com.taoensso/encore "0.9.8"]. So it seems a bit tangled. But timbre's a great tool all the same.

Thanks

ptaoussanis commented 10 years ago

Hey Timothy,

This'd be caused due to a Leiningen dependency conflict (i.e. another dependency of yours is requesting an earlier version of encore). You can determine the culprit with lein :deps tree.

In any case, you can work around the trouble by brining in a project-level dependency as you've done (that'll override any lower-level dependencies).

tl;dr: dependency resolution is complicated - sometimes Leiningen cannot know what to do to resolve a conflict automatically.

Happy you've got it solved :-) Cheers!