Host gaps that blocked malli: map .iterator, two clojure.lang builders
malli loads and validates now. Three divergences surfaced building its registry and :map schema: dot-forms: (.iterator coll) on a map fell into the map-as-object branch and was mis-read as a missing :iterator key (nil), so malli's -vmap got nil and crashed on .hasNext. Route iterator through the collection-interop path — a jiterator over the seq (the entry iterator for a map). host-static: register clojure.lang.LazilyPersistentVector/createOwning (-vmap fills an object-array then hands it over) and PersistentArrayMap/createWithCheck (malli's eager entry parser relies on its duplicate-key throw; a missing class was caught and mis-reported as ::duplicate-keys on every map schema).
This commit is contained in:
parent
6ab65a30e3
commit
4114766c71
3 changed files with 30 additions and 0 deletions
|
|
@ -38,6 +38,11 @@
|
|||
((or (string=? name "get") (string=? name "valAt"))
|
||||
(list (apply jolt-get obj args)))
|
||||
((string=? name "containsKey") (list (jolt-contains? obj (car args))))
|
||||
;; (.iterator coll): a java.util.Iterator over the seq — for a map this is the
|
||||
;; entry iterator. Without this a map's .iterator falls into the map-as-object
|
||||
;; branch and is mis-read as a missing :iterator key (nil). Some libraries
|
||||
;; (e.g. malli's -vmap) iterate a map this way.
|
||||
((string=? name "iterator") (list (make-jiterator (jolt-seq obj))))
|
||||
(else #f)))
|
||||
|
||||
;; Universal object-methods: on a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue