This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-31
Channels
- # architecture (5)
- # beginners (35)
- # boot (150)
- # cider (1)
- # clara (7)
- # cljs-dev (131)
- # cljsrn (10)
- # clojure (76)
- # clojure-austin (3)
- # clojure-berlin (1)
- # clojure-brasil (1)
- # clojure-chicago (2)
- # clojure-dusseldorf (1)
- # clojure-italy (30)
- # clojure-nl (2)
- # clojure-russia (40)
- # clojure-serbia (2)
- # clojure-spec (25)
- # clojure-uk (13)
- # clojured (2)
- # clojurescript (106)
- # core-async (29)
- # datascript (65)
- # datomic (38)
- # emacs (8)
- # funcool (8)
- # hoplon (6)
- # jobs (3)
- # klipse (93)
- # luminus (16)
- # lumo (4)
- # off-topic (2)
- # om (11)
- # onyx (13)
- # pedestal (4)
- # protorepl (3)
- # re-frame (40)
- # reagent (31)
- # ring (6)
- # ring-swagger (4)
- # slack-help (5)
- # spacemacs (13)
- # untangled (17)
- # vim (2)
Looking for options for debugging rules. Would have saved some time discovering typos etc today if I could have switched on debug logging evaluating every condition of a given rule say. Or even had "explain-non-activations". Any tips?
Ok. So it looks like inspect would have helped me. Will also try tracing tomorrow...
Inspect might be more helpful if you’re looking at ordinary sorts of errors like a bad rule etc. Tracing can be useful too but definitely gets into implementation details
If it concerns exceptions running against the branch that is out and in progress for https://github.com/cerner/clara-rules/issues/255 could be helpful too
Thanks :) Was more about straightforward debugging. Just getting started with Clara!
Also - looking at source of load-rules in clara/rules.cljc you can just supply a list of symbols resolving to individual rules, not just namespaces - is that correct? Would love an example of this. Flexibility around how rules are assembled would be great.
I think a call to mk-session like the one at https://github.com/cerner/clara-examples/blob/master/src/main/clojure/clara/examples/fact_type_options.clj#L20 is what you’re talking about, ignoring the :fact-type-fn and :ancestors-fn options