Fork me on GitHub
#cider
<
2024-05-07
>
oyakushev07:05:51

To adventurous folks who are as frustrated by the inability to interrupt eval on JDK21+ as I am – you are welcome to try out the current 1.2.0-beta1 version that contains the fix (https://github.com/nrepl/nrepl/pull/318) and tell if this works for you! Just follow these steps: 1. In Emacs do M-x customize-variable cider-injected-nrepl-version => 1.2.0-beta1. 2. Add -Djdk.attach.allowAttachSelf to the JVM options of your build tool. For tools.deps, this means adding -J-Djdk.attach.allowAttachSelf to command-line arguments. For Leiningen, add -Djdk.attach.allowAttachSelf to :jvm-opts in project.clj. 3. Jack in into some project with Java 21 or newer, evaluate (while true). 4. Verify in htop that 1 core is 100% utilized. 5. Interrupt evaluation in CIDER, check in htop that CPU is not spinning anymore. 6. Continue using nREPL and enjoy the proper interruptible-eval behavior!

👀 2
👏 8