oakes / odoyle-rum-todo

7 stars 1 forks source link

Repl development question #3

Closed drewverlee closed 3 years ago

drewverlee commented 3 years ago

My goal is to be able to evaluate and see the output of my clojure expressions. The way I imagine this works, given my workflow with emacs and cider, is to run cider-jack-in Which will start an nREPL server and connect to it. From their i can evaluate

(require
  '[figwheel.main :as figwheel]
  '[odoyle-rum-todo.start-dev :refer [-main]])

(-main)
(figwheel/-main "--build" "dev")

Which starts a sever (figwheel) and correctly launches the browser app. However, this seems to tie up the REPL. e.g i can't eval any more expressions. I'm currently unsure what the proper path is given my goal. Idea's welcome.

oakes commented 3 years ago

Yeah figwheel's -main function is blocking. You could wrap that in a future to make it run in a separate thread, i think that should fix your repl issue.

drewverlee commented 3 years ago

Closing this because wrapping (figwheel/-main "--build" "dev") in a future worked as suggested.