Closed liquidz closed 1 year ago
Can you also include the forms that are evaluated normally in the REPL? This is easier for me to reproduce than to look at the bencode directly :)
Sure!
d2:op4:eval4:code3:1 2e
Forms are 1 2
.
But these forms may be treated separately in the REPL, so I could not reproduce this problem in the REPL...
Welcome to nbb v1.1.156!
user=> 1 2
1
user=> 2
user=>
Clojure 1.11.1
user=> 1 2
1
2
user=>
So are you not typing the code in the REPL but talking to an nbb nREPL server programmatically?
Right. I have tested my nREPL client with nbb's nREPL server and noticed a difference with clojure's nREPL server. https://github.com/liquidz/deno-nrepl-client/blob/fbdeb7411734b53d5f4bfffdb814a43fd097dd8f/integration_test.ts#L85-L89
Thanks, makes sense. The babashka nREPL server does work correctly, right?
bb nrepl-server returns correct three responses as same as clojure!
d 2:id 7:unknown 2:ns 4:user 7:session 4:none 5:value 1:1 e
d 2:id 7:unknown 2:ns 4:user 7:session 4:none 5:value 1:2 e
d 2:id 7:unknown 7:session 4:none 6:status l 4:done e e
I've been looking into a solution but it will take a little longer before I have a good solution
Work in progress in this branch: https://github.com/babashka/nbb/compare/nrepl-multiple-exprs nREPL works, but have to clean up
Publishing as 1.1.158
version
1.1.156
platform
macOS 13.1 node v16.15.0
problem
nrepl server returns lacked response for multiple form evaluation
repro
npx nbb@1.1.156 nrepl-server
nc localhost [PORT NUMBER]
eval
messaged2:op4:eval4:code3:1 2e
1
is lacked.expected behavior
nrepl/nrepl returns the following three responses (spaces are added for visibility)
Steps to confirm expected responses:
clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"}}}' -M -m nrepl.cmdline
nc localhost [PORT NUMBER]
eval
messaged2:op4:eval4:code3:1 2e