Open raoofha opened 7 years ago
To make startup faster we lazy-load the core analysis caches in Lumo, which means that cljs.js/empty-state
won't know about cljs.core
.
I see 2 ways of solving your problem:
lumo.repl/st
lumo.common
namespace.I'll leave the issue open in any case because we could either document this better or provide easier hooks for people doing stuff with cljs.js
in Lumo.
FWIW, Planck has a solution for this that Lumo could consider:
cljs.user=> (require 'cljs.js '[planck.core :refer [init-empty-state]])
nil
cljs.user=> (cljs.js/compile-str (cljs.js/empty-state init-empty-state) "(print \"yes\")" #(println (:value %)))
cljs.core.print.call(null,"yes");
nil
cljs.user=> (doc init-empty-state)
-------------------------
planck.core/init-empty-state
([state])
An init function for use with cljs.js/empty-state which initializes the
empty state with cljs.core analysis metadata.
This is useful because Planck is built with :dump-core set to false.
Usage: (cljs.js/empty-state init-empty-state)
Spec
args: (cat :state map?)
ret: map?
nil
I'm working on a toy tool and found this bug
it should be
cljs.core.print.call(null,"yes");