cursive

danielcompton 2026-02-17T09:33:23.832529Z

I’m not sure whether this is a Cursive issue or clj-kondo issue but recently I’ve been seeing stale warnings about unresolved-var for vars that were added in another module. Editing both the source var or the reference to it to try and refresh the cache didn’t work, and neither did deleting the cache. Does Cursive have some other cache as well I need to try to clear?

p-himik 2026-05-27T14:58:18.815179Z

Just stumbled upon this as well, albeit with function arities. I had something like

(defn f [a b c]
  ...)

(defn g []
  (let [f (fn [a b c d]
            ...
            (f a b c))]
    (f 1 2 3 4)))
When I moved the body of f from inside the let and into the f var, expanding its arity to 4, the f in (f 1 2 3 4) got highlighted with a wrong arity error. Updated clj-kondo, updated IDEA, restarted everything - the error is still there. Huh, but when I removed .clj-kondo/.cache, the error got fixed immediately. I forgot to try clj-kondo from the CLI though. :(

borkdude 2026-05-27T14:59:33.932309Z

could there be something in cursive that isn't updating the screen or so?

p-himik 2026-05-27T15:00:01.635299Z

Wouldn't that be handled by an IDE restart that I did?

borkdude 2026-05-27T15:00:10.545699Z

yeah, a cache file would be nice. see the issue that Compton posted here https://github.com/clj-kondo/clj-kondo/issues/2842 and my replies

p-himik 2026-05-27T15:01:56.767239Z

Right, I'll send it over if I ever manage to stumble upon the issue again. One thing that might be worth noting is that the previous version of clj-kondo that I had when the error appeared was probably from a year ago, if not older. And there were a bunch of directories in the cache with 2019 in their name, plus a v1 one. Now there's just v1.

cfleming 2026-05-28T06:20:55.916909Z

If there are any theories about what Cursive could do differently here, I'd love to hear them! The kondo inspections use a different infrastructure to the "normal" IntelliJ ones, and I'm not as familiar with it, it's possible there's something I need to do to refresh it under certain circumstances

danielcompton 2026-02-17T09:33:48.499189Z

This is with deps.edn

cfleming 2026-02-17T09:42:45.926279Z

No, for the kondo warnings Cursive only uses kondo itself, and doesn't have any additional caching. If you run kondo in some other way, do you see the same warnings?

borkdude 2026-02-17T09:44:04.637819Z

were you adding the other vars by hand or by some other tool?

borkdude 2026-02-17T09:44:32.657249Z

oh you edited both sources, then there should not be any problem

borkdude 2026-02-17T09:44:42.860659Z

yeah try from the command line

souenzzo 2026-02-17T09:48:48.578179Z

I've recently been having this problem, but it's resolved by restarting. It feels that some 'daemon' is failing Suddenly, several things stop working, usually related to the use/non-use of variables, even inside the form of a small function.

cfleming 2026-02-17T09:50:26.779339Z

I'd be interested to know if you see the same running kondo on the command line when it happens @souenzzo. Cursive itself doesn't cache, but IntelliJ may have some internal caching of the external annotation. If we can't figure it out I can add some debug logging for when it happens.

👍 1
souenzzo 2026-02-17T10:18:17.608329Z

I'll keep an eye out next time and let you know.

👍 1
2026-02-17T14:54:54.433799Z

Can confirm I've also experienced this.

2026-03-01T20:08:37.516579Z

I just noticed that I still had a file watcher configured that ran the clj-kondo binary whenever a clojure file was changed. https://github.com/clj-kondo/clj-kondo/blob/master/doc/editor-integration.md#intellij-idea Could this have interfered with Cursive also running clj-kondo? Also, the clj-kondo binary it was running was an older version. I've disabled the file watcher, will see if I still get this behaviour.