Skip to content

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jan 13, 2024

  • Explanation: VS Code does not request diagnostics again for a document if the diagnostics request failed. Since sourcekit-lsp usually recovers from failures (e.g. after sourcekitd crashes), this is undesirable. Instead of returning an error, return empty results. This causes VS Code to re-request diagnostics after an edit is made, which will succeed after sourcekitd has been restarted.
  • Scope: The SourceKit-LSP diagnostics request after sourcekitd crashed
  • Risk: Very low, just returns empty results where it used to return an error
  • Testing: Manual testing of the change in Never return error for diagnostics request #981. This is functionally equivalent and trivial
  • Issue: SourceKit-LSP not reporting diagnostics #958 / rdar://117732149
  • Reviewer: @bnbarham

VS Code does not request diagnostics again for a document if the diagnostics request failed. Since sourcekit-lsp usually recovers from failures (e.g. after sourcekitd crashes), this is undesirable. Instead of returning an error, return empty results.
@ahoppen ahoppen requested a review from bnbarham January 13, 2024 01:23
@ahoppen ahoppen requested a review from benlangmuir as a code owner January 13, 2024 01:23
@ahoppen
Copy link
Member Author

ahoppen commented Jan 13, 2024

@swift-ci Please test

@ahoppen ahoppen merged commit 78c59db into swiftlang:release/5.10 Jan 17, 2024
@ahoppen ahoppen deleted the ahoppen/5.10/never-error-for-diagnostics-request branch January 17, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants