Hi, @borkdude - I think I found some extreme edge-cases on nbb nREPL. Basically, if I connect to nREPL, evaluate something, and immediately disconnect (without waiting for the REPL to send the responses) it crashes with:
node:events:505
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}
Not really a problem because I fixed on my end (it was actually a somewhat annoying behavior that was causing some undesired logs on my tests) but I decided to inform anyway, if it's something you want to fix 🙂nice, feel free to make a github issue with nbb
Ok, done 🙂
Another question: does bb or nbb support the :line option for nRepl eval? I am seeing some weird behavior, still not sure if it's on my end or not (basically, the line is being ignored)
Clojure itself does this via metadata: https://github.com/clojure/clojure/blob/2a058814e5fa3e8fb630ae507c3fa7dc865138c6/src/clj/clojure/main.clj#L143C40-L143C40 At least the eval-file thing is supported by SCI
Feel free to post issues about the nREPL line thing
Metadata? It seems that's explicit on line 150, right? Where it says (.setLineNumber (if (and line (or eval-file (not= pre-line line))) line line-number))
I'll post issues, thanks! Just wanted to be sure it was nothing on my end 🙂
What does it do?
:line sets the current line. So if I evaluate (defn something []) and say that :line 3, the metadata for #'something will say that it was defined on line 3