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:
Yogthos 2026-06-22 05:35:08 -04:00
parent 6ab65a30e3
commit 4114766c71
3 changed files with 30 additions and 0 deletions

View file

@ -70,6 +70,9 @@
(let-values (((form j) (rdr-read-form src i end)))
(when (> j i)
(unless (rdr-eof? form)
(when (getenv "JOLT_TRACE_LOAD")
(display " [load-form] " (current-error-port))
(display (jolt-pr-str form) (current-error-port)) (newline (current-error-port)))
(jolt-compile-eval-form form (chez-current-ns)))
(loop j)))))))