calva icon indicating copy to clipboard operation
calva copied to clipboard

Inform about that Interrupt Evaluation does not awlays work on JVM 20+

Open PEZ opened this issue 2 years ago • 2 comments

With JVM 20, Thread.stop() was removed, making interrupting evaluations sometimes fail, because that's what nREPL falls back to, if Thread.interrupt() fails. See:

  • https://github.com/nrepl/nrepl/issues/296

Calva could probably detect this failure somehow, and inform the user about it. Possibly linking to the nREPL issue, to get more people's brains on the problem.

PEZ avatar Oct 08 '23 14:10 PEZ

Looks like the nrepl issue has been resolved.

For now, I got past this by updating my nrepl jack-in dependency to 1.3.0 in my vscode settings.json under calva.jackInDependencyVersions and adding :jvm-opts ["-Djdk.attach.allowAttachSelf"] to the main dev alias in my repo's deps.edn

I assume there's a way to set this config at the repo level so I don't have to get each person on my team to follow that step, but I'm not very familiar with Calva's configuration options 🫣

sanguivore-easyco avatar Nov 21 '24 23:11 sanguivore-easyco

Thanks for sharing! We should consider bumping the version and providing an option to add those jvm opts to the environment.

You can set the calva.jackInDependencyVersions setting in .vscode/settings.json in the project. Commit that file and Calva users in your team will have it. There's a command for opening that file, search for “JSON” in the Command Palette and you should see it.

PEZ avatar Nov 21 '24 23:11 PEZ