calva

Shantanu Kumar 2025-11-12T05:06:42.917949Z

Hi, in a multi-module (each having its own deps.edn) project, the wrong arity calls across modules are not flagged in red. What am I missing? Do I need to configure something? (I have CIDER-nREPL running and connected.)

pez 2025-11-12T11:48:37.378309Z

You will need to have a deps.edn that puts all other modules together, preferrably at the project root. When opening that project in VS Code Calva should start the clojure-lsp server using this deps.edn and build the classpath from that.

Shantanu Kumar 2025-11-12T11:50:08.874619Z

I already aliased modules using :local/root in the root deps.edn.

pez 2025-11-12T12:05:38.306139Z

Great, And which clojure-lsp server is serving the project? You can check where the white dot is in the menu that opens clicking the clojure-lsp button in the statusbar.

Shantanu Kumar 2025-11-12T12:07:34.428669Z

I see root lsp-server (Active) serving it.

pez 2025-11-12T12:15:34.733759Z

Cool. I suspect it is something with the classpath. Do you see what you expect doing something like clojure -Spath | tr ':' '\n' from the project root?

Shantanu Kumar 2025-11-12T12:17:15.936739Z

The classpath is alright, and the regular flagging on arity error is happening. It's only a corner case of chained referencing across def forms where the flagging doesn't happen.

Shantanu Kumar 2025-11-12T12:36:00.868259Z

I created a repro case - in repro.core/foo the call to u/bar is not flagged.

pez 2025-11-12T13:05:55.820609Z

Calva relies entirely on clojure-lsp for this, so you may get some better input on this asking in #lsp

👍🏽 1
Shantanu Kumar 2025-11-12T05:13:51.824829Z

Even within the same module, wrong arity is not flagged.

Shantanu Kumar 2025-11-12T05:47:15.619739Z

FWIW, the .cpcache file is not generated in the module. (In another project where flag-on-arity-error works, the module has a project.clj too and .cpcache file is generated under the module.)

Shantanu Kumar 2025-11-12T06:25:07.237569Z

Some troubleshooting later, this looks like a corner case - the flagging is absent only when I have chain of references across def forms. (I generated .cpcache with clojure -Spath, which does not help.)