Skip to content

Commit 9e9579d

Browse files
authored
Merge pull request #1766 from ahoppen/documents-private
Make `DocumentManager.documents` private
2 parents 892f716 + 2a84422 commit 9e9579d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/SourceKitLSP/DocumentManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ package final class DocumentManager: InMemoryDocumentManager, Sendable {
104104
private let queue: DispatchQueue = DispatchQueue(label: "document-manager-queue")
105105

106106
// `nonisolated(unsafe)` is fine because `documents` is guarded by queue.
107-
nonisolated(unsafe) var documents: [DocumentURI: Document] = [:]
107+
private nonisolated(unsafe) var documents: [DocumentURI: Document] = [:]
108108

109109
package init() {}
110110

Sources/SourceKitLSP/TestDiscovery.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ extension SourceKitLSPServer {
205205
return documentManager.fileHasInMemoryModifications(uri)
206206
}
207207

208-
let filesWithInMemoryState = documentManager.documents.keys.filter { uri in
208+
let filesWithInMemoryState = documentManager.openDocuments.filter { uri in
209209
// Use the index to check for in-memory modifications so we can re-use its cache. If no index exits, ask the
210210
// document manager directly.
211211
if let index {

0 commit comments

Comments
 (0)