metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.43k stars 204 forks source link

Fix `:repeat` infinite loops by bailing early #1024

Closed frenchy64 closed 3 months ago

frenchy64 commented 3 months ago

Close #761

I can't say I fully understand what's going on but this seems to fix all infinite loops, e.g.,:

(validate [:repeat [:repeat :int]] [])
;; before: diverge
;; after: true

There are lots of examples like this.

ikitommi commented 3 months ago

thanks for looking into this.