bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 209 forks source link

Implement suspendable? #570

Closed featheredtoast closed 7 years ago

featheredtoast commented 7 years ago

Would you be open to adding the Suspendable API to the figwheel system?

I'm attempting to reload a system (using reloaded.repl) with figwheel's component, using (figwheel-system). On a reset/reload of the system, existing cljs repls are lost, forcing a user to run a :cljs/quit, followed by a call to (cljs-repl). Ideally, cljs-repl connections should persist across system reloads.

I'm looking at options to address some issues that are cropping up with integrating component + merging figwheel into the Chestnut lein template, specifically - any pointers or suggestions would be appreciated!

Having the implementation be something like this would be ideal for me - under a workflow like reloaded.repl, calling a reset won't break existing cljs connections.

featheredtoast commented 7 years ago

I'm closing this out. This probably isn't a figwheel issue -- I didn't realize that everything still works even if I extend a protocol outside of the declared namespace, so I'm going to go down that route instead. Sorry for the noise!

featheredtoast commented 7 years ago

After discussing a potential PR with Chestnut for these changes, this kind of functionality would still be ideal for Figwheel directly - so I'm going to re-open the ticket here. Would you be open to extending the figwheel-system?

bhauman commented 7 years ago

I would take a PR with the changes you have discussed above.