diff --git a/CHANGELOG.md b/CHANGELOG.md index 8284b3e2..cf014908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,9 @@ Status of the `main` branch. Changes prior to the next official version change w and the request used to map diagnostics onto owning symbols just threw. `AnsibleLanguageServer` now overrides that request to return `None` directly, so diagnostics fall back to being grouped under the file-level path as already documented #1758 + - Fix: pull-diagnostics fallback in `request_text_document_diagnostics` no longer swallows + `LanguageServerTerminatedException`, so a crash during a diagnostics pull triggers the existing + language-server restart path instead of silently returning no diagnostics #1770 - Fix: F#'s `module ` declarations reported a `selectionRange` pointing at the `module` keyword instead of at ``, so looking up hover/references from a module symbol's position returned the keyword's own docs instead of the module's #925 diff --git a/src/solidlsp/ls.py b/src/solidlsp/ls.py index f76bb5fe..1d117dba 100644 --- a/src/solidlsp/ls.py +++ b/src/solidlsp/ls.py @@ -966,6 +966,11 @@ class SolidLanguageServer(ABC): } ) except SolidLSPException as ex: + # Termination must propagate so tools_base can restart the LS and retry. + # Other pull-diagnostics failures (e.g. unsupported method without crash) + # still fall back to published diagnostics. + if ex.is_language_server_terminated(): + raise log.debug("Falling back to published diagnostics for %s due to pull-diagnostics error: %s", relative_file_path, ex) response = None pull_diagnostics_failed = True