mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Remove the Notification type
`Notification` is just a wrapper around `NotificationType` and there’s no reason for it to exist anymore. Resolves #880 rdar://116705670
This commit is contained in:
@@ -193,9 +193,9 @@ public actor BuildServerBuildSystem: MessageHandler {
|
||||
public nonisolated func handle(_ params: some NotificationType, from clientID: ObjectIdentifier) {
|
||||
bspMessageHandlingQueue.async {
|
||||
if let params = params as? BuildTargetsChangedNotification {
|
||||
await self.handleBuildTargetsChanged(Notification(params, clientID: clientID))
|
||||
await self.handleBuildTargetsChanged(params)
|
||||
} else if let params = params as? FileOptionsChangedNotification {
|
||||
await self.handleFileOptionsChanged(Notification(params, clientID: clientID))
|
||||
await self.handleFileOptionsChanged(params)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -213,20 +213,20 @@ public actor BuildServerBuildSystem: MessageHandler {
|
||||
}
|
||||
|
||||
func handleBuildTargetsChanged(
|
||||
_ notification: LanguageServerProtocol.Notification<BuildTargetsChangedNotification>
|
||||
_ notification: BuildTargetsChangedNotification
|
||||
) async {
|
||||
await self.delegate?.buildTargetsChanged(notification.params.changes)
|
||||
await self.delegate?.buildTargetsChanged(notification.changes)
|
||||
}
|
||||
|
||||
func handleFileOptionsChanged(
|
||||
_ notification: LanguageServerProtocol.Notification<FileOptionsChangedNotification>
|
||||
_ notification: FileOptionsChangedNotification
|
||||
) async {
|
||||
let result = notification.params.updatedOptions
|
||||
let result = notification.updatedOptions
|
||||
let settings = FileBuildSettings(
|
||||
compilerArguments: result.options,
|
||||
workingDirectory: result.workingDirectory
|
||||
)
|
||||
await self.buildSettingsChanged(for: notification.params.uri, settings: settings)
|
||||
await self.buildSettingsChanged(for: notification.uri, settings: settings)
|
||||
}
|
||||
|
||||
/// Record the new build settings for the given document and inform the delegate
|
||||
|
||||
Reference in New Issue
Block a user