mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 10:19:02 +00:00
fix(ls): re-raise LS termination from pull-diagnostics fallback
request_text_document_diagnostics swallowed all SolidLSPException from textDocument/diagnostic and fell back to published diagnostics. When the process had already died, that bypassed tools_base restart-and-retry and silently returned empty diagnostics. Re-raise when is_language_server_terminated(); keep the published- diagnostics fallback for other pull-diagnostics failures. Fixes #1770
This commit is contained in:
1 parent
c958aa0235
commit
f4ecb1a5bd
2 files changed
+8
No files matched your search
@@ -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 <Name>` declarations reported a `selectionRange` pointing at the `module`
|
||||
keyword instead of at `<Name>`, so looking up hover/references from a module symbol's position
|
||||
returned the keyword's own docs instead of the module's #925
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user