plumatic/om-tools

sm is not defined in plumbing.fnk.schema

afhammad opened this issue · 4 comments

Just started getting this javascript error (cljs compiles fine): "Uncaught ReferenceError: sm is not defined"

It is pointing to this line in plumbing.fnk.schema: (def Schema (sm/protocol s/Schema))

w01fe commented

It sounds like you're using incompatible versions of plumbing and schema.

Specifically, plumbing < 0.4.0 is not compatible with schema >= 0.4.0. Can you try depending on a version of plumbing >= 0.4.0 and see if that fixes the problem?

It turns out a lib i depend on is depending on an older version of om-tools, so i forked it and bumped it up but after lein clean and rebuilding both projects I still get the error. This is what lein deps :tree gives me:

[prismatic/om-tools "0.3.11"]
[prismatic/plumbing "0.4.2"]
[de.kotka/lazymap "3.1.0" :exclusions [[org.clojure/clojure]]]
[prismatic/schema "0.4.0"]

let me now if i can provide more info or try something else.

w01fe commented

Huh, strange. Still seeing an error on that same line? That was changed back in plumbing 0.3.5:

plumatic/plumbing@612016a#diff-fc252875ffc7089c27735982bc49e4d4

my bad, the local lib wasnt overriding the remote one, leiningen isn't clear about that! Thanks