Fork me on GitHub
#scittle
<
2022-11-20
>
genRaiy12:11:36

Trying to use the nrepl with Clojure (not bb ... I know, what am I thinking)

genRaiy12:11:58

and it seems like the deps are this

:deps
 {;; For starting the nrepl
  http-kit/http-kit            {:mvn/version "2.6.0"}
  io.github.babashka/sci.nrepl {:git/sha "b75700da7797f9fc2b4ef1bef9df7230f9fd1e8c"}}

genRaiy12:11:13

if you don't include http-kit you see this

clj
Clojure 1.11.1
user=> (require '[sci.nrepl.browser-server :as nrepl])
Execution error (FileNotFoundException) at sci.nrepl.browser-server/eval140$loading (browser_server.clj:1).
Could not locate org/httpkit/server__init.class, org/httpkit/server.clj or org/httpkit/server.cljc on classpath.

borkdude12:11:38

yes, this is because httpkit is built into bb

genRaiy12:11:44

I'll add a PR for the JVM docs if you like

genRaiy12:11:22

the nREPL actually works with cursive but it complains too much so it's not sparking joy

genRaiy12:11:43

Connecting to remote nREPL server...
Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}""#error {:message \"Unable to resolve classname: java.io.PrintWriter\", :data {:type :sci/error, :line 2, :column 3, :message \"Unable to resolve classname: java.io.PrintWriter\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 2, :column 3, :file nil, :ns #object[Ao cursive.repl.runtime]})}], :file nil}, :cause #object[Error Error: Unable to resolve classname: java.io.PrintWriter]}"Error initialising completion
Error: 
"#error {:message \"Could not find namespace clojure.reflect.\", :data {:type :sci/error, :line 2, :column 3, :message \"Could not find namespace clojure.reflect.\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 2, :column 3, :file nil, :ns #object[Ao cursive.repl.runtime.class]})}], :file nil}, :cause #object[Error Error: Could not find namespace clojure.reflect.]}"Error initialising class completion
Error: 
Error initialising locals clearing:
"#error {:message \"Could not resolve symbol: *compiler-options*\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: *compiler-options*\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cursive], :file nil} {:line 1, :column 1, :ns #object[Ao cursive], :file nil, :sci.impl/f-meta nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: *compiler-options*\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cursive], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cursive], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"(+ 1 2)
=> 3
Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cursive], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cursive], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"(in-ns 'cljs-ui)
=> nil
Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"@dimension
=> 3
Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"@backing-grid
=> #js[#js[nil nil nil] #js[nil nil nil] #js[nil nil nil]]
Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"@backing-grid
=> #js[#js[:X nil nil] #js[:X nil nil] #js[nil nil nil]]
Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"(update-grid 1 1 :X)
=> 3
Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"Error updating completions:
"#error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line 1, :column 1, :message \"Could not resolve symbol: cursive.repl.runtime/completions\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[Ao cljs-ui], :file nil})}], :file nil, :phase \"analysis\"}, :cause #error {:message \"Could not resolve symbol: cursive.repl.runtime/completions\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \"analysis\"}}}"

borkdude12:11:27

JVM PR is fine.