edn: port read-string onto the reader; fix special-form ns shadowing

clojure.edn/read-string now delegates to clojure.core/read-string (the
reader-based special form — parses, never evals) via a private helper, with the
opts-map :eof arity and nil/blank-input handling. 43 -> 47 in the stdlib battery.

This required an evaluator fix: special forms were matched by name only, so
clojure.edn/read-string dispatched the core read-string SPECIAL FORM instead of
the var. Now a head qualified to a non-core namespace resolves to its var; only
unqualified or clojure.core-qualified heads are special forms. Conformance
218/218 all modes; full suite green.

Remaining edn gaps (jolt-b7y): set literals read as a set FORM not a constructed
set, and #uuid has no real type.
This commit is contained in:
Yogthos 2026-06-06 19:45:30 -04:00
parent fc88ecdc74
commit 1bd676c242
3 changed files with 31 additions and 12 deletions

View file

@ -12,9 +12,10 @@
[["clojure/walk_test/walk.cljc" 34 true]
["clojure/zip_test/zip.cljc" 33 true]
["clojure/data_test/diff.cljc" 61 true]
# clojure.edn is still a stub (no opts/:eof arity, broken set/nil handling);
# tracked separately. Guard its current passing subset so it can't regress.
["clojure/edn_test/read_string.cljc" 43 false]])
# clojure.edn now reads via clojure.core/read-string with opts/:eof + nil/blank
# handling. The remaining 3 fails are sets (the reader yields a set FORM, not a
# constructed set) and #uuid — tracked in jolt-b7y. Guard the passing subset.
["clojure/edn_test/read_string.cljc" 47 false]])
(def root "test/clojure-stdlib")
(def per-file-timeout 6)