This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-02
Channels
- # announcements (7)
- # atom-editor (3)
- # babashka (8)
- # beginners (38)
- # biff (5)
- # calva (17)
- # cider (26)
- # clj-kondo (6)
- # clojure (49)
- # clojure-europe (47)
- # clojure-norway (19)
- # clojure-sweden (2)
- # clojure-uk (1)
- # clojurescript (22)
- # cursive (20)
- # datahike (1)
- # datomic (6)
- # etaoin (2)
- # honeysql (2)
- # hyperfiddle (36)
- # jobs-discuss (19)
- # leiningen (15)
- # malli (5)
- # off-topic (8)
- # overtone (1)
- # pathom (15)
- # pedestal (8)
- # polylith (4)
- # releases (1)
- # ring (5)
- # schema (10)
- # shadow-cljs (17)
- # timbre (3)
- # xtdb (17)
Hello. Any ideas why Calva with Error Lens seems to display out-of-date error messages?
It’s probably to do with how VS Code is updating the clojure-lsp server. You can try reproduce it in a minimal file while observing the clojure-lsp message logging.
I’m thinking that when the file changes, the clojure-lsp server needs to know this and that if this update doesn’t happen, then the analysis will be on the old content.
Even after I make further changes to this file, save it, etc - the message is still here.
Yes, that’s the one. (Though I do not know what to expect to be there, but maybe we can form a hypothesis from what we see there.)
• Calva asks LSP for info about currently edited symbol
• LSP responds with, for example, invalid symbol json/read-tr
• After the fix is made, Calva repeats the ask for this symbol, no errors returned this time but old message is still left there.
It’s not really Calva doing this. Calva role is that it introduces VS Code and clojure-lsp: “Hi VS Code, say hello to clojure-lsp. clojure-lsp, this is VS Code.” And then Calva leaves the conversation and lets them talk to each other. This is probably VS Code failing to invalidate some cache properly. See if you can find any issues about it on the vscode repository. It probably isn’t Calva/clojure-lsp specific.