sunng87 / diehard

Clojure resilience library for flexible retry, circuit breaker and rate limiter
Eclipse Public License 2.0
330 stars 27 forks source link

Get rid of reflection warnings #34

Closed borkdude closed 4 years ago

borkdude commented 4 years ago

When using diehard in a namespace where you have (set! *warn-on-reflection* true) an invocation of with-retry will give warnings:

$ clojure -Sdeps '{:deps {diehard {:mvn/version "0.9.0"}}}'
Clojure 1.10.1
user=> (require '[diehard.core :as dh])
nil
user=> (set! *warn-on-reflection* true)
true
user=> (dh/with-retry {:max-retries 2} 1)
Reflection warning, NO_SOURCE_PATH:1:1 - call to static method with on net.jodah.failsafe.Failsafe can't be resolved (argument types: unknown).
Reflection warning, NO_SOURCE_PATH:1:1 - call to method onComplete can't be resolved (target class is unknown).
1

It would be nice if they could be resolved.

sunng87 commented 4 years ago

Thanks for reporting. This should have been fixed in 0.9.1 release.