Skip to content

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Sep 5, 2025

We can't poll the index using workspace/synchronize because that elevates the priority of the indexing requests in a non-deterministic order (due to the way withTaskPriorityChangedHandler is implemented using polling). If LibB's priority gets elevated before LibA's, then LibB will get prepared first, which is contrary to the background behavior we want to check here

Fixes #2281

We can't poll the index using `workspace/synchronize` because that elevates the priority of the indexing requests in a non-deterministic order (due to the way `withTaskPriorityChangedHandler` is implemented using polling). If LibB's priority gets elevated before LibA's, then LibB will get prepared first, which is contrary to the background behavior we want to check here

Fixes swiftlang#2281
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.

Test failure observed in CI: SourceKitLSPTests.BackgroundIndexingTests testTargetsAreIndexedInDependencyOrder
2 participants