calva

pez 2025-04-17T08:19:30.612159Z

I am hereby making April 17 Calva’s official birthday. 😃 https://www.linkedin.com/posts/cospaia_my-wife-asked-me-about-when-calva-celebrates-activity-7318543796214939648-4MuS 🎉

🎂 9
🙏 2
🎉 8
jdkealy 2025-04-17T15:48:51.381639Z

When i try to run tests in the repl, it does this

clj꞉dte.repl꞉> 
; Running test: timesales-cache-insertion-test…
; Running test: timesales-cache-insertion-test…
; Running test: timesales-cache-insertion-test…
; Running test: timesales-cache-insertion-test…
; Running test: timesales-cache-insertion-test…
; Running test: timesales-cache-insertion-test…
; Running test: timesales-cache-insertion-test…
I was in a test and used the keybinding to run that test. In other words, I tried 7 times and it never actually runs the test.

pez 2025-04-17T15:53:55.146539Z

Have you loaded the namespace?

pez 2025-04-17T15:55:07.274159Z

Also, long shot. Is the output maybe printed to some other destination? like the terminal output is what I generally recommend.

pez 2025-04-17T15:56:59.180129Z

While asking Grok to explain MCP for me it told me there already is a Calva MCP server. Turns out that MCP.so has found indexed the repo. 😃 https://mcp.so/?q=calva

jdkealy 2025-04-17T16:15:41.517759Z

I loaded the namespace. And that doesn't seem to be it, and don't see any terminal output. Are the tests meant to run in the REPL or command line tests ?

pez 2025-04-17T16:17:47.960099Z

Calva is supposed to run your tests and show you the results, and update problems list and such. What’s your output destinations setting?

jdkealy 2025-04-17T16:46:23.422029Z

the repl

jdkealy 2025-04-17T16:46:36.786509Z

"calva.outputDestinations": { "evalResults": "repl-window", "evalOutput": "repl-window", "otherOutput": "repl-window" }

pez 2025-04-17T16:49:28.763469Z

OK. FYI (unrelated to the problem at hand) I recommend to use "terminal" as the output instead. The repl-window is a bit unstable.

jdkealy 2025-04-17T16:49:43.102999Z

cool thanks

pez 2025-04-17T16:50:42.266079Z

I’m still figuring on why the tests are not run. (Or at least why we don’t see anything about it.) I do recognize the screenshot, but can’t recall what it was about right now.

jdkealy 2025-04-17T16:53:18.274229Z

terminal for all 3 outputs ?

jdkealy 2025-04-17T16:55:35.969549Z

when i try the terminal for all 3, i see

To reveal this terminal, use the command  Calva: Show/Open the Calva Output Terminal .

See also the Calva Inspector: 

Running test: calculate-ema-test…
TypeError: Cannot read properties of undefined (reading 'results')

pez 2025-04-17T17:03:20.109149Z

Yes, I use terminal for all three. Ah, so there’s something going wrong that we now get informed about at least. There’s a command for enabling nrepl message logging. Maybe we can see something there that gives us an idea.

jdkealy 2025-04-17T17:16:24.000969Z

1744910167382 ->| not sent! (not supported by the server) 
{
  op: 'test-var-query',
  id: '16',
  session: 'd3bc65d5-872d-42c3-80b0-3c9d363b8031',
  'var-query': {
    'ns-query': { exactly: [Array] },
    search: 'calculate-ema-test',
    'test?': true
  }
}

jdkealy 2025-04-17T17:17:36.391499Z

this is odd

1744910229325
looks like a datomic id and i am using datomic

pez 2025-04-17T17:35:41.864339Z

It’s a timestamp, iirc

😂 1
pez 2025-04-17T17:36:46.581709Z

Maybe cider-nrepl middleware is lacking. Based on the message.

jdkealy 2025-04-17T17:37:27.029529Z

ooh thank you!!!

jdkealy 2025-04-17T17:45:49.935719Z

sweet... Thank you so much for your help!

🙏 1
pez 2025-04-17T17:49:27.516489Z

Please file an issue about it. Calva should inform you about this instead of just silently lying about that it is running the tests.

jdkealy 2025-04-17T18:43:49.871689Z

will do. Wow this is so much better than emacs. I used to comment out all my tests in the test file and re-evaluate the file with a (run-tests) at the bottom to focus on just one test 🙂

jdkealy 2025-04-17T18:44:16.097769Z

Im sure it was possible with emacs to do test focus, just never had a UI to set the key bindings so easily.

pez 2025-04-17T19:21:19.854669Z

It’s CIDER infrastructure we are using, so no doubt it’s there. But VS Code does have a sweet UI for keybindings. Levering the power of search, as a lot of other things in VS Code.

jdkealy 2025-04-17T15:51:02.794749Z

Also I wanted to say, I'm super pumped on using this https://github.com/PEZ/calva-mcp-server

jdkealy 2025-04-19T16:12:53.199299Z

My MCP server / Claude deleted my bash profile and my macbook's keychain file and i lost a day thinking i'd been hacked.

😱 1
jdkealy 2025-04-19T23:58:54.116129Z

i literally think Calva + MCP will be like the singularity event in my coding lol

pez 2025-04-17T15:52:06.500979Z

Haha, how did you find it?

pez 2025-04-17T15:52:54.649939Z

I tried to vibe code it at first and now I have a bloody mess to clean up. But I am getting there, slowly.

jdkealy 2025-04-17T15:57:30.945109Z

I googled it, I'm your lone star

jdkealy 2025-04-17T15:57:47.780559Z

first result. Calva MCP server https://github.com/PEZ/calva-mcp-server

jdkealy 2025-04-17T15:58:15.693449Z

I refresh this every day like a kid waiting for christmas https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.calva-mcp-server

pez 2025-04-17T15:59:16.059669Z

Haha. Interesting that you were looking for it. So means I am not the only one who thinks it could be useful. PMF!

jdkealy 2025-04-17T15:59:41.590119Z

I think it could become the most powerful gen-ai tool and everyone will wish they knew clojure

pez 2025-04-17T15:59:57.815169Z

We dream alike!

jdkealy 2025-04-17T15:59:58.295269Z

the feedback loop will be insane

pez 2025-04-17T16:00:59.351119Z

I think so too. Looking forward to record some demos!

jdkealy 2025-04-17T16:01:08.191739Z

I really am addicted to my key bindings in emacs but I am weaning myself off bc the potential in VS code.

pez 2025-04-17T16:02:01.616549Z

With some luck I am only a few days from being able to package a that can do something.

🔥 2
2025-04-17T23:37:13.789989Z

Er - what if it suggests (clojure.java.shell/sh "rm -rf") and tries it out to make sure of the syntax

pez 2025-04-17T23:43:55.956539Z

Then you are toast!

pez 2025-04-17T23:44:41.276329Z

YOLO and all that.

pez 2025-04-17T23:45:55.471599Z

Actually, I don’t know what to do about that. This can happen without a REPL though, since the agents execute shell code.