-
Notifications
You must be signed in to change notification settings - Fork 314
[5.3-20201012] [completion] Filter completions on the server side #336
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
benlangmuir
merged 23 commits into
swiftlang:release/5.3-20201012
from
benlangmuir:code-completion-server-side-filtering-5.3-20201012
Oct 19, 2020
Merged
[5.3-20201012] [completion] Filter completions on the server side #336
benlangmuir
merged 23 commits into
swiftlang:release/5.3-20201012
from
benlangmuir:code-completion-server-side-filtering-5.3-20201012
Oct 19, 2020
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
Conflicts: Sources/SourceKit/CodeCompletionOptions.swift Sources/SourceKit/SourceKitServer.swift Sources/SourceKit/sourcekitd/SwiftLanguageServer.swift
Similar to cursor info, there is enough code here it makes sense to separate it out. Conflicts: Sources/SourceKit/sourcekitd/CodeCompletion.swift Sources/SourceKit/sourcekitd/SwiftLanguageServer.swift
Work in progress: add a basic implementation for keeping track of the current completion session, and use the sourcekitd complete.open/update/close requests. Conflicts: Sources/SourceKit/sourcekitd/CodeCompletion.swift Sources/SourceKit/sourcekitd/SwiftLanguageServer.swift
With this change, tests pass whether we default to server-side or client-side filtering. Also duplicate a few interesting tests to run both ways. A future commit will beef up the test coverage for server-side filtering specifically. Conflicts: Sources/SourceKit/sourcekitd/SwiftLanguageServer.swift
By default, print 1-based line/column numbers using the defacto standard line:column format. In debug print, continue to use the 0-based values to match the constructor.
Conflicts: Sources/LanguageServerProtocol/SupportTypes/CodeCompletionOptions.swift Sources/SourceKit/CodeCompletionOptions.swift Sources/SourceKitLSP/CodeCompletionOptions.swift
Conflicts: Sources/SourceKit/SourceKitServer.swift Sources/SourceKit/sourcekitd/SwiftLanguageServer.swift
Since it is being used in the LSP protocol layer, give it a name that clarifies that it is SourceKit-specific.
Conflicts: Sources/SourceKit/sourcekitd/CodeCompletion.swift Sources/SourceKit/sourcekitd/CodeCompletionSession.swift
Typically this would create a reference cycle.
We should solve this in the JSONRPCConnection itself, but in the meantime workaround by keeping pipes alive until the connection has closed.
When using SourceKit-LSP in tests (or otherwise in a library), we do not want to leak the toolchain connections. Conflicts: Sources/SourceKit/sourcekitd/SwiftLanguageServer.swift
…get stuck failing - Fix for https://bugs.swift.org/browse/SR-13561 by making sure the session close waits for the open to finish - Add a regression test Change-Id: Iff7217d7b03bc797e036c5329afb0765dcc1874b
…uble-dash Change the following options to double-dash: --completion-max-results --completion-server-side-filtering This matches the behaviour on main branch, but without pulling in the change to use swift-argument-parser.
@swift-ci please test |
akyrtzi
approved these changes
Oct 16, 2020
@swift-ci please nominate |
This is working for me. Without this, in my environment in my particular project, source kit LSP is unusably slow. With this, things seem good 👍 |
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.
Cherry-pick the server-side filtering-related changes to
release/5.3-20201012
rdar://69374656