This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-10
Channels
- # admin-announcements (1)
- # aleph (1)
- # asami (9)
- # babashka (30)
- # beginners (83)
- # calva (8)
- # cherry (4)
- # cider (4)
- # clj-kondo (15)
- # cljs-dev (11)
- # cljsrn (8)
- # clojure (85)
- # clojure-europe (87)
- # clojure-losangeles (9)
- # clojure-nl (4)
- # clojure-norway (4)
- # clojure-spec (3)
- # clojurescript (12)
- # community-development (5)
- # conjure (1)
- # core-typed (3)
- # datomic (21)
- # docker (13)
- # emacs (13)
- # funcool (1)
- # google-cloud (1)
- # graalvm (12)
- # gratitude (14)
- # holy-lambda (6)
- # introduce-yourself (18)
- # lsp (15)
- # malli (6)
- # matcher-combinators (15)
- # nbb (15)
- # off-topic (37)
- # pathom (31)
- # portal (23)
- # rdf (3)
- # releases (2)
- # reveal (2)
- # sci (4)
- # scittle (3)
- # shadow-cljs (14)
- # squint (2)
- # tools-deps (29)
hi everybody! I'm connecting to a shadow-cljs nrepl server (clojure side) and trying to get a cljs fn source like (cljs.repl/source-fn env 'cljs.core/first)
but I don't have an environment. I know I can get the compiler environment for a build-id with shadow.cljs.devtools.api/compiler-env
but most functions I want to use require the analysis env instead. Is there a way of calling this functions? I know how to call them with macros at macroexpansion time by using the analysis environment provided as &env
but I would like to do it from the clojure repl.
could you explain what you are trying to do exactly? I mean macros are macros and calling them as functions doesn't work
you can get a env
via (cljs.analyzer/empty-env)
. it expects *cljs-ns*
to be bound for the current ns though
nice, the empty-env did the trick.
I also need to bind the cljs.env/compiler
like this :
(binding [cljs.analyzer/*cljs-ns* 'cljs.user
cljs.env/*compiler* (atom (shadow.cljs.devtools.api/compiler-env build-id))]
(repl/source-fn (ana/empty-env) symb))
thanks @U05224H0W!
is it possible to recover from a build failure without restarting the process?
but if it never connected to the repl in the first place, how will it know if I change something?
oh, it just does, that's how
niiiiiice