From 73e5371db1bd01a67bce3e3c679c3efb4410fe09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20P=C5=99evr=C3=A1til?= Date: Mon, 1 Jul 2024 19:19:23 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20LSP=20do=20not=20recompile?= =?UTF-8?q?=20excluded=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wake/lsp/lsp_compiler.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wake/lsp/lsp_compiler.py b/wake/lsp/lsp_compiler.py index 7aed49732..942b2e12b 100644 --- a/wake/lsp/lsp_compiler.py +++ b/wake/lsp/lsp_compiler.py @@ -1414,6 +1414,11 @@ async def on_progress(downloaded: int, total: int) -> None: for path, errors in errors_per_file.items(): await self.__diagnostic_queue.put((path, errors)) + # only recompile files we are interested in + files_to_recompile = { + p for p in files_to_recompile if not self.__file_excluded(p) + } + if len(files_to_recompile) > 0: # avoid infinite recursion if files_to_recompile != files_to_compile or full_compile: