This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-18
Channels
- # announcements (6)
- # babashka (137)
- # beginners (115)
- # biff (4)
- # calva (24)
- # cider (1)
- # clj-kondo (15)
- # cljs-dev (18)
- # cljsrn (1)
- # clojure (43)
- # clojure-australia (1)
- # clojure-europe (11)
- # clojure-germany (3)
- # clojure-nl (3)
- # clojure-spec (40)
- # clojure-uk (6)
- # clojured (1)
- # clojurescript (24)
- # code-reviews (14)
- # core-logic (5)
- # cursive (24)
- # datahike (2)
- # datomic (3)
- # deps-new (9)
- # events (5)
- # figwheel-main (1)
- # fulcro (7)
- # helix (3)
- # honeysql (8)
- # jobs (4)
- # jobs-discuss (7)
- # lsp (59)
- # malli (9)
- # mid-cities-meetup (1)
- # nrepl (2)
- # off-topic (27)
- # portal (11)
- # re-frame (16)
- # reitit (1)
- # releases (12)
- # remote-jobs (4)
- # shadow-cljs (48)
- # spacemacs (1)
- # vim (9)
- # xtdb (14)
A humble reminder for Calva friends: Please consider subscribing to the CalvaTV Youtube channel. https://www.youtube.com/c/CalvaTV/
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. https://calva.io/custom-commands/
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 ?
(sorry btw full disclosure I'm a clojure beginner)
yes it does ! I wanted to configure it out of existence 😛
https://github.com/clojure-emacs/cider/issues/2616 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.
https://github.com/BetterThanTomorrow/calva/blob/a1afb5799bc8f1e4063badb8964f462b1da7dfcc/src/nrepl/index.ts#L289 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?
I wrote more about this in CIDER's docs - https://docs.cider.mx/cider/1.1/usage/code_evaluation.html#synchronous-vs-asynchronous-evaluation
it's here ! https://github.com/bhauman/lein-figwheel/blob/master/sidecar/src/figwheel_sidecar/repl.clj
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…
thanks guys ! got the answer thanks to you !
:repl-eval-timeout is mentioned in this change log 😛 https://cljdoc.org/d/figwheel-sidecar/figwheel-sidecar/0.5.20/doc/changelog