Skip to content

Commit 20554db

Browse files
committed
Remove showActivePreparationTasksInProgress experimental feature
The `showActivePreparationTasksInProgress` didn’t turn out to be terribly useful and with the streaming index log (#1382), we should have the functionality to view which index tasks are currently running. So, we should remove the feature. rdar://129109830
1 parent c4e6e85 commit 20554db

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

Sources/SourceKitLSP/ExperimentalFeatures.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,4 @@
1515
public enum ExperimentalFeature: String, Codable, Sendable, CaseIterable {
1616
/// Enable background indexing.
1717
case backgroundIndexing = "background-indexing"
18-
19-
/// Show the files that are currently being indexed / the targets that are currently being prepared in the work done
20-
/// progress.
21-
///
22-
/// This is an option because VS Code tries to render a multi-line work done progress into a single line text field in
23-
/// the status bar, which looks broken. But at the same time, it is very useful to get a feeling about what's
24-
/// currently happening indexing-wise.
25-
case showActivePreparationTasksInProgress = "show-active-preparation-tasks-in-progress"
2618
}

Sources/SourceKitLSP/IndexProgressManager.swift

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
import LSPLogging
1314
import LanguageServerProtocol
1415
import SKCore
1516
import SKSupport
@@ -100,20 +101,12 @@ actor IndexProgressManager {
100101
let finishedTasks = max(queuedIndexTasks - indexTasks.count, 0)
101102
if indexTasks.isEmpty {
102103
message = "Preparing targets"
104+
if preparationTasks.isEmpty {
105+
logger.fault("Indexer status is 'indexing' but there is no update indexstore or preparation task")
106+
}
103107
} else {
104108
message = "\(finishedTasks) / \(queuedIndexTasks)"
105109
}
106-
if await sourceKitLSPServer.options.experimentalFeatures.contains(.showActivePreparationTasksInProgress) {
107-
var inProgressTasks: [String] = []
108-
inProgressTasks += preparationTasks.filter { $0.value == .executing }
109-
.map { "- Preparing \($0.key.targetID)" }
110-
.sorted()
111-
inProgressTasks += indexTasks.filter { $0.value == .executing }
112-
.map { "- Indexing \($0.key.fileURL?.lastPathComponent ?? $0.key.pseudoPath)" }
113-
.sorted()
114-
115-
message += "\n\n" + inProgressTasks.joined(separator: "\n")
116-
}
117110
if queuedIndexTasks != 0 {
118111
percentage = Int(Double(finishedTasks) / Double(queuedIndexTasks) * 100)
119112
} else {

0 commit comments

Comments
 (0)