Skip to content

Commit 14264b7

Browse files
authored
Merge pull request #1871 from ahoppen/settrace-freestanding
Treat `$/setTrace` as a freestanding message
2 parents f376e66 + 7c474fd commit 14264b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/SourceKitLSP/MessageHandlingDependencyTracker.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ package enum MessageHandlingDependencyTracker: QueueBasedMessageHandlerDependenc
141141
case let notification as ReopenTextDocumentNotification:
142142
self = .documentUpdate(notification.textDocument.uri)
143143
case is SetTraceNotification:
144-
self = .globalConfigurationChange
144+
// `$/setTrace` changes a global configuration setting but it doesn't affect the result of any other request. To
145+
// avoid blocking other requests on a `$/setTrace` notification the client might send during launch, we treat it
146+
// as a freestanding message.
147+
// Also, we don't do anything with this notification at the moment, so it doesn't matter.
148+
self = .freestanding
145149
case is ShowMessageNotification:
146150
self = .freestanding
147151
case let notification as WillSaveTextDocumentNotification:

0 commit comments

Comments
 (0)