calva icon indicating copy to clipboard operation
calva copied to clipboard

Stub files analyzing

Open isacjunior opened this issue 1 year ago • 5 comments

When a project is opened, the Calva is watching the stubs files path/.lsp/.cache/stubs and sending it to clojure-lsp to analyze and problems are shown on terminal. Interestingly, if the stub file noisy is opened and later close, the warning from VS Code fade away.

image

isacjunior avatar Mar 25 '24 20:03 isacjunior

Thanks for the issue.

Calva is watching the stubs files path/.lsp/.cache/stubs and sending it to clojure-lsp to analyze and problems are shown on terminal.

Can you clarify what you mean by "problems are shown on terminal"? Do you mean in the problems pane, like below? image

bpringe avatar Mar 25 '24 20:03 bpringe

Adding context here from Slack from @ericdallo.

The clojure-lsp stub is a clojure-lsp feature which uses clj-easy/stub lib to generate dummy clojure files to have clj-kondo analysis, so for example one would get auto complete for datomic.api for example, a lib which is closed source

This feature spawns under the hood a clj process which exports the ns and vars, it's only enalbed if one has a :stub setting in clojure-lsp config

Slack thread: https://clojurians.slack.com/archives/CBE668G4R/p1676552690524579

bpringe avatar Mar 25 '24 21:03 bpringe

Do you mean in the problems pane, like below?

Yes Screenshot 2024-03-26 at 09 40 13

isacjunior avatar Mar 26 '24 12:03 isacjunior

@isacjunior do you opened that api.clj file at any moment? since that folder is not in the classpath, I would expect clojure-lsp to only report diagnostics if you manually open that file 🤔

ericdallo avatar Mar 27 '24 17:03 ericdallo

@ericdallo no, I do not open that file. Just opening the VSCode and the problems in the terminal is shown.

isacjunior avatar Apr 23 '24 15:04 isacjunior