@alex-dixon there’s also Integrant, which is also regarded as a high quality implementation, see https://www.reddit.com/r/Clojure/comments/5gvhi2/integrant_an_alternative_to_component_and_mount/daybmun/
(Halgari is Timothy Baldridge)
@gdeer81 Regarding multiple namespaces passed to session, Clara should support it, so probably a minor syntactical issue in Precept. Will see if I can repro
Conflicting logical fact error is a motivation for fixing reloading. The rules fire again when figwheel reloads and more facts are inserted, but the state/fact-index atom doesn’t appear to get cleared. I would expect it to be cleared actually, because I thought with figwheel if you don’t use defonce with an atom then defs are redeffed . The most progress I’ve made on this is a CLJ only function that can be called from the REPL https://github.com/CoNarrative/precept/blob/issue-80/src/cljc/precept/repl.cljc#L42
If we can manage figwheel using mount, integrant or the like, and doing so would recompile macros that are defined in CLJ, then I think we’d really be in business. We could have a CLJS version of this function that would be called on figwheel reload that would 1. sync the rules in the namespaces that were provided to the session 2. resets fact index and other state 3. inserts into the redeffed session with the synchronized rules all facts stored in state/unconditional-inserts (these are “base state” facts that rules using insert logical can recalculate from).
I think ideally that would be figwheel agnostic, but I’m getting wrapped around my axle a bit on how to force recompilation. At this point I honestly don’t care if we have to pull in the CLJS compiler to do this just for solving these problems in development. I’m interested in experimenting with that for production anyway, because it would allow us to define rules and load them into the session dynamically
@alex-dixon thanks for the insight. Keep fighting the good fight. Soon, this Yak will be as smooth as a 🐬