Cannot interrupt running evaluations on JDK 21+
When interrupting an evaluation while using JDK 21, I get the following message:
ERROR: Cannot stop thread on JDK21+ without -Djdk.attach.allowAttachSelf enabled, see https://nrepl.org/nrepl/installation.html#jvmti.
This option should probably be included by default in all Java REPL connect sequences so the interrupt evaluations feature is able to work.
Thanks. We could include that option by default I think. Probably best to inject it in the various command lines. So that you get a proper command line copied if you use Copy Jack-in Command Line.
@alexander-yakushev, How does CIDER handle this? I think you have once told me, but I have forgotten. 😄
See https://nrepl.org/nrepl/installation.html#jvmti and https://docs.cider.mx/cider/basics/up_and_running.html#enabling-nrepl-jvmti-agent.
Thanks! When cider-enable-nrepl-jvmti-agent is enabled, do you inject the allowAttachSelf option in the jack-in command line, or do you set it in the jack-in enviroment?
Not sure I understand what the "jack-in environment" is. We add it to jack-in command arguments.
Cool. I'm thinking it could be done by executing the command in an environment with JAVA_TOOL_OPTIONS set to allow the attachments. Calva has a jackInEnv setting where it could fit. But maybe it makes more sense to add it to the command options.