clj-kondo

https://github.com/clj-kondo/clj-kondo
2020-10-09T03:06:47.132600Z

Yup, clj-kondo analysis data has everything I'd need. The row/col location of each var in each file and their name and doc is all there

2020-10-09T03:07:05.132800Z

And I maintain my own cache of it on a per-project basis in Emacs

fiddlerwoaroof 2020-10-09T18:41:44.133Z

Is there a way to configure it to just re-use the cache I already have? It's not a huge deal, but it'd be a bit nicer to only actually compute that data once

borkdude 2020-10-09T18:43:09.133200Z

anakondo uses its own cache. the format in .clj-kondo/.cache is an implementation detail which is not supposed to be used by other tools since it can change (it doesn't change often, but it could happen)

fiddlerwoaroof 2020-10-09T19:14:57.133500Z

That makes sense, it'd be nice if there was a canonical database of analysis data that other tools could hook into.

borkdude 2020-10-09T19:16:29.133700Z

I think it's better if tools keep their own caches, caching is hard enough as it is

borkdude 2020-10-09T19:17:53.133900Z

But it's likely that when you use anakondo to build up its cache, clj-kondo's cache will be populated as a side effect as well

2020-10-09T23:20:57.134100Z

I can also say that in practice, I've not seen any performance impact even on a 10 year old laptop that can't even run Google Chrome without crashing. The biggest issue for me right now is the initial time to analyse a project, and the fact that it blocks Emacs while doing that initial analysis. Most of the time there is taken by the Java analysis, not clj-kondo, so even then I don't think from clj-kondo's perspective its that big a problem for now.

2020-10-09T23:21:44.134300Z

Also, syncing Emacs with a file based cache wouldn't be that simple, probably requiring its own cache for it 😛

2020-10-09T23:22:46.134500Z

What I have wondered though is more, if I decide to save my own cache to a file, so on Emacs restart you don't need to re-analyse the project, if I should re-use the clj-kondo's folder, or have my own folder, or store it within Emacs's own folder, etc.