Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stub files analyzing #2465

Open
isacjunior opened this issue Mar 25, 2024 · 5 comments
Open

Stub files analyzing #2465

isacjunior opened this issue Mar 25, 2024 · 5 comments
Labels

Comments

@isacjunior
Copy link
Contributor

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

@bpringe bpringe added the lsp label Mar 25, 2024
@bpringe
Copy link
Member

bpringe commented Mar 25, 2024

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
Copy link
Member

bpringe commented Mar 25, 2024

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

@isacjunior
Copy link
Contributor Author

Do you mean in the problems pane, like below?

Yes
Screenshot 2024-03-26 at 09 40 13

@ericdallo
Copy link
Contributor

@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 🤔

@isacjunior
Copy link
Contributor Author

isacjunior commented Apr 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants