Move workspace symbol implementation out of SourceKitLSPServer.swift - #2746
Open
rintaro wants to merge 1 commit into
Open
Move workspace symbol implementation out of SourceKitLSPServer.swift#2746rintaro wants to merge 1 commit into
rintaro wants to merge 1 commit into
Conversation
Member
Author
|
@swift-ci Please test |
The `workspace/symbol`, `workspace/symbolNames`, `workspace/symbolInfo` and `workspaceSymbol/resolve` implementations made up roughly 470 lines of SourceKitLSPServer.swift. Move them to WorkspaceSymbols.swift and leave each request handler in SourceKitLSPServer.swift as a single statement that forwards to its implementation. Fold QualifiedWorkspaceSymbolQuery.swift into the same file, since the query type and its fuzzy matching helper are only used by the qualified `workspace/symbol` search path. Also remove `languageClass(for:)`, whose last caller went away when language service instances became scoped per workspace.
rintaro
force-pushed
the
extract-workspace-symbols
branch
from
August 8, 2026 01:30
c852db9 to
7828e2b
Compare
Member
Author
|
@swift-ci Please test |
Member
Author
|
@swift-ci Please test Windows |
ahoppen
reviewed
Aug 10, 2026
Member
There was a problem hiding this comment.
In other files (eg. Rename.swift and CodeCompletion.swift) we extend SourceKitLSPServer/SwiftLanguageService to add the request handler method that you left in SourceKitLSPServer. I don’t have a strong preference to either way of approaching request handles implemented in other files (I kind of like what you did) but I think we should be consistent with the approach taken.
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.
NFC
The
workspace/symbol,workspace/symbolNames,workspace/symbolInfoandworkspaceSymbol/resolveimplementations made up roughly 470 lines of SourceKitLSPServer.swift. Move them to WorkspaceSymbols.swift and leave each request handler in SourceKitLSPServer.swift as a single statement that forwards to its implementation.Fold QualifiedWorkspaceSymbolQuery.swift into the same file, since the query type and its fuzzy matching helper are only used by the qualified
workspace/symbolsearch path.Also remove
languageClass(for:), whose last caller went away when language service instances became scoped per workspace.