Fork me on GitHub
#lein-figwheel
<
2017-01-27
>
devth03:01:48

if i use figwheel-system to start my figwheel then run (figwheel-sidecar.repl-api/repl-env) it returns

Figwheel System not initialized.
Please start it with figwheel-sidecar.repl-api/start-figwheel!
nil
however, it's definitely running since my browser is reloading and i see compilation in my repl. something out of sync?

devth14:01:43

i can convince figwheel that is is running if I:

(alter-var-root
    #'figwheel-sidecar.repl-api/*repl-api-system* (constantly
                             {:figwheel-system (-> sys :figwheel)}))
from this I gather figwheel-system is not meant to be used directly?

devth14:01:11

(`sys` is my app's system, of which :figwheel is one of the components)

devth14:01:41

seems like figwheel-system should be correctly resetting #'figwheel-sidecar.repl-api/*repl-api-system* on its own. simple omission or are there problems?

bhauman17:01:28

@devth it's how you are starting figwheel that is the problem

bhauman17:01:07

if you are using the repl-api you need to start figwheel with the repl-api

devth17:01:37

ah. i'm just adding (component/using (figwheel-system f/figwheel-config) [:server]) to my system-map

devth17:01:45

then (go) in the repl starts the whole system.

bhauman17:01:16

yeah so now you want to start a repl

bhauman17:01:40

and a repl needs the figwheel system

devth17:01:33

ok. i can hack around it for now. i'll think about using start-figwheel! instead too.

bhauman17:01:55

there is a figwheel-sidecar.system/start-figwheel-repl fn

bhauman17:01:43

You'll have to get the figwheel system from your system map

devth17:01:00

ah, nice.