Fork me on GitHub
#calva
<
2023-10-08
>
dabrazhe13:10:25

When running a lengthy sequence, eg a map I have issues with Interrupt current evaluation: When invoked it only interrupts one 'pass' of the map function. Then it jolly continues to the next one. Is there a way to interrupt map over the whole sequence? I am using Calva with babashka in this case

borkdude13:10:03

You can set print-length

borkdude13:10:46

But you can’t interrupt an evaluation since Thread/stop is deprecated in native image and also in JDK21 onwards

dabrazhe13:10:47

My way around it for now is to kill the repl and reevaluate everything, a rather nuclear approach... There should be a more graceful way to interrupt the map function, should't it? )

borkdude13:10:06

I wish there was

dabrazhe13:10:39

Here is the observation. When writing in a file in map over a sequence an exception (eg file not found) would effectively interrupt the whole map sequence. I would want to achieve the same with Calva interrupting evaluations

pez13:10:18

You are welcome to file an issue about that. Though I think it is best directed at nrepl, where there might already be one. Once someone figures out if there is a solution, and what it would be, we can implement that in Babashka as well.

borkdude13:10:39

This used to work in nREPL but will stop working in JDK21+ upon which bb is also based

borkdude13:10:51

There is probably already an issue about it

dabrazhe13:10:59

There seems much fuss about JDK21 lately, and not all of it is about improvements : )

dabrazhe13:10:05

Do you mean smth similar to this issue ? https://github.com/nrepl/nrepl/issues/296

borkdude13:10:58

Yep that’s the one

✔️ 1
dabrazhe13:10:50

The hopes seem to be no so high on resolving this..

pez14:10:56

I added an issue on Calva about it as well: https://github.com/BetterThanTomorrow/calva/issues/2324

👍 1
dabrazhe10:02:30

Hi. When clojure cli is not installed, Calva is throwing this message. It can still run the babashka repl et al., so is it necessary or can it be suppressed? (I don't need clojure cli per se).

borkdude10:02:34

I guess clojure-lsp shells out to the clojure CLI

borkdude10:02:50

instead it could also shell out to deps.clj which comes with Calva I guess