-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassCastException in cider middleware, when evaluating forms through an unix domain socket connection #727
Comments
Note: on JDK11 with |
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 |
@bendlas I was trying to follow your instructions, and the |
I reckon you can change the command to
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:
lein with-profile +nrepl run -m clojure.main -e "(do (require 'nrepl.server) (require 'cider.nrepl.middleware) (require 'refactor-nrepl.middleware) (nrepl.server/start-server :socket \"nrepl.sock\" :handler (apply nrepl.server/default-handler (conj cider.nrepl.middleware/cider-middleware #'refactor-nrepl.middleware/wrap-refactor))))"
Connect from emacs cider.el with clojure-emacs/cider#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
The text was updated successfully, but these errors were encountered: