Closed GaspardP closed 3 years ago
Small change that allows the use of Cider's debug capabilities on with-retry, with-circuit-breaker and with-timeout blocks. With the current implementation it fails with a java.lang.RuntimeException: No such var: diehard.core/_.
with-retry
with-circuit-breaker
with-timeout
java.lang.RuntimeException: No such var: diehard.core/_
The problem can be seen when using macroexpand
macroexpand
(let* [opts__15793__auto__ {:timeout-ms 10} policy__15794__auto__ (diehard.timeout/timeout-policy-from-config-map opts__15793__auto__) async?__15795__auto__ (:async? opts__15793__auto__) policies__15796__auto__ (clojure.core/vector policy__15794__auto__) failsafe__15797__auto__ (net.jodah.failsafe.Failsafe/with policies__15796__auto__)] (.get failsafe__15797__auto__ (clojure.core/reify net.jodah.failsafe.function.CheckedSupplier (clojure.core/get [diehard.core/_] ; <= Should be something like `___15826__auto__` instead (throw (clojure.core/ex-info "" {}))))))
Can be tested in Cider by evaluating the following snippet
(with-timeout {:timeout-ms 10} #dbg (throw (ex-info "error" {})))
Good catch! Thanks!
Thank you for the quick review and for creating diehard.
Small change that allows the use of Cider's debug capabilities on
with-retry
,with-circuit-breaker
andwith-timeout
blocks. With the current implementation it fails with ajava.lang.RuntimeException: No such var: diehard.core/_
.The problem can be seen when using
macroexpand
Can be tested in Cider by evaluating the following snippet