Skip to content

Merge main into release/6.2 #2149

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

Open
wants to merge 14 commits into
base: release/6.2
Choose a base branch
from

Conversation

bnbarham
Copy link
Contributor

No description provided.

ahoppen and others added 13 commits March 28, 2025 14:28
…Paths:initialize:)` gets closed if the initializer fails

Just something I noticed while looking through code. I am not aware of any issues caused by this.

Also relax the `precondition` in `DLHandle.deinit` to a fault. If we do not close a `DLHandle`, that’s a bug but it’s not so bad that we should crash sourcekit-lsp for it.
SwiftPM has added Crypto related functionality to Workspace to
support signing of the swift-syntax prebuilts manifest signing.
This breaks sourcekit-lsp builds on Windows complaining about
SwiftASN1 being missing. Adding a clause here to match the one
in SwiftPM's CMakeLists.txt file.
…minate them and use crash recovery to restore behavior

This should be a last stop-gap measure in case sourcekitd or clangd get stuck, don’t respond to any requests anymore and don’t honor cancellation either. In that case we can restore SourceKit-LSP behavior by killing them and using the crash recovery logic to restore functionality.

rdar://149492159
Ensure the `DLHandle` passed to `SourceKitD.init(dlhandle:path:pluginPaths:initialize:)` gets closed if the initializer fails
The SwiftPM smoke test still fails to build. I see the SwiftASN1
modules aren't getting added to the include path. Hopefully an
explicit dependency will fix that.
When the compiler in `compile_commands.json` references a `swift` executable that’s a symlink to `swiftly`, SourceKit-LSP got confused because the `swift` executable doesn’t reside in a real toolchain, causing us to not provide any semantic functionality.

When we discover that the `swift` executable reference in compile commands references a `swiftly` executable, use `swiftly use -p` to resolve the binary in the real toolchain and continue operating based on that.

Fixes swiftlang#2128
rdar://150301344
… have changed

Similar to how we send a `workspace/diagnostic/refresh` request to the client when we get new build settings, we need to send a `workspace/semanticTokens/refresh` to the client to reload semantic tokens when builds settings change. This is particularly important so that we reload semantic tokens from real build setting after a SwiftPM package has finished loading (we previously used fallback settings).

Fixes swiftlang#2141
rdar://150934682
Add SwiftASN1 as an explicit dependency on BuildSystemIntegration
Resolve swiftly when referenced in compile commands
…-clangd-sourcekitd

If sourcekitd or clangd don’t respond to a request for 5 minutes, terminate them and use crash recovery to restore behavior
Send `workspace/semanticTokens/refresh` to client when build settings have changed
@bnbarham bnbarham requested a review from a team as a code owner May 12, 2025 20:56
@bnbarham
Copy link
Contributor Author

@swift-ci please test

…sponsive-clangd-sourcekitd"

This change is too risky for 6.2 at this point.
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

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