This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-30
Channels
- # babashka (3)
- # beginners (1)
- # cider (2)
- # clara (6)
- # clj-kondo (15)
- # clojure (7)
- # clojure-germany (11)
- # clojurescript (1)
- # conjure (27)
- # core-async (10)
- # cursive (3)
- # datahike (5)
- # datomic (2)
- # figwheel-main (1)
- # fulcro (8)
- # heroku (8)
- # leiningen (8)
- # music (1)
- # off-topic (8)
- # polylith (13)
- # reitit (54)
- # shadow-cljs (2)
- # xtdb (13)
@olical I am looking into the conjure babashka nrepl issue now. Would the issue be fixed if we printed:
user=> (nth [] 3)
java.lang.IndexOutOfBoundsExceptionuser REPL:1:1
for that error?I think that'll be enough information, although the full verbose output with context etc that you get at the REPL would be amazing some day, I appreciate that it might not be accessible from the right part of the code though. Honestly just knowing roughly where the error came from and what it is will help a lot.
Assuming linux: https://19505-201467090-gh.circle-artifacts.com/0/release/babashka-0.4.4-SNAPSHOT-linux-amd64-static.tar.gz
This is more for a user of Conjure than myself, I don't use bb toooo much right now, but I want to have first class integration since it's so amazing. The fact that I can just do nvim foo.clj
and then eval immediately is pretty fun. Great for demoing Conjure and teaching
Ah! So I get the exception and line / char now (fantastic!!!)
; eval (file): .../conjure/dev/clojure/src/dev/bb-sandbox.clj
; (err) java.lang.IndexOutOfBoundsExceptionconjure.internal /home/olical/repos/Olical/conjure/dev/clojure/src/dev/bb-sandbox.clj:7:1
However that conjure.internal on the end of the exception name is the namespace I think... let me confirm
Possibly just needs a new line or space to separate the printed namespace name from the exception? Or a new line?
Will debug my end to check that's how the nREPL message is formatted and it's not my doing
; eval (root-form): (nth test-vector 3)
; debug: send
{:code "(nth test-vector 3)"
:column 1
:file "/home/olical/repos/Olical/conjure/dev/clojure/src/dev/bb-sandbox.clj"
:id "8fd9f968-e959-4135-8763-71ffe83e4584"
:line 7
:nrepl.middleware.print/options {:associative 1 :length 500 :level 50}
:nrepl.middleware.print/print "conjure.internal/pprint"
:ns "bb-sandbox"
:op "eval"
:session "aa17d859-08c2-4530-be0f-0e079ee879b4"}
; debug: receive
{:err "java.lang.IndexOutOfBoundsExceptionbb-sandbox /home/olical/repos/Olical/conjure/dev/clojure/src/dev/bb-sandbox.clj:1:1
"
:id "8fd9f968-e959-4135-8763-71ffe83e4584"
:session "aa17d859-08c2-4530-be0f-0e079ee879b4"}
; (err) java.lang.IndexOutOfBoundsExceptionbb-sandbox /home/olical/repos/Olical/conjure/dev/clojure/src/dev/bb-sandbox.clj:1:1
; debug: receive
{:ex "class java.lang.IndexOutOfBoundsException"
:id "8fd9f968-e959-4135-8763-71ffe83e4584"
:root-ex "class java.lang.IndexOutOfBoundsException"
:session "aa17d859-08c2-4530-be0f-0e079ee879b4"
:status ["eval-error"]}
; debug: receive
{:id "8fd9f968-e959-4135-8763-71ffe83e4584"
:session "aa17d859-08c2-4530-be0f-0e079ee879b4"
:status ["done"]}
https://github.com/babashka/babashka.nrepl/pull/41 I hope that looks okay! I think it's correct to always put a space between the loc-str and whatever comes before it.