lein-figwheel

devth 2017-01-27T03:31:48.000469Z

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?

devth 2017-01-27T14:06:43.000470Z

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?

devth 2017-01-27T14:07:11.000471Z

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

devth 2017-01-27T14:07:41.000472Z

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

bhauman 2017-01-27T17:22:28.000473Z

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

bhauman 2017-01-27T17:23:07.000474Z

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

devth 2017-01-27T17:23:37.000475Z

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

devth 2017-01-27T17:23:45.000476Z

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

bhauman 2017-01-27T17:24:16.000477Z

yeah so now you want to start a repl

bhauman 2017-01-27T17:24:40.000478Z

and a repl needs the figwheel system

devth 2017-01-27T17:25:33.000479Z

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

bhauman 2017-01-27T17:26:55.000480Z

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

bhauman 2017-01-27T17:27:43.000481Z

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

devth 2017-01-27T17:28:00.000482Z

ah, nice.