The npm package ships no edn reader: no clojure.edn, no cljs.reader, and lib/compiler.js exports only compileString/compileStringEx. Yet edamame is already inside the compiler bundle (e/parse-string-all in cherry.compiler).
Motivation from choq: the grenadine dependency resolver reads the deps.edn manifests of git and :local/root coordinates through a :read-edn host hook (mvn coordinates use POMs, git/local use deps.edn, so an edn reader is load-bearing for the non-maven half of resolution). A project-level config file needs the same. Cherry users in general currently have no read-string at all.
Two options:
- Minimal: export a
readString from lib/compiler.js - a one-line public fn over edamame plus an export entry.
- Proper: a
clojure.edn module in the package with read-string, embeddable like clojure.string. As a shadow module it would depend on the :compiler chunk (edamame lives there), so browser users pay compiler weight for edn - worth a note in the module config. In choq the compiler is always resident, so it is free there.
Preference: option 2, it serves everyone rather than just embedders.
The npm package ships no edn reader: no
clojure.edn, nocljs.reader, andlib/compiler.jsexports onlycompileString/compileStringEx. Yet edamame is already inside the compiler bundle (e/parse-string-allincherry.compiler).Motivation from choq: the grenadine dependency resolver reads the
deps.ednmanifests of git and:local/rootcoordinates through a:read-ednhost hook (mvn coordinates use POMs, git/local use deps.edn, so an edn reader is load-bearing for the non-maven half of resolution). A project-level config file needs the same. Cherry users in general currently have noread-stringat all.Two options:
readStringfromlib/compiler.js- a one-line public fn over edamame plus an export entry.clojure.ednmodule in the package withread-string, embeddable likeclojure.string. As a shadow module it would depend on the:compilerchunk (edamame lives there), so browser users pay compiler weight for edn - worth a note in the module config. In choq the compiler is always resident, so it is free there.Preference: option 2, it serves everyone rather than just embedders.