Skip to content

Instantly share code, notes, and snippets.

@holyjak
Created March 29, 2020 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save holyjak/b8904d307de4300d09eb25e9515f7b2d to your computer and use it in GitHub Desktop.
Save holyjak/b8904d307de4300d09eb25e9515f7b2d to your computer and use it in GitHub Desktop.
ERROR com/fulcrologic/fulcro/algorithms/tx_processing.cljc:399 compute-desired-ast-node's return type
-- Spec failed --------------------
{:com.fulcrologic.fulcro.algorithms.tx-processing/results ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/state-before-action
...,
:com.fulcrologic.fulcro.algorithms.tx-processing/dispatch ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/started? ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/original-ast-node
...,
:com.fulcrologic.fulcro.algorithms.tx-processing/complete? ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/idx ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/desired-ast-nodes
...,
:com.fulcrologic.fulcro.algorithms.tx-processing/transmitted-ast-nodes
{:remote
{:type ...,
:children
[{:type ...,
:dispatch-key ...,
:key ...,
:query ...,
:component ...,
:children
[...
{:type ...,
:dispatch-key ...,
:key ...,
:query ...,
:component ...,
:children
[...
...
...
...
...
...
...
...
...
{:type ...,
:dispatch-key ...,
:key ...,
:query ...,
:component ...,
:children [... ... {:type :join,
:dispatch-key :alt0,
:key :alt0,
:query [[:ui.fulcro.client.data-fetch.load-markers/by-id _]],
:component minbedrift.ui/SubscribersList,
:params nil}],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:params ...}],
:params ...}],
:params ...}],
:params ...}}}
when conformed as
{:type :join, :dispatch-key [:prop :alt0], :key [:prop :alt0], :query [:query [[:ident [:ui.fulcro.client.data-fetch.load-markers/by-id _]]]], :component minbedrift.ui/SubscribersList, :params nil}
should satisfy
(fn
[%]
(if
(-> % :query first (= :recursion))
%
(if (contains? % :children) % false)))
-- Relevant specs -------
:edn-query-language.ast/children:
(cljs.spec.alpha/coll-of :edn-query-language.ast/node)
:edn-query-language.ast/root:
(cljs.spec.alpha/and
(cljs.spec.alpha/keys
:req-un
[:edn-query-language.ast/type :edn-query-language.ast/children])
(cljs.core/fn [%] (cljs.core/= :root (:type %)))
(cljs.core/fn
[x]
(cljs.core/every?
(cljs.core/comp
(fn*
[p1__40063#]
(cljs.core/contains? #{nil :call :prop :join} p1__40063#))
:type)
(:children x))))
:edn-query-language.ast/node:
(cljs.spec.alpha/multi-spec edn-query-language.core/node-type :type)
:com.fulcrologic.fulcro.algorithms.tx-processing/transmitted-ast-nodes:
(cljs.spec.alpha/map-of cljs.core/keyword? :edn-query-language.ast/node)
:com.fulcrologic.fulcro.algorithms.tx-processing/tx-element:
(cljs.spec.alpha/keys
:req
[:com.fulcrologic.fulcro.algorithms.tx-processing/idx
:com.fulcrologic.fulcro.algorithms.tx-processing/original-ast-node
:com.fulcrologic.fulcro.algorithms.tx-processing/started?
:com.fulcrologic.fulcro.algorithms.tx-processing/complete?
:com.fulcrologic.fulcro.algorithms.tx-processing/results
:com.fulcrologic.fulcro.algorithms.tx-processing/dispatch]
:opt
[:com.fulcrologic.fulcro.algorithms.tx-processing/desired-ast-nodes
:com.fulcrologic.fulcro.algorithms.tx-processing/transmitted-ast-nodes
:com.fulcrologic.fulcro.algorithms.tx-processing/progress])
-------------------------
Detected 1 error
r @ react_devtools_backend.js:6
eval @ timbre_support.cljs:80
eval @ timbre.cljs:502
eval @ core.cljs:6949
eval @ core.cljs:6949
cljs$core$_kv_reduce @ core.cljs:700
cljs$core$reduce_kv @ core.cljs:2555
eval @ timbre.cljs:442
com$fulcrologic$guardrails$core$run_check @ core.cljc:50
com$fulcrologic$fulcro$algorithms$tx_processing$compute_desired_ast_node @ tx_processing.cljc:399
eval @ tx_processing.cljc:471
eval @ core.cljs:5300
eval @ core.cljs:5300
eval @ core.cljs:5299
eval @ tx_processing.cljc:472
eval @ core.cljs:2491
eval @ core.cljs:2491
eval @ core.cljs:2541
f39062 @ tx_processing.cljc:467
com$fulcrologic$fulcro$algorithms$tx_processing$queue_element_sends_BANG_ @ tx_processing.cljc:462
eval @ tx_processing.cljc:525
eval @ core.cljs:5624
eval @ core.cljs:5624
eval @ core.cljs:5628
eval @ core.cljs:2529
f39194 @ tx_processing.cljc:524
com$fulcrologic$fulcro$algorithms$tx_processing$queue_sends_BANG_ @ tx_processing.cljc:518
f39459 @ tx_processing.cljc:607
com$fulcrologic$fulcro$algorithms$tx_processing$process_tx_node_BANG_ @ tx_processing.cljc:595
com$fulcrologic$fulcro$algorithms$tx_processing$process_queue_BANG__$__STAR_pstep @ tx_processing.cljc:660
eval @ core.cljs:5624
eval @ core.cljs:5624
eval @ core.cljs:5628
eval @ core.cljs:2529
f39563 @ tx_processing.cljc:659
com$fulcrologic$fulcro$algorithms$tx_processing$process_queue_BANG_ @ tx_processing.cljc:656
f38605 @ tx_processing.cljc:259
com$fulcrologic$fulcro$algorithms$tx_processing$activate_submissions_BANG_ @ tx_processing.cljc:252
eval @ scheduling.cljc:37
setTimeout (async)
com$fulcrologic$fulcro$algorithms$scheduling$defer @ scheduling.cljc:11
eval @ scheduling.cljc:35
f38643 @ tx_processing.cljc:266
eval @ tx_processing.cljc:264
f38647 @ tx_processing.cljc:269
eval @ tx_processing.cljc:267
eval @ application.cljc:171
eval @ components.cljc:825
eval @ data_fetch.cljc:283
minbedrift$ui$mutations$action @ mutations.cljc:15
eval @ tx_processing.cljc:345
eval @ core.cljs:5624
eval @ core.cljs:5624
eval @ core.cljs:5628
eval @ core.cljs:2529
f38816 @ tx_processing.cljc:333
com$fulcrologic$fulcro$algorithms$tx_processing$run_actions_BANG_ @ tx_processing.cljc:330
eval @ tx_processing.cljc:602
f39459 @ tx_processing.cljc:594
com$fulcrologic$fulcro$algorithms$tx_processing$process_tx_node_BANG_ @ tx_processing.cljc:595
com$fulcrologic$fulcro$algorithms$tx_processing$process_queue_BANG__$__STAR_pstep @ tx_processing.cljc:660
eval @ core.cljs:5624
eval @ core.cljs:5624
eval @ core.cljs:5628
eval @ core.cljs:2529
f39563 @ tx_processing.cljc:659
com$fulcrologic$fulcro$algorithms$tx_processing$process_queue_BANG_ @ tx_processing.cljc:656
f38605 @ tx_processing.cljc:259
com$fulcrologic$fulcro$algorithms$tx_processing$activate_submissions_BANG_ @ tx_processing.cljc:252
eval @ scheduling.cljc:37
setTimeout (async)
com$fulcrologic$fulcro$algorithms$scheduling$defer @ scheduling.cljc:11
eval @ scheduling.cljc:35
f38643 @ tx_processing.cljc:266
eval @ tx_processing.cljc:264
f38647 @ tx_processing.cljc:269
eval @ tx_processing.cljc:267
eval @ application.cljc:171
eval @ components.cljc:825
eval @ components.cljc:827
eval @ ui.cljc:51
eval @ report.cljc:26
callCallback @ react-dom.development.js:189
invokeGuardedCallbackImpl @ react-dom.development.js:238
invokeGuardedCallback @ react-dom.development.js:293
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:307
executeDispatch @ react-dom.development.js:390
executeDispatchesAndReleaseTopLevel @ react-dom.development.js:415
forEachAccumulated @ react-dom.development.js:3260
runEventsInBatch @ react-dom.development.js:3305
handleTopLevel @ react-dom.development.js:3515
eval @ react-dom.development.js:21872
batchedEventUpdates @ react-dom.development.js:796
attemptToDispatchEvent @ react-dom.development.js:3569
dispatchEvent @ react-dom.development.js:4190
exports.unstable_runWithPriority @ scheduler.development.js:654
runWithPriority$1 @ react-dom.development.js:11040
Internals.Events @ react-dom.development.js:21888
dispatchDiscreteEvent @ react-dom.development.js:807
Show 9 more frames
react_devtools_backend.js:6 ERROR com/fulcrologic/fulcro/algorithms/tx_processing.cljc:430 add-send!'s argument list
-- Spec failed --------------------
[...
{:com.fulcrologic.fulcro.algorithms.tx-processing/id ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/created ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/options ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/tx ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/elements
[{:com.fulcrologic.fulcro.algorithms.tx-processing/results ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/state-before-action
...,
:com.fulcrologic.fulcro.algorithms.tx-processing/dispatch ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/started? ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/original-ast-node
...,
:com.fulcrologic.fulcro.algorithms.tx-processing/complete? ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/idx ...,
:com.fulcrologic.fulcro.algorithms.tx-processing/desired-ast-nodes
...,
:com.fulcrologic.fulcro.algorithms.tx-processing/transmitted-ast-nodes
{:remote
{:type ...,
:children
[{:type ...,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment