precept
precept copied to clipboard
Throws exception with Clara 0.18.0
deps.edn of:
{:deps {com.cerner/clara-rules {:mvn/version "0.18.0"}
precept {:mvn/version "0.4.0-alpha"}}}
Running clj
:
Clojure 1.9.0
user=> (require 'precept.listeners)
WARNING: qualified-keyword? already refers to: #'clojure.core/qualified-keyword? in namespace: clara.rules.dsl, being replaced by: #'clara.rules.dsl/qualified-keyword?
CompilerException java.lang.IllegalArgumentException: Can't define method not in interfaces: insert_facts_BANG_, compiling:(precept/listeners.cljc:14:1)
user=>
This looks like the result of the breaking changes in https://github.com/cerner/clara-rules/pull/366 that @alex-dixon mentioned in #clara on Slack. The specific change line
@SevereOverfl0w if you want to try Precept with the newer Clara it should be sufficient to just uplift the Precept listeners in question to have the new arguments added, even if they're never used. The values of the existing argument "facts" shouldn't be changed from what it was before. The breakage is unfortunate, we (the Clara maintainers) thought the long-term cruft of trying to make it passive wouldn't be worth it for something that seems like a trivial uplift though.
@WilliamParker I guess I broke myself on that one. :) If someone wants to use Precept <= 0.5.0-alpha and Clara >= 0.17.0 they won't be able to. I'm definitely willing to accept that.
0.5.0-alpha is on the issue-19 branch and works with Clara 0.17.0.
Leaving this open to ensure the next release is also compatible with Clara 0.18.0.