figwheel-main

figwheel-main http://figwheel.org
EmmanuelOga 2020-02-06T04:18:10.085700Z

Ok, the solutions I think I found.... 1) I still don't know, but I saw when cider launches a repl it uses nrepl-cmdline which seems to be saving the port a file on the root of the project (.nrepl-port) https://github.com/nrepl/nrepl/blob/be37e0ebd13c2d341bf6a7bcd5735da45b78f909/src/clojure/nrepl/cmdline.clj#L403-L413

EmmanuelOga 2020-02-06T04:18:49.086100Z

2) I thin figwheel launches a single nREPL server, the cmds to cljs or clj are "redirected" through the use of the piggieback middleware, so I shouldn't try to run two nREPLS

EmmanuelOga 2020-02-06T04:18:58.086300Z

3) is basically answered by 2).. 🙂

EmmanuelOga 2020-02-06T04:20:51.086700Z

founds this project that solved the cider-jack-in-clj&cljs debacle for me: https://github.com/EmmanuelOga/deps-cider-cljs-reagent

EmmanuelOga 2020-02-06T04:21:33.087100Z

the "secret sauce" seems to be the config on .dir-locals.el, which customize the way cider launches the repl: https://github.com/EmmanuelOga/deps-cider-cljs-reagent/blob/master/.dir-locals.el

EmmanuelOga 2020-02-06T04:22:47.087500Z

it instructs cider to use the -A:cider alias cmd, and in deps.edn there's a corresponding alias that enables figwheel. There's also config to automatically select a repl of figwheel-main type and the dev build.

EmmanuelOga 2020-02-06T04:23:09.087700Z

sigh, that was a lot to write. Hopefully it will help someone, maybe not 🙂

pyrmont 2020-02-06T05:43:33.088500Z

You should put this on a blog (or just a Gist)! It's useful information.