Skip to content

Commit 3fc3616

Browse files
authored
Merge pull request #2019 from ahoppen/sourcekitoptions-improvements
Small improvements to `workspace/_sourceKitOptions` request
2 parents 1045a38 + 37aaa92 commit 3fc3616

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Sources/LanguageServerProtocol/Requests/SourceKitOptionsRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/// **(LSP Extension)**.
2020
public struct SourceKitOptionsRequest: RequestType, Hashable {
2121
public static let method: String = "workspace/_sourceKitOptions"
22-
public typealias Response = SourceKitOptionsResponse?
22+
public typealias Response = SourceKitOptionsResponse
2323

2424
/// The document to get options for
2525
public var textDocument: TextDocumentIdentifier

Sources/SourceKitLSP/MessageHandlingDependencyTracker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ package enum MessageHandlingDependencyTracker: QueueBasedMessageHandlerDependenc
225225
case is ShutdownRequest:
226226
self = .globalConfigurationChange
227227
case is SourceKitOptionsRequest:
228-
self = .workspaceRequest
228+
self = .freestanding
229229
case is TriggerReindexRequest:
230230
self = .globalConfigurationChange
231231
case is TypeHierarchySubtypesRequest:

Tests/BuildSystemIntegrationTests/BuildServerBuildSystemTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ final class BuildServerBuildSystemTests: XCTestCase {
421421
allowFallbackSettings: false
422422
)
423423
)
424-
XCTAssertEqual(options?.data, LSPAny.dictionary(["custom": .string("value")]))
424+
XCTAssertEqual(options.data, LSPAny.dictionary(["custom": .string("value")]))
425425
}
426426

427427
func testBuildSettingsForFilePartOfMultipleTargets() async throws {

0 commit comments

Comments
 (0)