edn: apply tag readers inside a set literal

clojure.edn/read with :readers/:default recursed into vectors/maps/seqs but
not a constructed set, so a tagged literal in #{…} (aero's #ref in a set) kept
its raw form. edn->value now recurses into a set. clojure.edn is baked into the
seed, re-minted. Fixes aero #ref-in-set + falsey-user-return.
This commit is contained in:
Yogthos 2026-06-27 00:07:49 -04:00
parent eb64240e29
commit afc733a439
4 changed files with 739 additions and 734 deletions

View file

@ -36,6 +36,9 @@
(map? x)
(with-meta (into {} (map (fn [e] [(edn->value opts (key e)) (edn->value opts (val e))]) x)) (meta x))
(vector? x) (with-meta (mapv (fn [v] (edn->value opts v)) x) (meta x))
;; a constructed set: recurse into its elements too, so a tagged literal
;; inside #{…} gets the :readers/:default treatment (aero's #ref in a set).
(set? x) (with-meta (set (map (fn [v] (edn->value opts v)) x)) (meta x))
(seq? x) (with-meta (map (fn [v] (edn->value opts v)) x) (meta x))
:else x))