Turning off validation during lein run

9 views
Skip to first unread message

Sven Richter

unread,
Apr 3, 2016, 12:42:33 PM4/3/16
to Plumbing and Graph: the Clojure utility belt
Hi,

I have a library (crud) which exposes schema definitions with its API and a second application (app) that consumes my library.
Now I call that library from command line via lein run -m:

lein run -m foo.bar.crud/excute

Now, everytime I do that the schema is validated which I do not want in that case. It is enough to have the schema validated during tests for now. Did someone experience something similar? Or should it be turned off by default?

I tried to set 
(s/set-fn-validation! false)
in the main namespace: foo.bar.crud and also into to execute function. But it still validates.

In my application itself I have never turned validation on explicitly.

Thanks in Advance,
Sven

Sven Richter

unread,
Apr 3, 2016, 1:19:46 PM4/3/16
to Plumbing and Graph: the Clojure utility belt
Ok, the problem was a different one than I assumed. It was a compile time problem throwing an exception in my lib.
Turns out I referenced two different versions of schema (1.0.3 in the app and 1.0.5 in the library) which caused the exception.

Thanks,
Sven
Reply all
Reply to author
Forward
0 new messages