Fork me on GitHub
#clara
<
2020-04-01
>
narkisr11:04:54

Hey Clara team I'm trying to require clara and I'm getting an error

namespace 'clara.rules.schema' not found
Any idea what I'm missing? (I am able to require 'http://calra.ru

narkisr11:04:36

Ok seems like I had a conflicting [prismatic/schema "1.1.6"] version in my classpath all good 🙂

ethanc14:04:41

I wonder if it would make sense to rip that dependency out of clara. I know it adds a bit of clarity to the underlying structure of the Sessions and whatnot, but it is another dependency we are forcing on consumers. @mikerod do you have any thoughts here?

mikerod14:04:22

@ethanc replace with spec or just nothing?

mikerod14:04:38

We maybe could get the schema ns usage to be optional (and use it in tests too)

ethanc14:04:18

Spec would probably be the ideal, but i’m not sure what all is going to have to change to uplift clojure/clojurescript versios

mikerod14:04:16

spec could probably be added without much difficulty on the versioning front, but actually making the spec would be more time consuming

mikerod14:04:30

Perhaps we can just get the schema to be an option dependency we only check/bring in during the :dev profile?

ethanc14:04:41

I’m not completely sure how we could do that.

mikerod15:04:45

probably would have to shim some schema fn’s/macros

mikerod15:04:54

and have them at compile time decide if the dep is there or not - if not fall back

mikerod15:04:14

probably isn’t easy if using harder macro features like schema’s defn or defrecord

ethanc15:04:00

which clara does, at least for the defrecord.

mikerod16:04:13

yeah, so it’s likely difficult 😛

ethanc17:04:51

I really wouldn’t want to be in the business of trying to parse schema’s forms and convert them back into clojure’s forms

mikerod17:04:07

No. I wouldn’t want that either