Skip to content

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Aug 25, 2025

With the introduction of secondary language services, we don’t expect every language service to implement every request anymore. To simplify the addition of language services like DocumentationLanguageService add default implementations for methods that satisfy the following criteria:

  • SourceKitLSPServer does not expect side effects to happen when they are called
  • The method can throw or there is a reasonable default value
  • It is reasonable to expect that not all language services need to implement it

@ahoppen
Copy link
Member Author

ahoppen commented Aug 25, 2025

@swift-ci Please test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests no longer worked since the DocumentationLanguageService now returns a requestNotImplemented for the completion request instead of returning empty results, which really makes more sense. These tests didn’t really provide much value, so I decided to remove them.

… not expected to be implemented by all language services

With the introduction of secondary language services, we don’t expect every language service to implement every request anymore. To simplify the addition of language services like `DocumentationLanguageService` add default implementations for methods that satisfy the following criteria:
 - `SourceKitLSPServer` does not expect side effects to happen when they are called
 - The method can throw or there is a reasonable default value
 - It is reasonable to expect that not all language services need to implement it
@ahoppen ahoppen force-pushed the split-language-services branch from d22d31a to 4040a5e Compare August 26, 2025 14:10
@ahoppen
Copy link
Member Author

ahoppen commented Aug 26, 2025

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Aug 26, 2025

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 415e807 into swiftlang:main Aug 27, 2025
3 checks passed
@ahoppen ahoppen deleted the split-language-services branch August 27, 2025 13:31
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.

2 participants