Did something change recently with regards to nrepl middleware? I use Calva together with Reveal (and deps), and had it set up so that each evaluation got sent to Reveal. Now I can’t seem to get it to work anymore. To trace the problem I removed all my own customizations and tried according to https://calva.io/reveal/#middleware but output only shows up in Reveal when tap>ed.
Anyone got any hints on how to get my old workflow working again?
It last worked sometime last week, I think Thursday. Can’t find anything in the changelog that would have an effect on this. To further try and track it down I made a minimal test case:
1. Manually start a repl from the command line with nrepl, cider-nrepl and reveal.
2. Connect calva to the running repl, and eval some code (+ 1 1). --> Evaluation works fine (I see the result 2 inline) but no output in Reveal.
3. As an extra test connect [Parle](https://github.com/kanej/parle) to the same repl and eval the same code (+ 1 1) --> Evaluation works fine, and I see the same output in Reveal 🤯.
Is there any reason these two repl-clients (Calva and Parle in this case) would trigger different behaviour in the reveal-nrepl-middleware?
Ok I might have found something (using Flowstorm):
Reveal nrepl middleware checks whether the key :pprint in the nrepl request equals 0. If so the output is not displayed (if I’ve read [the code](https://github.com/vlaaad/reveal/blob/master/src/vlaaad/reveal/nrepl.clj#L13) correctly).
When Calva sends an nrepl request this :pprint key is set to 0 so nothing is outputted.
When Parle sends an nrepls request the :pprint key is absent so the output is printed.
Is there any way I can influence this behaviour in Calva?
There is pprint button in the status bar and clicking it fixed it 🎉
I am surprised it works this way but whatever 🤷
I’m equally surprised, but good to know! Thanks for reporting back! 🙏
No recent changes around this. How long ago did it work? You can scan the changelog to see if there is anything suspicious. Or let Copiolt in the GitHub web ui do it.
I just reloaded the Calva extension (so I think it is at 2.0.524) and clojure-lsp is going crazy with thousands of errors claiming cyclic dependencies. Which is not the case, I've very carefully used :as-alias.
Sounds awful! There are no changes in Calva recently that are related, I am pretty sure. Which version of clojure-lsp have you configured? Maybe you can shut down clojure-lsp and nuke the .lsp/cache and .clj-kondo/cache and then start clojure-lsp again and see if that helps.
I think it might be related to the new release of clojure-lsp and its new cyclic-dependency linter.
Sounds plausible. You can pin the previous version of clojure-lsp, in Calva settings.
Or disable that linter for now.
I disabled it for now. Thanks for the tip.
See #lsp -- I ran into this too, and opened two new issues against LSP for it.
It treats require inside comment as contributing to cyclic deps, as well as :as-alias.
edit: misunderstood a command, my message was not relevant, removed it.
Downgrading Clojure Lsp to 2025.06.13-20.45.44 fixes the issue