Skip to content

Conversation

akyrtzi
Copy link
Contributor

@akyrtzi akyrtzi commented Jun 20, 2017

rdar://32769873

master: #10388

… ignore them and only return the syntactic parser diagnostics (swiftlang#10388)

This makes sure that diagnostics returned for a particular state of source buffer are consistent and accurate.
rdar://32769873
@akyrtzi
Copy link
Contributor Author

akyrtzi commented Jun 20, 2017

@swift-ci Please test

@akyrtzi
Copy link
Contributor Author

akyrtzi commented Jun 20, 2017

Explanation: While edits are occurring in the Xcode editor sourcekitd may return diagnostics that refer to a previous state of the source, until they get cleared once the latest source version is typechecked. With large source files that take long to typecheck this can lead to an experience of 'lingering' stale diagnostics. The commit makes changes to make things more clear and consistent and avoid returning 'stale' diagnostics, that refer to a previous version of the source, as response to edits.
Scope: Only affects sourcekitd and the way it reports diagnostics as part of edit responses.
Radar: rdar://32769873
Risk: Low
Testing: Added regression tests

@akyrtzi akyrtzi merged commit c7fc620 into swiftlang:swift-4.0-branch Jun 20, 2017
@akyrtzi akyrtzi deleted the sourcekit-stale-diags-fix-4.0 branch June 20, 2017 20:43
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.

1 participant