Arcadia
Arcadia copied to clipboard
problem with update-state
take this object and role:
(ac/defrole example-role
:state {})
(dorun (map ac/retire (ac/objects-named "example-object")))
(let [obj (GameObject. "example-object")]
(ac/role+ obj :example example-role))
this works:
(ac/update-state (ac/object-named "example-object") :example
assoc
:hi :there)
but this throws an error:
(ac/update-state (ac/object-named "example-object") :example
assoc
:hi :there
:you :guy)
The error:
No implementation of method: :snapshot of protocol: #'arcadia.internal.protocols/ISnapshotable found for class: PersistentArrayMap
at clojure$core$_cache_protocol_fn__28691.invokeStatic (System.Object , System.Object , System.Object , System.Object ) [0x00133] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at clojure$core$_cache_protocol_fn__28691.invoke (System.Object , System.Object , System.Object , System.Object ) [0x00000] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at arcadia$internal$protocols$fn__6927G__6908__6940__6943.invoke (System.Object ) [0x00069] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at arcadia$core$snapshot__9939.invokeStatic (System.Object ) [0x00037] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at arcadia$core$snapshot__9939.invoke (System.Object ) [0x00000] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at arcadia$core$update_state__10042.invokeStatic (System.Object , System.Object , System.Object , System.Object , System.Object , System.Object , clojure.lang.ISeq ) [0x00057] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at arcadia$core$update_state__10042.doInvoke (System.Object , System.Object , System.Object , System.Object , System.Object , System.Object , System.Object ) [0x00000] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at clojure.lang.RestFn.invoke (System.Object arg1, System.Object arg2, System.Object arg3, System.Object arg4, System.Object arg5, System.Object arg6, System.Object arg7) [0x00304] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at arcadiatech$example_demo$eval__6972__6977.invokeStatic () [0x00037] in <f98d40236c22423d8e16e2c306a4471f>:0
at arcadiatech$example_demo$eval__6972__6977.invoke () [0x00000] in <f98d40236c22423d8e16e2c306a4471f>:0
at clojure.lang.Compiler.eval (System.Object form) [0x001c2] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at clojure.lang.Compiler.eval (System.Object form) [0x00149] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at clojure$core$eval__22334.invokeStatic (System.Object ) [0x00000] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at clojure$core$eval__22334.invoke (System.Object ) [0x00000] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at clojure.lang.Var.invoke (System.Object arg1) [0x00010] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0
at Arcadia.NRepl+EvalFn.invoke () [0x00094] in <ebba577f1a0a4bdc9a18c2ca5ef26619>:0