-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
babashka.nrepl - Emacs Cider "Lisp Expression:" minibuffer prompt when switching projects #3182
Comments
Some stack trace would be very useful. Otherwise it's really hard to guess what might be going wrong. |
I used
This part of the codes gets ran, but because Lines 596 to 599 in 9130c64
Checking if the value is |
It looks like this was also a fix for an old bug: |
After doing some more digging: The reason this breaks is because So then the question is if CIDER wants to implement a safety net for this case (for example, check if the value is nil before calling |
I wonder if there's something else we can evaluate to get the classpath for bb, or if system properties make some sense for bb in general. @borkdude any thoughts/suggestions about this? |
@bbatsov I think the issue is not babashka. Babashka has |
@borkdude So in some cases these methods might be missing? Is this what's happening here? I'm just not sure what should be the right workaround for this particular issue. |
@bbatsov In general nREPL should only assume the nREPL protocol and not too much about the exact implementation right, whether it's a JVM, Node.js, Python, whatever runtime? Why is there a specific discussion about |
@borkdude Because of this bit Lines 596 to 599 in 9130c64
Generally, I agree with you, but in practice it's useful to evaluate a bit of Java code here and there instead of rolling out middleware for trivial things. CIDER has been historically coupled with Clojure, that's why we might have abused this reaching out to eval things here and there. |
Perhaps that should gracefully deal with errors then? |
No, that wouldn't be right. Each such evaluation should be handled depending on its context. From what I'm hearing I guess that if this blows up it's fine to just assume the |
I think this could be fixed by adding a check before calling the Then |
Expected behavior
Connect to babashka.nrepl like any other Clojure NREPL server.
Actual behavior
When connecting to to a babashka.nrepl server everything seems to work fine until I try to switch files (mostly from another project) Emacs will keep prompting "Lisp Expression:" in the minibuffer. Sometimes it also completely locks my Emacs instance.
Steps to reproduce the problem
lein run
(code example below)Lisp expression:
should pop upEnvironment & Version information
Minimal Emacs config (Only install clojure + cider)
Minimal babashka nrepl setup:
CIDER version information
Emacs version
29.0.50
Operating system
Linux Laptop 5.16.14-1-MANJARO
Notes
I initially opened an issue at babashka.repl babashka/babashka.nrepl#50 but was redirected here.
The text was updated successfully, but these errors were encountered: