calva

jlmr 2025-08-18T16:43:53.528599Z

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?

jlmr 2025-08-19T18:18:00.148009Z

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?

jlmr 2025-08-19T18:38:41.697509Z

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?

jlmr 2025-08-19T18:43:48.857859Z

There is pprint button in the status bar and clicking it fixed it 🎉

jlmr 2025-08-19T18:44:08.983269Z

I am surprised it works this way but whatever 🤷

pez 2025-08-19T18:58:31.022789Z

I’m equally surprised, but good to know! Thanks for reporting back! 🙏

pez 2025-08-18T16:56:08.834289Z

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.

wevrem 2025-08-18T20:22:41.498759Z

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.

pez 2025-08-18T20:28:12.459599Z

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.

wevrem 2025-08-18T20:32:48.849779Z

I think it might be related to the new release of clojure-lsp and its new cyclic-dependency linter.

pez 2025-08-18T20:34:53.220629Z

Sounds plausible. You can pin the previous version of clojure-lsp, in Calva settings.

pez 2025-08-18T20:35:16.752819Z

Or disable that linter for now.

wevrem 2025-08-18T20:44:38.042489Z

I disabled it for now. Thanks for the tip.

seancorfield 2025-08-18T20:54:53.562749Z

See #lsp -- I ran into this too, and opened two new issues against LSP for it.

seancorfield 2025-08-18T20:55:13.460829Z

It treats require inside comment as contributing to cyclic deps, as well as :as-alias.

Tommi Martin 2025-08-19T05:26:40.976829Z

edit: misunderstood a command, my message was not relevant, removed it. Downgrading Clojure Lsp to 2025.06.13-20.45.44 fixes the issue