-
Notifications
You must be signed in to change notification settings - Fork 205
Clojure.future from clojure-future-spec interferes with using onyx with clojure 1.9. #782
Comments
The only issue at point are warnings from |
This one's tough because we're intercepting the presence of a dependency. (clojure.future). I think I'd prefer to conditionally define those functions ourselves ( |
Yeah. I agree. I think this could be done in clojure-future-spec itself. I'll see if they're open to it over there. Oh wait. There's an easier way. Just do conditional defs instead of putting the :refer clause in. That should work fine. I see what you mean. |
Yup, this works: #?(:clj
(when (not (resolve 'any?))
(def any? clojure.future/any?)))
#?(:clj
(when (not (resolve 'boolean?))
(def boolean? clojure.future/boolean?)))
#?(:clj
(when (not (resolve 'uuid?))
(def uuid? clojure.future/uuid?)))
#?(:clj
(when (not (resolve 'pos-int?))
(def pos-int? clojure.future/pos-int?))) |
Cool, yeah I'd like to see if clojure.future would be open to adding a patch similar to this first. If not, it's worth it to put it in Onyx. I don't think this problem is going away until Clojure officially moves to 1.9. We'll immediately make the upgrade in Onyx when that does happen. |
Ok. Try |
@tonsky Thanks! I'll give this a shot -- this should help a lot of the 1.9 transition in other projects too. :) |
Fixed, thanks @tonsky! This will go out in the next release. It's out on |
@MichaelDrogalis I figured out a fix. spec.alpha doesn't really seem to help just made me have to update all the namespaces for no apparent reason. I did figure out a fix though. There are two possibilities: You can use a more complicated require like this
I've tested it in both clojure 1.8 and 1.9 and it works.
The other option would be to
(:use [clojure.future])
and patchclojure-future-spec
so it only overwrites those functions if they don't already exist (either by checking the version or for their existence).The text was updated successfully, but these errors were encountered: