Fork me on GitHub

I’m suddenly experiencing a show stopper bug which appears to be coming from the Calva extension. Running VScode SSH’d into a remote server and running a REPL: On AWS EC2, Running VScode on a Mac, Using Clojure CLI. • Backspace suddenly stops working (though seems to work if I hold down shift SHIFT + Backspace , backspace works as normal in non clj files) • Can no longer run and calva commands (registers CTRL+ALT+C in bottom bar but any command following the command log disappears with nothing happning) • Slurping and Barfing of parens stops working • Can’t CTRL-C to stop the REPL in the VScode terminal • Works upons restarting VScode or uninstalling/reinstalling the extension


Possible reason: Working with a relatively large amount of data both at the REPL and reading into memory. Though this seems very opaque to me.


Calva doesn't handle large results well. It's high up on our todo.


Yea I saw that it is in the Clojurists together plans.


Just checked with DevOps and it seems that the CPU is maxing out. Despite no code changes since yesterday. So this seems to prevent me from backspacing/performaing calva commands and stopping the REPL in VScode.


Do you have anything that evaluates something expensive and/or large when you load a file?


There is some functions but all code is actually behind a (comment …) at the moment and I’m driving it.


So it’s pretty much just helper functions at the moment. That gets evaluated on load.


Then there shouldn't be a reason for things hanging....


That’s why I am very confused. We can’t even SSH into the server now so it’s likely this was just an early warning sign to a larger issue… I found it curious how I was unable to stop the REPL in the VScode terminal etc but could still edit the file (with the caveat of behaviours above) and could backspace normally in other non clj files.


Ok so after a full day of troubleshooting it is definitely a Calva related issue. I would assume it’s got to do with large data structures sent to the REPL. As the file size is ~850 lines aside from a few other namespaces which are significantly smaller and are all inside a comment block.


Even large data structures shouldn't get the cpu to max out. Sounds like something else is going on. But it is very hard to diagnose from what I know about the issue.


Yea it’s super bizarre. I’ve noticed that when I read in a few files, print them the slurping and barfing gets a little slower. Whatever is happening their is a cascading slow down and ultimately a failure where I can’t even stop the REPL and even to the point of not being able to SSH into server. Unfortunately I won’t be able to share the code as is and haven’t got the time to sanitise it.


@grounded_sage Have you tried reproducing whatever you may have run up to that point of slow down but outside of Calva / VS Code, and then monitored the container's CPU before and after? That might help determine if Calva is the culprit.


I’m quite invested in VScode and it would take me an uncertain amount of time to get the remote setup with repl etc running. Then coordinating with someone who has access/knows their way around the AWS. I’m just going to cross my fingers it auto resolves itself or at least holds off long enough for me to complete this project at work.


Ah I see. Well let us know if you happen to gain more info related to Calva.