Fork me on GitHub

A humble reminder for Calva friends: Please consider subscribing to the CalvaTV Youtube channel.

📺 15
calva 20
❤️ 9

I see what you did there, @UJZ6S8YR2!

😁 3
Fahd El Mazouni14:05:45

Hello everyone ! I'm kind of stuck and my googling skills seem to be lacking... Is there a way to configure evaluation timeout in calva ? I'm trying to evaluate a form in a cljs repl


There is no such config. Maybe you can wrap the evaluations in something that times out? And then use custom repl commands to wrap it.

Fahd El Mazouni14:05:53

that's the thing I kind of don't want it to time out, you think I can manage to launch my evaluation in the background and have it run something once it's done to print the result ?

Fahd El Mazouni14:05:07

(sorry btw full disclosure I'm a clojure beginner)


So it times out?

Fahd El Mazouni14:05:23

yes it does ! I wanted to configure it out of existence 😛

Fahd El Mazouni15:05:54 I found this, but it's cider specific, and I can't find much in nrepl docs


I also found that one 😃 Seems it is possible in CIDER so maybe it is something we should support in Calva. Also there is talk there about async and sync calls, which I don’t quite follow…


Maybe @U051BLM8F can shed some light on it for me.

Fahd El Mazouni15:05:40 this is the function that gets called to evaluate any code "selection" ? and I couldn't find any mention of "Eval timed out!" so I guess it must be coming from nrepl ?


There's no sync requests in nREPL, but Emacs doesn't handle async APIs well and I have implemented a simulation of sync requests - basically a function that waits for a response.


That's dangerous, though, as it can lock-up the client that's why there's also some timeout associated with it. At any rate - that's just Emacs stuff that you can disregard completely.


I see. So this timeout @U9W44J4RW gets is happening in ClojureScript?


It must be. It's certainly not happening in nREPL.


My google fu fails me, but at least now I know where to ask. Thanks for your super high service level, @U051BLM8F! ❤️


Good find, @U9W44J4RW! Doesn’t look all that configurable, though…

Fahd El Mazouni15:05:30

thanks guys ! got the answer thanks to you !


Actually yes, I read it sloppily.


Tell us a bit more about what it is you want to do. Maybe we can figure something out together, or maybe we will realize that we need an issue to track a feature request.