oracle-samples/clara-rules

The get-alphas-fn in ClojureScript should wrap the fact-type-fn and ancestors-fn

Closed this issue · 5 comments

The fact-type-fn is currently wrapped to detect system types in the Clojure implementation [1] but no such wrapping exists in the ClojureScript implementation [2, 3]. This could cause the fix for #149 to break in ClojureScript if a custom fact-type-fn is used. The ClojureScript implementation should also use the wrapped version on the ancestors-fn that I anticipate will be added to resolve #236 for reasons discussed there that are the same in Clojure and ClojureScript.

  1. https://github.com/cerner/clara-rules/blob/0.13.0-RC4/src/main/clojure/clara/rules/compiler.clj#L1530
  2. https://github.com/cerner/clara-rules/blob/0.13.0-RC4/src/main/clojure/clara/rules.cljc#L129
  3. https://github.com/cerner/clara-rules/blob/0.13.0-RC4/src/main/clojure/clara/rules.cljc#L229

@Zylox agreed; I've updated the original post with a link to the same tag as previously.

I've started working on this.

I have submitted a PR to fix this at #295

#295 fixed this issue and has been merged. Closing.