fix(nextflow): don't mark workspace scan flushed when both probes fail - #1872
Open
AmirF194 wants to merge 1 commit into
Open
fix(nextflow): don't mark workspace scan flushed when both probes fail#1872AmirF194 wants to merge 1 commit into
AmirF194 wants to merge 1 commit into
Conversation
_flush_deferred_workspace_scan sets _workspace_scan_flushed unconditionally after its two completion() flush attempts, even when both raised. A later find_referencing_symbols call then silently skips the flush and answers from a possibly-incomplete workspace AST cache for the rest of the session, with no exception and no retry. Fixes oraios#1871
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_flush_deferred_workspace_scansends twocompletionrequests to force the server's debounced workspace scan, then setsself._workspace_scan_flushed = Trueunconditionally after the loop, even when both requests raised._send_references_requestuses that flag to skip flushing on later calls, so if the scan was never actually forced, every laterfind_referencing_symbolsfor the rest of the session silently answers from a possibly-incomplete workspace AST cache, with no retry.Fix: only set the flag when at least one
completioncall did not raise; a total failure leaves it clear so the next call retries.Verification:
test/solidlsp/test_nextflow_workspace_scan_flush.py(new): drives_flush_deferred_workspace_scanagainst a fakeserver.sendwith no real language server process. Fails onmain(flag flipsTrueafter two failures) and passes on this branch; a second regression test pins the existing success path.ruff check/ruff format --checkandcodespellclean on the changed files.completioncalls would fail on a live server.Fixes #1871