Closed bendlas closed 2 years ago
Note: on JDK11 with com.kohlschutter.junixsocket/junixsocket-core
, this works as well.
Probably another wrong type annotation? @rlbdv can you look into this?
Yep.
I'll see if I can set things up to reproduce the problem, but also wondered if we already knew what class was being passed as the channel
in that socket.clj (.write ...)
?
@bendlas I was trying to follow your instructions, and the lein run
command fails because refactor-nrepl.middleware
is mssing. I'm guessing either I don't have something set up right, or that's a local file?
I reckon you can change the command to
lein with-profile +nrepl run -m clojure.main -e "(do (require 'nrepl.server) (require 'cider.nrepl.middleware) (nrepl.server/start-server :socket \"nrepl.sock\" :handler (apply nrepl.server/default-handler cider.nrepl.middleware/cider-middleware)))"
i.e. with the refactor-nrepl middleware removed. refactor-nrepl almost certainly has nothing to do with the issue so it's safe to remove it.
Great - I can at least reproduce it.
Got it - should be able to post a fix tomorrow.
Great, thanks for the update!
This should be fixed in nREPL 0.9.0-beta5.
Expected behavior
Connecting to nrepl and evaluating forms via unix domain socket connection works on latest JDK
Actual behavior
After connecting successfully, evaluating forms throws
java.nio.HeapByteBuffer cannot be cast to class [Ljava.nio.ByteBuffer;
Steps to reproduce the problem
I used the following method:
Connect from emacs cider.el with https://github.com/clojure-emacs/cider/pull/3088
I couldn't figure out how to connect from
nrepl.cmdline
(sorry), but I'm reasonably confident that the problem is in the cider middlware, because when starting the server without middleware, the connection works.Environment & Version information
[nrepl/nrepl "0.9.0-beta4"]
[cider/cider-nrepl "0.27.2"]
cider-nrepl version
0.27.2
Java version
17.0.1
Operating system
NixOS Linux