Fork me on GitHub
#clojure-spec
<
2019-07-04
>
holyjak07:07:03

Hello! I get some kind of infinite loop in conform after I have renamed and moved around a couple of spec names, any tips how to troubleshoot it? It seems deep-resolve and reg-resolve are involved in the loop as well as a particular spec (`:my.ns/account-invoices`) and if the debugger is correct then we regularly arrive to a point in reg-resolve where both spec and k are null. Update: I can replicate - calling (reg-resolve :my.ns/account-invoices) never returns. (Clojure 1.10.1, spec 0.2.44) This is really weird - all parts of the spec resolve but not the spec itself. I have this:

(s/def ::account-invoices
  (s/nilable
    (s/every-kv ::accid ::acc+invoice)))
and both (reg-resolve! :my.ns/acc+invoice) and (reg-resolve! :my.ns/accid) return a spec successfully yet (reg-resolve! :my.ns/account-invoices) never returns.... If I change the name of the spec to :tmp/account-invoices then (reg-resolve! :tmp/account-invoices) succeeds. SOLVED: This line little more down was the issue (s/def ::account-invoices ::account-invoices) I wish Spec had a loop detection...

loading 4
kappa 4