Fork me on GitHub

Hi. I might be mistaken, but I thought Cursive allowed 'Sending' arbitary commands from namespaces to the repl without loading the commands containing NS first? I create a new NS, type in (+ 1 2) and send it to the repl


(+ 2 1)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: + in this context, compiling:(/Users/will/src/bookmenow/test/bookmenow/test/wat.clj:3:1) 


@paulspencerwilliams when i switch my repl to another ns, i get a bug like that Paul , suddenly it cant find clojure.core stuff


i've been working around by using lein's

:repl-options { :init-ns myns.core }
which will start the repl in myns.core


not sure if that's your problem or not though paul


there's a keymap you can set called "Send top form to REPL" that sends the top-most self-contained s-expression under your curse to the repl. I use this all the time. i believe the option for whether you evaluate in the repl's namespace or the namespace of where you sent the code from is an option under settings somewhere. i choose to evaluate in the ns the repl is already in.


I replicated my issue, not sure if it's exactly the one you're having Paul.

Starting nREPL server...
C:\dev\jdk\bin\java -Dfile.encoding=Cp1252 -XX:-OmitStackTraceInFastThrow ...
Connecting to local nREPL server...
Clojure 1.9.0-alpha14
nREPL server started on port 49659 on host - 
=> #object[clojure.lang.Namespace 0x4a3b4ff5 "c4e.datomic"]
(+ 1 1 1)
=> 3
(in-ns 'c4e.core)
=> #object[clojure.lang.Namespace 0x43d49221 "c4e.core"]
(+ 1 1 1)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: + in this context, compiling:(C:\Users\notanon\AppData\Local\Temp\form-init4674551064871749428.clj:1:1) 


You can see that I can find +, then i switch ns suddenly I can't find the symbol + any longer. This doesn't happen between every ns switch, for this project it seems to be my core ns that is the issue. In other projects I couldn't switch to anything else without the issue.


i probably should have reported this a couple months ago when i noticed it 😞 sorry


i never really had a problem using :repl-options { :init-ns myns.core } in my project.clj to just start in the ns i wanted, but i'm sure not everyone is happy with that arrangement