@@ -136,17 +136,6 @@ public actor SourceKitServer {
136
136
/// The queue on which we communicate with the client.
137
137
public let clientCommunicationQueue : DispatchQueue = DispatchQueue ( label: " language-server-queue " , qos: . userInitiated)
138
138
139
- public struct RequestCancelKey : Hashable {
140
- public var client : ObjectIdentifier
141
- public var request : RequestID
142
- public init ( client: ObjectIdentifier , request: RequestID ) {
143
- self . client = client
144
- self . request = request
145
- }
146
- }
147
-
148
- /// The set of outstanding requests that may be cancelled.
149
- public var requestCancellation : [ RequestCancelKey : CancellationToken ] = [ : ]
150
139
151
140
/// The connection to the editor.
152
141
public let client : Connection
@@ -527,16 +516,7 @@ extension SourceKitServer: MessageHandler {
527
516
528
517
public func handle< R: RequestType > ( _ params: R , id: RequestID , from clientID: ObjectIdentifier , reply: @escaping ( LSPResult < R . Response > ) -> Void ) async {
529
518
let cancellationToken = CancellationToken ( )
530
- let key = RequestCancelKey ( client: clientID, request: id)
531
-
532
- self . requestCancellation [ key] = cancellationToken
533
-
534
519
let request = Request ( params, id: id, clientID: clientID, cancellation: cancellationToken, reply: { [ weak self] result in
535
- if let self {
536
- Task {
537
- await self . stopTrackingCancellationKey ( key)
538
- }
539
- }
540
520
reply ( result)
541
521
if let self {
542
522
Task {
@@ -1011,13 +991,7 @@ extension SourceKitServer {
1011
991
}
1012
992
1013
993
func cancelRequest( _ notification: Notification < CancelRequestNotification > ) {
1014
- let key = RequestCancelKey ( client: notification. clientID, request: notification. params. id)
1015
- requestCancellation [ key] ? . cancel ( )
1016
- }
1017
-
1018
- /// Stop keeping track of the cancellation handler for the given cancellation key.
1019
- func stopTrackingCancellationKey( _ key: RequestCancelKey ) {
1020
- requestCancellation [ key] = nil
994
+ // TODO: Implement cancellation
1021
995
}
1022
996
1023
997
/// The server is about to exit, and the server should flush any buffered state.
0 commit comments