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
5 changes: 2 additions & 3 deletions Sources/BuildServerProtocol/Messages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ private let notificationTypes: [NotificationType.Type] = [
]

extension MessageRegistry {
public static var bspProtocol: MessageRegistry {
public static let bspProtocol: MessageRegistry =
MessageRegistry(requests: requestTypes, notifications: notificationTypes)
}
}

@available(*, deprecated, message: "use MessageRegistry.bspProtocol instead")
public let bspRegistry = MessageRegistry(requests: requestTypes, notifications: notificationTypes)
public var bspRegistry: MessageRegistry { MessageRegistry.bspProtocol }
4 changes: 0 additions & 4 deletions Sources/LanguageServerProtocol/MessageRegistry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
//===----------------------------------------------------------------------===//

public final class MessageRegistry: Sendable {

public static let lspProtocol: MessageRegistry =
MessageRegistry(requests: builtinRequests, notifications: builtinNotifications)

private let methodToRequest: [String: _RequestType.Type]
private let methodToNotification: [String: NotificationType.Type]

Expand Down
5 changes: 5 additions & 0 deletions Sources/LanguageServerProtocol/Messages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ public let builtinNotifications: [NotificationType.Type] = [
WorkDoneProgress.self,
]

extension MessageRegistry {
public static let lspProtocol: MessageRegistry =
MessageRegistry(requests: builtinRequests, notifications: builtinNotifications)
}

// MARK: Miscellaneous Message Types

public struct VoidResponse: ResponseType, Hashable {
Expand Down