Fork me on GitHub

greetings! cursive can launch figwheel repl, but can it connect to a running one?


re-natal (react native) starts figwheel, and I am looking for (easy opieop) ways to see/use that running repl from cursive


@misha: I'm pretty sure it can, let me test on my machine and I'll let you know how.


@misha If it starts an nREPL server, then yes, it can - use the Remote REPL run config option.


@cfleming is there an easy tell? like does FW print something specific out, or has something in a project file, etc.? Going through all the FW docs now


@misha: There's an nrepl port that you can add to the figwheel config in your project.clj


The lein figwheel is capable of launching an nREPL server that your tooling can connect to by using the :nrepl-port configuration parameter. This is not the strategy recommended below.

I am now recommending that you forgo using lein figwheel and instead run lein repl and then launch figwheel from the Clojure nREPL session. This will allow you to reuse all of your project.clj's nrepl configuration.


Yeah, it's not as nice for tooling but work pretty well if you want it working quickly - particularly if you aren't able to use the instructions on that page


if I don't have any prior nrepl configuration - is doing it "hard way" worth it?


okok, for now I'd settle for reading from/sending to repl w/o leaving cursive.


I'm just testing it - I spent a lot of time a year or so ago using figwheel and cursive the old way and I remember it working just fine, but I should probably check what it does now before recommending it 🙂


Ok yeah it still works fine - 1 minute and I'll send you the super easy version


In your project.clj, add :nrepl-portto your root figwheel map (not under a build) In cursive, add a new Clojure REPL -> Remote config, point it to your nrepl host and port as configured in figwheel Start Figwheel Start your remote config Profit!


is it Christmas already? 🙂


:profiles {:dev
                     {:source-paths ["src" "env/dev"]
                      :figwheel     true
                      :compiler     {:preloads      [devtools.preload]
                                     :source-map    true
                                     :output-to     "target/ios/not-used.js"
                                     :main          "env.ios.main"
                                     :output-dir    "target/ios"
                                     :infer-externs true
                                     :optimizations :none}}}}}


@shaun-mahood this is the truncate version of project.clj, and there is no mention of FW other than this true val.


@misha: We should take this to #lein-figwheel - can you post the entire project.clj there?


@shaun-mahood cursive remote repl settings does not give me current project as an option for context module. how critical is that?


@misha: I have no idea 🙂 What options is it giving you, just blank?


some of mine locally built .jars


ok, ios-level settings did not work. root-level settings did launch nrepl, and I connected to it. but it does not see anything in ns I switch to: CompilerException java.lang.RuntimeException: Unable to resolve symbol: thanks, @shaun-mahood the search continues


@misha: Can you do basic clojure operations?


yes, (+ 1 1) works, (in-ns 'my.project.ns) seems to work too, but it after that it fails to evaluate anything within it.


I suspect the issue is - whole project is a cljs one, and there is no "server side" code to form any meaningful context off


@misha: I've done the same thing with CLJS only projects before with no problem - maybe it's re-natal specific, you could ask someone in #cljsrn and maybe they can help you more. I'm out of knowledge 🙂


@shaun-mahood I messed up module names in project.clj: repl setup screen does give me current project as a context, however that does not make repl able to eval anything within my namespaces... thanks again


@shaun-mahood in case you are interested, I just stopped launching FW repl from .sh script, and instead launch it from cursive, instead of trying to connect cursive to running FW


@misha: Good plan, glad it all works for you now


hey folks, outside of the hack that generates a project.clj for every run of boot, does anyone know where I could look to see if boot support is in the works?

timgilbert21:12:42 news about official support in it, though


@timgilbert nice, thank you


I am helping to get a new team up to speed on cursive, and would like to go to boot instead of lein


this being one of the questions (blockers?) on that front


@clark: Colin (Cursive developer) is very active in here, I'm sure he'll answer when he's able to


@shaun-mahood very cool, thank you!