Fork me on GitHub
#cursive
<
2019-06-09
>
daniel.spaniel16:06:26

I am curious how others are running a clojurescript repl. I follow the instructions and started a clojurescript REPL. When I load a file into this repl it complains that the dependencies are not loaded. If there is a file with no dependencies ( from my repo ) it works fine. So I am wondering why this repl is not loading all the files in my source tree ? might be something really dumb, but can't seem to figure it

mss18:06:04

what instructions are you working with just so I can help troubleshoot?

daniel.spaniel18:06:54

i actually was reading off the cursive slack channel from about a day ago where someone was asking same question

daniel.spaniel19:06:21

I got a CLJS repl started by using Templates / Clojure REPL / Local in the add a configuration section

daniel.spaniel19:06:55

then i selected clojure.main as the (Which type of repl to run ) and i picked for How to Run it => ( Run with deps ) option

daniel.spaniel19:06:54

then i tried Run with intellij project classpath for the option ( How to Run it )

daniel.spaniel19:06:57

and that not work either

daniel.spaniel19:06:01

don't get me wrong, the repl works as a repl ( where you type stuff in there ) But it does not load all the files in the working dir

daniel.spaniel19:06:26

unless there are no other dependencies to anything else ( because it can't find those other namespaced packages )

Trevor19:06:32

I'm wondering if I'm experiencing the same thing trying to import react dependencies using shadow? works fine in vscode but using cursive I get an error. Here's my post on #shadow-cljs https://clojurians.slack.com/archives/C6N245JGG/p1560103024119200

mss19:06:42

cool so I might be totally wrong about this, as I was encountering the same issue like a year or two ago when I was diving into cljs and getting it to work with cursive

mss19:06:59

basically, the crux of it is that cursive doesn’t actually maintain a cljs repl for you

mss19:06:19

you need to start it with some other tool like figwheel, shadow-cljs, lumo, etc and connect to it in your normal clj repl

mss19:06:13

once you run whatever your connect-to-cljs-repl function in a normal clj repl, cursive will pick up on the fact that it’s a cljs repl going forward and you’ll be good to go

mss19:06:24

so for example in a project I’m working on right now, my cljs code is built with shadow-cljs

mss19:06:04

I’ll start a process with shadow-cljs watch my-build, switch over to cursive and fire up a normal clj repl in clojure.main. I’ve added a repl command using Tools -> REPL -> Edit REPL Commands called connect-to-browser which runs (shadow.cljs.devtools.api/repl :my-build)

mss19:06:52

does that help?

daniel.spaniel20:06:23

boy that is very interesting .. and helpful. i will try that and let you know what happens .. thanks for idea

cfleming22:06:06

Good news for those suffering from the random symbol resolution problem - it’s been confirmed as a problem in the IntelliJ platform: https://github.com/cursive-ide/cursive/issues/2173#issuecomment-500250577

🎉 24