Skip to content

Wait for request to be sent to sourcekitd before cancelling it in SwiftSourceKitPluginTests.testCancellation #2088

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 3 commits into from
Mar 26, 2025

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 25, 2025

Otherwise, the cancellation could get handled before the request actually gets sent to sourcekitd, which is not what we want to test here. There appears to be a second underlying issue that causes unexpected results when we cancel the fast completion request after sending the slow completion request. I’ll look at that in a follow-up PR.

@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2025

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2025

@swift-ci Please test Windows

…iftSourceKitPluginTests.testCancellation`

Otherwise, the cancellation could get handled before the request actually gets sent to sourcekitd, which is not what we want to test here. There appears to be a second underlying issue that causes unexpected results when we cancel the fast completion request after sending the slow completion request. I’ll look at that in a follow-up PR.
@ahoppen ahoppen force-pushed the cancellation-issue branch from 13cadb9 to 92f3c77 Compare March 25, 2025 21:08
@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2025

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 25, 2025

@swift-ci Please test Windows

ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Mar 25, 2025
… and `timeoutTask` in `withTimeout` and `withTaskPriorityChangedHandler`

I have not been able to reason out any concrete issues that this might fix but these are my best guesses to fix the underlying issue of swiftlang#2088
ahoppen added 2 commits March 25, 2025 19:12
…n element/substring

This also prints the sequence and expected element on failure, which is useful for debugging.
Undo the escaping of `\` in paths on Windows.
@ahoppen
Copy link
Member Author

ahoppen commented Mar 26, 2025

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 26, 2025

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Mar 26, 2025

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 4883ee7 into swiftlang:main Mar 26, 2025
3 checks passed
@ahoppen ahoppen deleted the cancellation-issue branch March 26, 2025 21:39
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.

2 participants