mattexx
mattexx

Reputation: 6606

Prismatic Schema on Clojure 1.4?

We are evaluating Prismatic/schema for use on a project that is currently using Clojure 1.4. We would prefer not to upgrade Clojure in our project at this time. Schema requires Clojure 1.5.1, but some basic testing in the repl did not show any problems with the Clojure version changed to 1.4.

Has anyone else tried using schema on Clojure 1.4, and how has it gone?

Here's what I tried (after changing Clojure to 1.4.0 in project.clj):

(require '[schema.core :as s])
(require '[schema.macros :as sm])

(sm/defn foo ...)

(s/with-fn-validation (foo ...))

No problems. The one thing I noticed was that the schema tests completely puke (won't even run) on Clojure 1.4. This I don't really care about, but I would care if there were actual problems with project functionality.

Upvotes: 2

Views: 217

Answers (1)

Jason Wolfe
Jason Wolfe

Reputation: 341

As far as I know, Schema should work fine with 1.4. The tests were failing because they use a marker protocol (with no methods), and 1.4 doesn't like that -- but Schema itself doesn't rely on this feature. I verified that after adding a dummy method to ATestProtocol, all of the Schema tests currently pass under Clojure 1.4.0.

I don't want to promise future support for 1.4, but if you spot any issues or bugs please let us know and we'll see what we can do. As Jared pointed out above, the Google Group is probably a more appropriate place for questions like this.

Upvotes: 4

Related Questions