emacs-lsp / lsp-treemacs

lsp-mode :heart: treemacs
GNU General Public License v3.0
403 stars 48 forks source link

Error list keeps showing old cached results after the first render #155

Open setzer22 opened 1 year ago

setzer22 commented 1 year ago

I've updated my emacs packages, and I noticed this issue. It seems to be related (or identical) to #149, but I've been able to reproduce this in other language servers I use (clojure and rust), which leads me to believe it is a general issue with lsp-treemacs itself, and not something that depends on the language.

The problem is the following: When I open a project, LSP diagnostics work okay in the buffer, and the first time I launch lsp-treemacs-error-list, I see the correct output. If I then make any changes to my LSP setup, lsp-treemacs-error-list keeps showing the old errors indefinitely. I haven't found a way to make it refresh the contents other than restarting emacs.

This is a quick screen recording of my interaction: emacs_bug

I was able to successfully bisect the issue to the following commit: e66865623ca1fa4a5a7b6f81901dc5ed21a58acc

Unfortunately, the commit is large enough that I cannot continue debugging without a better understanding of the codebase. This seems to be a caching issue, and the fact there's multiple references to caches in the commit source makes me believe that is the case.

zoechi commented 1 year ago

Same issue working with Rust

shapr commented 1 year ago

Same issue with Haskell

SreenivasVRao commented 1 year ago

Same with lsp-java and lsp-treemacs-references.

yyoncho commented 1 year ago

Unable to repro. Can you verify that it does not work with M-x lsp-start-plain?

SreenivasVRao commented 1 year ago

(updated my comment to mention lsp-treemacs-references which was causing problems on DOOM emacs.)

M-x lsp-start-plain works fine. thanks for the tip @yyoncho - wasn't aware of this one before. Unsure what's causing this then.