cider

Joseph Ferano 2026-01-12T10:25:00.224349Z

A lot of modules I'm working on have (set! *warn-on-reflection* true), However, I can only view the warnings when I load or eval the whole buffer/file. I typically eval the last top level defun and this doesn't show any warnings. Since the buffer level eval is not automated, sometimes I'll miss the reflection warnings and commit and push up my code. Any recommendations on how to automate this so that I stop missing reflection warnings? Things that come to mind are save and magit commit hooks in emacs. eastwood also catches these warnings, and that might be a good option for a CI, but for now, how do y'all approach this?

Roma 2026-01-12T12:38:19.843209Z

I have (alter-var-root #'*warn-on-reflection* (constantly true)) in my user.clj.

Roma 2026-01-12T12:38:42.115519Z

But it will turn it on globally for the entire project

Joseph Ferano 2026-01-12T12:40:14.837889Z

Ah that might be a good way without needing to do something on the emacs side

vemv 2026-01-12T13:30:53.957889Z

This would work as well https://clojurians.slack.com/archives/C06MAR553/p1756827753587169

👍 2
🙌 1
vemv 2026-01-14T08:40:19.988539Z

Hadn't heard of. @alexyakushev would know better about this feature

oyakushev 2026-01-14T15:00:56.442519Z

@joseph286 It shouldn't break nrepl, that's for sure. Does this shell command work for you once you add the .nrepl.edn file?

clojure -Sdeps "{:deps {nrepl/nrepl {:mvn/version \"1.5.2\"}}}" -m nrepl.cmdline -i

👀 1
Joseph Ferano 2026-01-14T03:39:27.657619Z

I tried your solution, vemv, and it works just fine with a global version, however, I tried a local one because I want to check this into source control, however, when I added .nrepl.edn, it seems to have broken my nrepl or something because I can't connect Cider to it. Any idea what's going on?

Samuel Ludwig 2026-01-12T18:29:27.297049Z

Is it bad-form to frequently cider-ns-reload-all (or :reload-all in general, during development)? It seems to be causing my #malli library to misbehave (seems like some sort of registry business might be getting missed/not-properly reloaded, it's hard for me to tell if it's explicitly a bug on malli's side yet (though I did file https://github.com/metosin/malli/issues/1253)) edit: (hmm, I see now that it might be, I still don't fully understand how these syncing problems might happen- I'd think :reload-all would set my REPL state back to 0, more or less)

2026-01-13T12:08:10.850889Z

> I'd think :reload-all would set my REPL state back to 0, more or less :reload-all is tricky and depending on your system and the changes you made. It could leave it in an inconsistent state. That is why libraries like tools.namespace and clj-reload where created and also tools like components/integrant/mount etc exist. Here are some link of tricky situations from : • https://github.com/clojure/tools.namespace?tab=readme-ov-file#reloading-code-motivationhttps://github.com/tonsky/clj-reload?tab=readme-ov-file#comparison-evaluating-buffer • and the https://www.cognitect.com/blog/2013/06/04/clojure-workflow-reloaded which goes over why libs like tools.namespace aren't enough

2026-01-13T12:10:23.892239Z

https://www.youtube.com/watch?v=NtyGShlZH1Q from the last Conj that goes over the history and inspiration for components and the reloaded workflow