This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-03-28
Channels
- # aleph (48)
- # announcements (3)
- # bangalore-clj (1)
- # beginners (131)
- # cider (30)
- # cljdoc (6)
- # cljs-dev (53)
- # cljsrn (24)
- # clojure (312)
- # clojure-austin (2)
- # clojure-europe (4)
- # clojure-finland (6)
- # clojure-nl (24)
- # clojure-spec (24)
- # clojure-uk (66)
- # clojurescript (185)
- # core-async (46)
- # cursive (10)
- # data-science (9)
- # datomic (15)
- # devcards (2)
- # emacs (50)
- # fulcro (28)
- # jobs (1)
- # jobs-discuss (2)
- # kaocha (11)
- # lein-figwheel (12)
- # nyc (1)
- # off-topic (105)
- # other-languages (80)
- # pedestal (6)
- # re-frame (50)
- # reagent (5)
- # reitit (1)
- # remote-jobs (2)
- # ring (10)
- # rum (1)
- # shadow-cljs (10)
- # spacemacs (19)
Specifically, I'm trying to use cljs.js/eval-str
to evaluate code that :require
s and uses cljs.analyzer/macroexpand-1
.
Not sure if the right thing to so is to augment my cljs.js/*load-fn*
to retrieve the cljs.analyzer
source (and all its dependencies) or something more radical like,
(ns …
(:require [cljs.js :as cljs]
[cljs.analyzer]))
(swap! cljs/*loaded* conj 'cljs.analyzer)
(cljs/eval-str …)
I'm trying to use cljs.js/eval-str
to evaluate code that :require
s and uses cljs.analyzer/macroexpand-1
.
Not sure if the right thing to so is to augment my cljs.js/*load-fn*
to retrieve the cljs.analyzer
source (and all its dependencies) or something more radical like,
(ns …
(:require [cljs.js :as cljs]
[cljs.analyzer]))
(swap! cljs/*loaded* conj 'cljs.analyzer)
(cljs/eval-str …)
@joshuamilesthayer is working with me on this. 🙂
In that case is the right thing to do to have our load-fn
return nil
for that dependency?
We're finding that our load-fn
is called for cljs.analyzer
if the code being eval-str
'd :require
s it, but that may be because we're making a mistake somewhere else?
I'm not sure I understand. Do you mean manually trace the transitive dependencies and conj
them all in ourselves?