clj-commons/claypoole

claypoole future doesn't work with clojure.spec

jsyrjala opened this issue · 3 comments

This code gives errors with clojure.spec.

(require '[com.climate.claypoole :as cp])
(cp/future (cp/threadpool 1) identity)
CompilerException clojure.lang.ExceptionInfo: Call to clojure.core/fn did not conform to spec:
In: [0] val: com.climate.claypoole/future-body fails spec: :clojure.core.specs/arg-list at: [:args :bs :arity-1 :args] predicate: vector?
In: [0] val: com.climate.claypoole/future-body fails spec: :clojure.core.specs/args+body at: [:args :bs :arity-n] predicate: (cat :args :clojure.core.specs/arg-list :prepost (? map?) :body (* any?))
:clojure.spec/args  (com.climate.claypoole/future-body [] identity)
 #:clojure.spec{:problems ({:path [:args :bs :arity-1 :args], :pred vector?, :val com.climate.claypoole/future-body, :via [:clojure.core.specs/args+body :clojure.core.specs/arg-list :clojure.core.specs/arg-list], :in [0]} {:path [:args :bs :arity-n], :pred (cat :args :clojure.core.specs/arg-list :prepost (? map?) :body (* any?)), :val com.climate.claypoole/future-body, :via [:clojure.core.specs/args+body :clojure.core.specs/args+body], :in [0]}), :args (com.climate.claypoole/future-body [] identity)}, compiling:(/xxx/user.clj:150:2) 

My dependencies

[org.clojure/clojure "1.9.0-alpha14"]
[com.climate/claypoole "1.1.3"]

Seems that this was already fixed in #35

Would it be possible to have a new release with this fix?

Oh, thank you. I've released 1.1.4. Does that work for you?

Thanks, it works now with 1.1.4.