This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-01
Channels
- # announcements (5)
- # aws (2)
- # babashka (35)
- # beginners (68)
- # bristol-clojurians (1)
- # calva (14)
- # cider (9)
- # clj-commons (5)
- # clojars (3)
- # clojure (101)
- # clojure-australia (6)
- # clojure-europe (35)
- # clojure-italy (2)
- # clojure-nl (5)
- # clojure-spec (1)
- # clojure-uk (4)
- # clojurescript (70)
- # conjure (3)
- # cursive (7)
- # datomic (36)
- # emacs (11)
- # exercism (1)
- # fulcro (23)
- # helix (2)
- # jobs-discuss (15)
- # lsp (17)
- # malli (8)
- # meander (1)
- # nrepl (60)
- # off-topic (10)
- # pedestal (9)
- # react (8)
- # reagent (53)
- # reveal (10)
- # shadow-cljs (27)
- # spacemacs (4)
- # tools-build (4)
- # tools-deps (4)
- # xtdb (2)
@bozhidar Hey. I released #nbb v0.0.82.
nbb nrepl-server :port 1337
works when you connect with lein repl :connect 1337
$ lein repl :connect 1337
Connecting to nREPL at 127.0.0.1:1337
Could not resolve symbol: nrepl.core/versionniluser=>
nil
user=> (require '["fs" :as fs])
nil
user=> (fs/existsSync "README.md")
false
user=> (js/process.cwd)
"/private/tmp"
@bozhidar somehow when I cider-connect
to the server, I get:
It also seems to try System/getProperty
which isn't available. Should I try something else?
Ah, no. That's for the classpath. I guess we should make this conditional or something, as I doubt the classpath makes sense in nodejs.
nbb does have a classpath but it's more like CLJS (without the JVM, let's say self-hosted) than anything else
something like this: https://github.com/viesti/nrepl-cljs-sci/commit/f172d5f7898be844d7434b2972cfb063a116cf33#diff-6d49d64b8894e5627407513f159ee5dd92efd3897361dc0a673e567540c27a03
that "lisp expression" probably cause by cider sending stuff to eval which then throws
I pushed nbb v0.0.83 with a small fix: noticed (require 'cljs.core)
was done which it failed on, this should work now
Yes, the babashka nrepl works great with CIDER but there was also some ironing out of details that went on there
@bozhidar So with cider-connect-cljs custom
I do get a REPL buffer that works. Just the part of sending an expr to the REPL buffer doesn't work
I wonder if there could be a way to "negotiate" what the nrepl server we'r connecting to actually is. But I guess cider-connect-cljs
close to what a sci over node would be
I remember trying cider-connect-cljs custom
too, but I don't now remember what the problem was
probably tries to send some preamble that then fails to eval and cider is left wondering what happened
We are charting new territory here as lumo didn't even have an nREPL. I hope @bozhidar will be open to helping us out to get this thing in the air :).
Well, as long as we don't even some Clojure code from CIDER we should be good. It will require a bit more work than for Babashka, but I don't expect it will be hard to accommodate nbb.
(defun cider--babashka-version ()
"Retrieve the underlying connection's Babashka version."
(with-current-buffer (cider-current-repl)
(when nrepl-versions
(nrepl-dict-get nrepl-versions "babashka"))))
(defun cider--babashka-nrepl-version ()
"Retrieve the underlying connection's babashka.nrepl version."
(with-current-buffer (cider-current-repl)
(when nrepl-versions
(nrepl-dict-get nrepl-versions "babashka.nrepl"))))
(defun cider-runtime ()
"Return the runtime of the nREPl server."
(cond
((cider--clojure-version) 'clojure)
((cider--babashka-version) 'babashka)
(t 'generic)))
I found out that evaluation for #nbb works fine in a .clj
buffer but just not in a .cljs
buffer
To get things rolling, I posted an issue here: https://github.com/clojure-emacs/cider/issues/3061