Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ package actor DocumentationLanguageService: LanguageService, Sendable {
// The DocumentationLanguageService does not do anything with document events
}

package static func syntacticTestItems(in uri: DocumentURI) async -> [AnnotatedTestItem] {
return []
}

package func changeDocument(
_ notification: DidChangeTextDocumentNotification,
preEditSnapshot: DocumentSnapshot,
Expand Down
38 changes: 15 additions & 23 deletions Sources/SourceKitLSP/LanguageService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,14 @@ package extension LanguageService {

static var experimentalCapabilities: [String: LSPAny] { [:] }

func clientInitialized(_ initialized: LanguageServerProtocol.InitializedNotification) async {}
func clientInitialized(_ initialized: InitializedNotification) async {}

func openOnDiskDocument(snapshot: DocumentSnapshot, buildSettings: FileBuildSettings) async throws {
throw ResponseError.unknown("\(#function) not implemented in \(Self.self)")
throw ResponseError.unknown("\(#function) not implemented in \(Self.self) for \(snapshot.uri)")
}

func closeOnDiskDocument(uri: DocumentURI) async throws {
throw ResponseError.unknown("\(#function) not implemented in \(Self.self)")
throw ResponseError.unknown("\(#function) not implemented in \(Self.self) for \(uri)")
}

func willSaveDocument(_ notification: WillSaveTextDocumentNotification) async {}
Expand Down Expand Up @@ -386,15 +386,15 @@ package extension LanguageService {
for snapshot: DocumentSnapshot,
at position: Position
) async throws -> (symbolGraph: String, usr: String, overrideDocComments: [String]) {
throw ResponseError.internalError("\(#function) not implemented in \(Self.self)")
throw ResponseError.internalError("\(#function) not implemented in \(Self.self) for \(snapshot.uri)")
}

func symbolGraph(
forOnDiskContentsAt location: SymbolLocation,
in workspace: Workspace,
manager: OnDiskDocumentManager
) async throws -> String {
throw ResponseError.internalError("\(#function) not implemented in \(Self.self)")
throw ResponseError.internalError("\(#function) not implemented in \(Self.self) for \(location.path)")
}

func openGeneratedInterface(
Expand All @@ -403,7 +403,7 @@ package extension LanguageService {
groupName: String?,
symbolUSR symbol: String?
) async throws -> GeneratedInterfaceDetails? {
throw ResponseError.internalError("Generated interface not implemented in \(Self.self)")
throw ResponseError.internalError("Generated interface not implemented in \(Self.self) for \(document)")
}

func definition(_ request: DefinitionRequest) async throws -> LocationsOrLocationLinksResponse? {
Expand Down Expand Up @@ -488,7 +488,7 @@ package extension LanguageService {
oldName: CrossLanguageName,
newName: CrossLanguageName
) async throws -> [TextEdit] {
throw ResponseError.internalError("\(#function) not implemented in \(Self.self)")
throw ResponseError.internalError("\(#function) not implemented in \(Self.self) for \(snapshot.uri)")
}

func prepareRename(
Expand All @@ -502,11 +502,11 @@ package extension LanguageService {
}

func editsToRenameParametersInFunctionBody(
snapshot: SourceKitLSP.DocumentSnapshot,
renameLocation: SourceKitLSP.RenameLocation,
newName: SourceKitLSP.CrossLanguageName
) async -> [LanguageServerProtocol.TextEdit] {
logger.error("\(#function) not implemented in \(Self.self)")
snapshot: DocumentSnapshot,
renameLocation: RenameLocation,
newName: CrossLanguageName
) async -> [TextEdit] {
logger.error("\(#function) not implemented in \(Self.self) for \(snapshot.uri)")
return []
}

Expand All @@ -519,19 +519,11 @@ package extension LanguageService {
}

func syntacticDocumentTests(for uri: DocumentURI, in workspace: Workspace) async throws -> [AnnotatedTestItem]? {
throw ResponseError.internalError("syntacticDocumentTests not implemented in \(Self.self)")
}

static func syntacticTestItems(in uri: LanguageServerProtocol.DocumentURI) async -> [SourceKitLSP.AnnotatedTestItem] {
logger.error("\(#function) not implemented in \(Self.self)")
return []
throw ResponseError.internalError("syntacticDocumentTests not implemented in \(Self.self) for \(uri)")
}

func canonicalDeclarationPosition(
of position: LanguageServerProtocol.Position,
in uri: LanguageServerProtocol.DocumentURI
) async -> LanguageServerProtocol.Position? {
logger.error("\(#function) not implemented in \(Self.self)")
func canonicalDeclarationPosition(of position: Position, in uri: DocumentURI) async -> Position? {
logger.error("\(#function) not implemented in \(Self.self) for \(uri)")
return nil
}

Expand Down