Calva: Continuously evaluating in infinite loop

Created on 31 Jul 2020  路  7Comments  路  Source: BetterThanTomorrow/calva

When I evaluate code from a source file, it evaluates it over and over in an infinite loop, printing the same results to the output.repl-file window. Its completely unusable.

For example, I just tried this file:

(ns dusk.core)
(println "hi")

when I run evaluate toplevel form in REPL window on the println line, I see output like tis in the output window:

; Evaluating file: core.clj
hi
nil
clj::dusk.core=> 
; Evaluating file: core.clj
hi
nil
clj::dusk.core=> 
; Evaluating file: core.clj
hi
nil
clj::dusk.core=> 
; Evaluating file: core.clj
hi
nil
clj::dusk.core=> 
; Evaluating file: core.clj
; Evaluating file: core.clj
hi
hi
nil
nil
clj::dusk.core=> 
clj::dusk.core=> 
; Evaluating file: core.clj
hi
nil
clj::dusk.core=> 
; Evaluating file: core.clj
; Evaluating file: core.clj
hi
nil
clj::dusk.core=> 
hi
nil
clj::dusk.core=> 

and it just keeps looping re-evaluating it forever, eating CPU and making VSCode completely unusable until I kill the nrepl connection.

I noticed this in the latest version, but I tried older versions and found that this problem started with version 2.0.109 (108 works perfectly).

bug

All 7 comments

Oh, oh. Does not look good at all. Do you have evalOnSave active? Thinking it could be something with that, that we have butchered...

I'm experiencing this issue as well. Turning off both evalOnSave and testOnSave and restarting VSCode did work around the issue.

Thanks. I'll check what's going wrong.

I've tested both evalOnSave and testOnSave and have narrowed it down to testOnSave. It works fine with evalOnSave enabled, but breaks when I enable testOnSave. Hope that helps.

In any case, I can work around it for now by simply disabling testOnSave :+1:

Fix is coming in a moment.

Great, thanks! I can confirm that its fixed.

TestOnSave: Check that the file saved is not the output window before loading file and running tests

Oh, wow, that's actually a pretty funny bug :smile: Glad you found and fixed it.

Haha, yeah, pretty crazy.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lspector picture lspector  路  5Comments

kstehn picture kstehn  路  4Comments

svdo picture svdo  路  4Comments

PEZ picture PEZ  路  3Comments

frankadrian314159 picture frankadrian314159  路  4Comments