Fork me on GitHub
#conjure
<
2021-05-30
>
borkdude10:05:44

@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?

borkdude11:05:27

I have a new binary you can test if you want

Olical11:05:44

Ohh interesting! Thank you so much! I'd be more than happy to test it yeah.

Olical11:05:36

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.

Olical11:05:05

I'll probably have to do some patch elf magic since I'm on NixOS 😅

Olical11:05:07

But thanks!

Olical11:05:10

might be fine

Olical11:05:13

Thank you so much

borkdude11:05:24

yeah, the static should be good in nixos

Olical11:05:04

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

Olical11:05:57

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

Olical11:05:13

However that conjure.internal on the end of the exception name is the namespace I think... let me confirm

Olical11:05:47

Yes, it is indeed

borkdude11:05:29

ah slight formatting thing?

Olical11:05:30

Possibly just needs a new line or space to separate the printed namespace name from the exception? Or a new line?

Olical11:05:33

I think so

Olical11:05:55

Will debug my end to check that's how the nREPL message is formatted and it's not my doing

Olical11:05:58

; 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"]}

Olical11:05:08

Yeah, deffo from the nREPL server, I can change it if you want?

Olical11:05:03

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.

borkdude12:05:25

Thanks, merged. New binary is building