-
-
Save olivergeorge/e37ff239783e1de8f97804bf472047a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns sandbox.clara-all-error | |
(:require-macros [clara.macros :refer [defsession]]) | |
(:require [clara.rules :as rules :refer [insert! defrule defquery]] | |
[clara.rules.accumulators :as acc])) | |
(println | |
(try | |
(defrecord Operation [field-key field-state]) | |
(defrule all-ops | |
[?ops <- (acc/all :field-state) :from [Operation]] | |
=> | |
(println "[all-ops] " ?ops)) | |
(defsession form-session 'sandbox.clara-all-error) | |
(-> form-session | |
(rules/insert | |
(->Operation :SITE {:disabled true}) | |
(->Operation :SITE {:hidden true})) | |
(rules/fire-rules)) | |
(catch js/Object e | |
(println e)))) |
Problem was my deps. I had an old version of schema.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Throws this error:
#object[Error Error: No protocol method Schema.spec defined for type cljs.core/PersistentArrayMap: {#schema.core.OptionalKey{:k :initial-value} #schema.core.AnythingSchema{:_ nil}, #schema.core.OptionalKey{:k :combine-fn} #schema.core.AnythingSchema{:_ nil}, #schema.core.OptionalKey{:k :convert-return-fn} #schema.core.AnythingSchema{:_ nil}, :reduce-fn #schema.core.AnythingSchema{:_ nil}, #schema.core.OptionalKey{:k :retract-fn} #schema.core.AnythingSchema{:_ nil}}]