calva icon indicating copy to clipboard operation
calva copied to clipboard

calva fails silently when nrepl middleware is not installed

Open jdkealy opened this issue 10 months ago • 2 comments

with repl output it shows

Image

with terminal output it shows

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
  }
}

upon installing nrepl middleware, everything works correctly.

jdkealy avatar Apr 17 '25 18:04 jdkealy

Thanks for making this issue. @PEZ I also had a coworker new to Clojure and Calva run into this issue in a work project.

Should we print a message to the output window, or show an information popup?

At first I was thinking printing a message would be good since the user will be looking at the test output anyway, but we need to be mindful of printing it to the same output destination as the test output if we want it to appear where the test results appear. A popup eliminates that concern and future-proofs against potential changes to what information goes to which output destination.

bpringe avatar May 10 '25 17:05 bpringe

I think we have a check for the info middleware op to be present and complain with a popup if it isn't. So I wonder if that message was shown when the nrepl middleware wasn't installed? We could maybe extend/fix that check if it wasn't shown.

But still, seems silly that Calva says it is running tests when it isn't going to do it so that messaging should be fixed in any case.

PEZ avatar May 11 '25 16:05 PEZ