-
Notifications
You must be signed in to change notification settings - Fork 304
Merge main into release/6.2 #2162
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
bnbarham
merged 21 commits into
swiftlang:release/6.2
from
bnbarham:20250519-manual-merge
May 22, 2025
Merged
Merge main into release/6.2 #2162
bnbarham
merged 21 commits into
swiftlang:release/6.2
from
bnbarham:20250519-manual-merge
May 22, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This way we can log them when a sourcekitd request crashes and we can thus replay these contextual requests when diagnosing the crash.
Teach `sourcekit-lsp diagnose` how to extract contextual requests from the system log and use them to reduce sourcekitd crashes.
Generally helpful to get a hint about whether an open source toolchain is used and to help with toolchain discovery issues.
…kScheduler` A queued task might have been cancelled after the execution ask was started but before the task was yielded to `executionTaskCreatedContinuation`. In that case the result task will simply cancel the await on the `executionTaskCreatedStream` and hence not call `valuePropagatingCancellation` on the execution task. This means that the queued task cancellation wouldn't be propagated to the execution task. To address this, check if `resultTaskCancelled` was set and, if so, explicitly cancel the execution task here. Fixes an issue I saw in CI during PR testing.
…down This is what `shutDown()` is documented to do. I also remember having this check before, it might have gotten lost during a rebase when I was working on swiftlang#2081. I noticed this while investigating swiftlang#2152: In this case `buildTarget/prepare` was cancelled because the SourceKit-LSP server was shut down but indexing of a file was still started after the shutdown now that preparation had finished (because it was cancelled).
Previously Package.swift referred a non-existent CMakeLists.txt file and used old URLs for the swift-tools-support-core repository, leading to the following build warnings: warning: 'sourcekit-lsp': Invalid Exclude '/Users/wilfred/src/sourcekit-lsp/Sources/DocCDocumentation/CMakeLists.txt': File not found. warning: 'swift-package-manager': 'swift-package-manager' dependency on 'https://github.com/swiftlang/swift-tools-support-core.git' conflicts with dependency on 'https://github.com/apple/swift-tools-support-core.git' which has the same identity 'swift-tools-support-core'. this will be escalated to an error in future versions of SwiftPM. warning: 'swift-driver': 'swift-driver' dependency on 'https://github.com/swiftlang/swift-tools-support-core.git' conflicts with dependency on 'https://github.com/apple/swift-tools-support-core.git' which has the same identity 'swift-tools-support-core'. this will be escalated to an error in future versions of SwiftPM.
Log the path that SourceKit-LSP was launched from
Fix race condition that causes task cancellation to be missed in `TaskScheduler`
Do not schedule any new tasks in `TaskScheduler` if it has been shut down
…request Log contextual requests that affect sourcekitd’s global state
Resolve paths passed in the SwiftPM configuration to the project root
Adopt the option introduced by swiftlang/swift#81507. SourceKit-LSP uses explicit cancellation and perform any implicit cancellation inside sourcekitd. Fixes swiftlang#2021 rdar://145871554
Add more code owners
This became a required parameter in swiftlang/swift-package-manager#8668, which can be easily computed, since the host toolchain in practice is always available when `SwiftSDKBundleStore` is initialized.
…t-request Pass `cancelOnSubsequentRequest: 0` to all requests that support it
Fix Package.swift warnings
@swift-ci please test |
swiftlang/swift-package-manager#8692 @swift-ci please test |
f6ff09b
to
a0a8f1e
Compare
swiftlang/swift-package-manager#8692 @swift-ci please test |
hborla
approved these changes
May 20, 2025
swiftlang/swift-package-manager#8692 @swift-ci please test macOS platform |
swiftlang/swift-package-manager#8692 |
swiftlang/swift-package-manager#8692 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation: Last main -> release/6.2 merge. Skips #2159 as even though it's likely harmless, it's a very large change and touches a lot of the request/response handling - too risky at this point. The rest are all changes we want:
TaskScheduler
#2152: Fixes missed cancellation that caused flakey testsTaskScheduler
if it has been shut down #2153: Stops scheduling new tasks after shutdownhostToolchainBinDir
toSwiftSDKBundleStore
#2157: API change in SwiftPM that we need to take (it's being cherry-picked there)cancelOnSubsequentRequest: 0
to all requests that support it #2158: Stops cancelling requests implicitly (clients should send a cancel when they want it)Scope: SourceKit-LSP
Risk: All low bug risk fixes, reverted the one PR that isn't.
Testing: Existing test cases
Reviewer: @bnbarham