core-typed

2024-03-01T20:10:59.805929Z

Thinking of proposing a Clojurists Together project to add caching to Typed Clojure type checking results, similar to clj-kondo's. Still not sure if it's a good idea, but it's been on my mind for a while.

2024-03-11T02:29:45.583399Z

would tools namespace refresh wipe out that cache? Perhaps one of the reasons why clj-kondo is seeing more uptake is just its different process model, where you can run clojure-lsp / eglot out of process and get red squiggles in emacs, and there's no complication in tools namespace blowing out the cache (?). The promise of static analysis for me is zero REPL session dependency.

2024-05-05T05:14:05.978669Z

what about just type checking outside of the repl process, in a separate process, you could start up a second repl if you wanted, but that other process would auto sync files changes on disk. is that something you considered or even available today ?

2024-03-11T18:16:57.069989Z

> would tools namespace refresh wipe out that cache? No, but when a refresh is triggered we'll need to compare the source code changes to see whether to invalidate parts of the cache (similar to clj-kondo). What I'm aiming for in practice is to only recheck a top-level form if its source code changes or any type/macro dependencies change. > Perhaps one of the reasons why clj-kondo is seeing more uptake is just its different process model, where you can run clojure-lsp / eglot out of process and get red squiggles in emacs, and there's no complication in tools namespace blowing out the cache (?). For sure everyone loves repl-less verification, also clj-kondo is more usable in many other dimensions. I don't know how to do that in Typed Clojure yet. The tradeoff without a repl is that all macros need custom rules and verifying host interop becomes harder. But Typed Clojure is trending in that direction. Whether it will ever get there, I'm not sure.

❤️ 1
2024-05-06T19:01:27.150379Z

@jasonjckn there's no special support for it. I considered a remote type checking server/client model, but didn't flesh it out. remote nrepl basically does the same thing, and that should work.

👍 1
2024-03-01T20:12:26.045309Z

At my most optimistic I've tried to design a per-top-level-form cache for type checking. Probably easier on a per-namespace level.

👍 1