Skip to content

[sourcekitd] Allow client to enable use of dispatch barriers for open/edit/close on the message handling queue #66013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 19, 2023

Previously, we relied on the client to make sure any open/edit/close request has finished executing before sending semantic queries about that updated source file, implicitly relying on clients to provide synchronization guarantees. This enables a mode in which sourcekitd can provide those synchronization guarantees:

By default, all behavior stays the same. After the client sends a source.request.enable_request_barriers request, sourcekitd will issue all open/edit/close requests as dispatch barriers. This makes sure that all requests after the open/edit/close will only start being handled after the open/edit/close has finished.

@ahoppen
Copy link
Member Author

ahoppen commented May 19, 2023

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented May 19, 2023

@swift-ci Please SourceKit stress test

@ahoppen ahoppen force-pushed the ahoppen/sourcekitd-barriers branch from 581ce83 to d4ffe40 Compare June 1, 2023 01:03
@ahoppen
Copy link
Member Author

ahoppen commented Jun 3, 2023

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Jun 5, 2023

@ahoppen
Copy link
Member Author

ahoppen commented Jun 5, 2023

@swift-ci Please test macOS

@ahoppen ahoppen changed the title WIP: Use dispatch barriers for open/edit/close on the message handling queue Use dispatch barriers for open/edit/close on the message handling queue Jun 6, 2023
@ahoppen ahoppen changed the title Use dispatch barriers for open/edit/close on the message handling queue [sourcekitd] Allow client to enable use of dispatch barriers for open/edit/close on the message handling queue Jun 6, 2023
@ahoppen ahoppen marked this pull request as ready for review June 6, 2023 18:06
@ahoppen ahoppen requested review from bnbarham and rintaro as code owners June 6, 2023 18:06
@ahoppen ahoppen merged commit 65e37f7 into swiftlang:main Jun 7, 2023
@ahoppen ahoppen deleted the ahoppen/sourcekitd-barriers branch June 7, 2023 19:47
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