-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Files from outside "current project" adds to the problem count #1864
Comments
Thanks for reporting! Pinging @ericdallo. It might be something we need to tell clojure-lsp when that file closes. As for workarounds. A slightly less dramatic (depending on your usage of VS Code) way is to only reload the current window. One way to do so is to use the command Developer: Reload Window. You can even make the REPL survive this by starting it yourself and use Calva Connect instead of Jack-in. VS Code terminals survive window reloads. (Sadly this doesn't go for the Jack-in terminal yet.)
TIL. I didn't know about this command. Have been needing it! Anyway, this indicates that it might be a VS Code problem. We'll see. |
I think it makes sense to count the errors while the file is opened but I agree that after receiving a |
Fixed on clojure-lsp master, please test the nightly build |
I might not understand something, but using a "nightly" does not seem to have fixed the problem.
Expectation: The "Problem count" would fall to 2 which it was initially. |
@PEZ is that related to Calva not downloading nightly properly? |
@ericdallo It might be related. @jacobemcken A new version of Calva was released since your last comment that fixed an issue with the nightly build download. I would try it again and see if the problem persists. |
Tried again this morning using Calva version [2.0.304] - 2022-09-20. Same problem (as in: the problem count goes somewhat down, but only around half... see screenshots about for example) |
@ericdallo do you want me to create an issue over at https://github.com/clojure-lsp/clojure-lsp ? or is the bug somewhere else?... the nightly did reduce the number of warnings (see above screenshots). |
@jacobemcken is there any repro I can try? The fix I made should fix cases like that |
Thanks for your patience @ericdallo The reason why only some linting warnings would disappear once I closed the external file, was because I also had the clj-kondo VS Code extension installed. I don't know how many months I've been running double linting checks 😱 Now that I've uninstalled that clj-kondo, I can verify that |
Good, I think that 's more common that you think. |
It appears I thought it was a good idea to remove that warning in the past 😅: #1091. Sorry @jacobemcken! I think we should add that back... |
I find the following behavior in Calva (lsp?) a bit annoying:
Expected behavior:
The "problem" count goes back down, when the file is closed.
Actual behavior:
The problems from the "external" file lingers and now drown my "real" problems.
Workaround:
Restart VS Code.
Also worth noting:
Clear Document Diagnostics
doesn't seem to work on "outside files". I reopen the problematic outside file in the hope that I can "clear diagnostics" and then quickly close it again before the problems are picked up.The text was updated successfully, but these errors were encountered: