This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-07
Channels
- # announcements (16)
- # asami (15)
- # babashka (12)
- # beginners (38)
- # calva (32)
- # cider (1)
- # clj-commons (9)
- # clj-otel (4)
- # clojure (57)
- # clojure-europe (43)
- # clojure-korea (1)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-uk (4)
- # clojuredesign-podcast (9)
- # clojurescript (10)
- # cursive (5)
- # datahike (9)
- # deps-new (2)
- # events (1)
- # fulcro (8)
- # hyperfiddle (7)
- # kaocha (1)
- # lsp (2)
- # malli (3)
- # nrepl (2)
- # off-topic (19)
- # releases (3)
- # ring (10)
- # shadow-cljs (4)
- # sql (14)
- # xtdb (57)
- # yamlscript (2)
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!