taoensso / timbre

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

Outdated io.aviso.pretty throws exception under Clojure 1.11 #344

Closed NoahTheDuke closed 2 years ago

NoahTheDuke commented 2 years ago

Hi Peter!

I've updated my project to use Clojure 1.11-alpha3, which includes the new function update-keys. This clashes with the function update-keys in io.aviso.pretty and seems to cause the below error. It looks like the version of io.aviso.pretty that is used in Timbre is outdated (0.1.37 vs 1.1.1), and the latest version fixes the issue.

Any chance Timbre could update io.aviso.pretty to include the fix? I'd prefer to not rely on an older version of Clojure to continue using Sente (which is the actual library I use).

WARNING: update-keys already refers to: #'clojure.core/update-keys in namespace: io.aviso.exception, being replaced by: #'io.aviso.exception/update-keys
Exception in thread "async-dispatch-2" java.lang.IllegalStateException: Attempting to call unbound fn: #'io.aviso.exception/update-keys
    at clojure.lang.Var$Unbound.throwArity(Var.java:45)
    at clojure.lang.AFn.invoke(AFn.java:36)
    at io.aviso.exception$write_exception_STAR_$write_exception_stack__66578.invoke(exception.clj:542)
    at io.aviso.exception$write_exception_STAR_.invokeStatic(exception.clj:563)
    at io.aviso.exception$write_exception_STAR_.invoke(exception.clj:520)
    at io.aviso.exception$write_exception.invokeStatic(exception.clj:630)
    at io.aviso.exception$write_exception.invoke(exception.clj:565)
    at io.aviso.exception$format_exception.invokeStatic(exception.clj:637)
    at io.aviso.exception$format_exception.invoke(exception.clj:632)
    at io.aviso.exception$format_exception.invokeStatic(exception.clj:635)
    at io.aviso.exception$format_exception.invoke(exception.clj:632)
    at taoensso.timbre$stacktrace.invokeStatic(timbre.cljc:912)
    at taoensso.timbre$stacktrace.invoke(timbre.cljc:896)
    at taoensso.timbre$default_output_fn.invokeStatic(timbre.cljc:53)
    at taoensso.timbre$default_output_fn.invoke(timbre.cljc:37)
    at taoensso.timbre$default_output_fn.invokeStatic(timbre.cljc:40)
    at taoensso.timbre$default_output_fn.invoke(timbre.cljc:37)
    at taoensso.encore$fmemoize$fn__65577$fn__65580.invoke(encore.cljc:2086)
    at clojure.lang.Delay.deref(Delay.java:42)
    at clojure.core$deref.invokeStatic(core.clj:2325)
    at clojure.core$deref.invoke(core.clj:2311)
    at taoensso.encore$fmemoize$fn__65577.invoke(encore.cljc:2074)
    at taoensso.timbre$_log_BANG_$fn__66813$fn__66815.invoke(timbre.cljc:640)
    at clojure.lang.Delay.deref(Delay.java:42)
    at clojure.lang.Delay.force(Delay.java:28)
    at clojure.core$force.invokeStatic(core.clj:767)
    at clojure.core$force.invoke(core.clj:763)
    at taoensso.timbre.appenders.core$println_appender$fn__66635.invoke(core.cljc:68)
    at taoensso.timbre$_log_BANG_$fn__66813.invoke(timbre.cljc:668)
    at clojure.lang.PersistentArrayMap.kvreduce(PersistentArrayMap.java:429)
    at clojure.core$fn__8474.invokeStatic(core.clj:6897)
    at clojure.core$fn__8474.invoke(core.clj:6877)
    at clojure.core.protocols$fn__8206$G__8201__8215.invoke(protocols.clj:175)
    at clojure.core$reduce_kv.invokeStatic(core.clj:6908)
    at clojure.core$reduce_kv.invoke(core.clj:6899)
    at taoensso.timbre$_log_BANG_.invokeStatic(timbre.cljc:612)
    at taoensso.timbre$_log_BANG_.invoke(timbre.cljc:526)
    at taoensso.sente$_start_chsk_router_BANG_$fn__70170$state_machine__62013__auto____70191$fn__70193$inst_70161__70211$fn__70218.invoke(sente.cljc:1764)
    at taoensso.sente$_start_chsk_router_BANG_$fn__70170$state_machine__62013__auto____70191$fn__70193$inst_70161__70211.invoke(sente.cljc:1760)
    at taoensso.sente$_start_chsk_router_BANG_$fn__70088.invoke(sente.cljc:1741)
    at taoensso.sente$_start_chsk_router_BANG_$fn__70170$state_machine__62013__auto____70191$fn__70193.invoke(sente.cljc:1743)
    at taoensso.sente$_start_chsk_router_BANG_$fn__70170$state_machine__62013__auto____70191.invoke(sente.cljc:1743)
    at clojure.core.async.impl.ioc_macros$run_state_machine.invokeStatic(ioc_macros.clj:978)
    at clojure.core.async.impl.ioc_macros$run_state_machine.invoke(ioc_macros.clj:977)
    at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:982)
    at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:980)
    at clojure.core.async$ioc_alts_BANG_$fn__62242.invoke(async.clj:421)
    at clojure.core.async$do_alts$fn__62181$fn__62184.invoke(async.clj:288)
    at clojure.core.async.impl.channels.ManyToManyChannel$fn__60306$fn__60307.invoke(channels.clj:99)
    at clojure.lang.AFn.run(AFn.java:22)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at clojure.core.async.impl.concurrent$counted_thread_factory$reify__60209$fn__60210.invoke(concurrent.clj:29)
    at clojure.lang.AFn.run(AFn.java:22)
    at java.base/java.lang.Thread.run(Thread.java:831)
ptaoussanis commented 2 years ago

Hi Noah! Thanks for bringing this to my attention. I always update all dependencies whenever cutting a new release, but in the meantime you don't need to wait on a new Timbre (or Sente) release - you can instead just add your own io.aviso.pretty dependency before Timbre.

Hope that helps! Cheers :-)

NoahTheDuke commented 2 years ago

Oh that's a great idea. Thanks so much.

ptaoussanis commented 2 years ago

Will be addressed in forthcoming release, thanks Noah!