Prefix LSP/BSP extension methods with sourcekit/#2632
Open
rintaro wants to merge 2 commits into
Open
Conversation
93c9f2b to
9faba28
Compare
Member
Author
|
swiftlang/swift-tools-protocols#48 |
Member
Author
|
swiftlang/swift-tools-protocols#48 |
Member
Author
|
swiftlang/swift-tools-protocols#48 |
ahoppen
approved these changes
May 4, 2026
Member
Author
|
Added a commit to start advertising "experimental" in |
Member
Author
|
swiftlang/swift-tools-protocols#48 |
Member
Author
|
swiftlang/swift-tools-protocols#48 |
e426ef7 to
a522361
Compare
Rename all SourceKit-LSP–specific LSP and BSP extension requests and
notifications to use the `sourcekit/` prefix (e.g. `workspace/tests`
→ `sourcekit/workspace/tests`).
* Register the legacy name alias in `MessageRegistry` so incoming
messages from existing clients are still dispatched correctly.
* Advertise both the new and legacy method names in the `experimental`
capability dict so old clients can still discover the capabilities
they know.
* Accept legacy names advertised by old clients in `CapabilityRegistry`.
* Use `LegacyNameFallbackConnection` to retry requests with the legacy
method name when the peer returns `methodNotFound` for a
`sourcekit/`-prefixed request. Used in:
* `SourceKitLSPServer.client` (server→client) to keep old editors working
* `ExternalBuildServerAdapter.connectionToBuildServer` (SourceKit-LSP→BSP)
to keep old build servers working
Lets BSP servers know which SourceKit extension methods SourceKit-LSP supports, so they can choose between the current sourcekit/-prefixed names and the legacy names.
a522361 to
4a07f9e
Compare
Member
Author
|
swiftlang/swift-tools-protocols#48 |
Member
Author
|
swiftlang/swift-tools-protocols#48 |
Member
Author
|
swiftlang/swift-tools-protocols#48 |
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
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.
Rename all SourceKit-LSP–specific LSP and BSP extension requests and notifications to use the
sourcekit/prefix (e.g.workspace/tests→sourcekit/workspace/tests).MessageRegistryso incoming messages from existing clients are still dispatched correctly.experimentalcapability dict so old clients can still discover the capabilities they know.CapabilityRegistry.LegacyNameFallbackConnectionto retry requests with the legacy method name when the peer returnsmethodNotFoundfor asourcekit/-prefixed request. Used in:SourceKitLSPServer.client(server→client) to keep old editors workingExternalBuildServerAdapter.connectionToBuildServer(SourceKit-LSP→BSP) to keep old build servers workingsee: swiftlang/swift-tools-protocols#48
Fixes #2631