Fork me on GitHub
#figwheel
<
2017-10-09
>
mikerod15:10:56

On some occasions when using a figwheel CLJS repl with sidecare, emacs, and piggieback I see some mysterious behavior. I try to observe state held in an atom by just evaluating it to let it print. However, it prints nil as if nothing is there. However, if I start prodding at it with details, like keys, count, etc, there are results. There is actually something there. I can see it in the running web page in the browser too. It is as if the CLJS repl has two versions of state and it is able to print both depending on what operations you do. Anything similar ever happen to anyone?

mikerod15:10:44

Example would be like:

(-> @my-state :something :foo) ;;= nil
(-> @my-state :something :foo keys) ;;= (:a :b :c)

mikerod15:10:57

when no reloading has happened and the browser continues to show me the state with the keys

mikerod15:10:36

I also think what comes with this behavior is the repl having a name showing up like

v------- app!{:conn 2} -------
Which isn’t there typically

achikin16:10:40

Figwheel + cider is dramatically slow for me. Could you please give me some directions to investigate and solve that issue?

lilactown23:10:16

@achikin same problem here...

lilactown23:10:00

connecting via lein repl :connect is also quite slow

lilactown23:10:06

however, starting via lein figwheel it is quite fast

lilactown23:10:46

yeah, starting a fresh nrepl session:

$ lein repl
user=> (fig-start)
user=> (cljs-repl)
cljs.user=> (println "hello")
"hello" takes about ~3ish seconds to print

lilactown23:10:41

@mikerod I think I've deduced that the app!{:conn 2} message shows up when you have two browser windows open pointing to the figwheel page