Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuously evaluating in infinite loop #712

Closed
danielytics opened this issue Jul 31, 2020 · 7 comments
Closed

Continuously evaluating in infinite loop #712

danielytics opened this issue Jul 31, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@danielytics
Copy link

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).

@PEZ
Copy link
Collaborator

PEZ commented Jul 31, 2020

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

@PEZ PEZ added the bug Something isn't working label Jul 31, 2020
@chrisfarber
Copy link

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

@PEZ
Copy link
Collaborator

PEZ commented Aug 1, 2020

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

@danielytics
Copy link
Author

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 👍

@PEZ
Copy link
Collaborator

PEZ commented Aug 1, 2020

Fix is coming in a moment.

@danielytics
Copy link
Author

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 😄 Glad you found and fixed it.

@PEZ
Copy link
Collaborator

PEZ commented Aug 1, 2020

Haha, yeah, pretty crazy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants