Skip to content

Commit 8b20ce7

Browse files
authored
Merge pull request #2273 from ahoppen/determining-files
Improve `Indexing: Scheduling tasks` message
2 parents 57ec880 + 131dc69 commit 8b20ce7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Sources/SemanticIndex/SemanticIndexManager.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ package enum IndexTaskStatus: Comparable {
104104
/// messages to the user, we only show the highest priority task.
105105
package enum IndexProgressStatus: Sendable, Equatable {
106106
case preparingFileForEditorFunctionality
107-
case schedulingIndexing
107+
case generatingBuildGraph
108108
case indexing(
109109
preparationTasks: [BuildTargetIdentifier: IndexTaskStatus],
110110
indexTasks: [FileIndexInfo: IndexTaskStatus]
@@ -115,8 +115,8 @@ package enum IndexProgressStatus: Sendable, Equatable {
115115
switch (self, other) {
116116
case (_, .preparingFileForEditorFunctionality), (.preparingFileForEditorFunctionality, _):
117117
return .preparingFileForEditorFunctionality
118-
case (_, .schedulingIndexing), (.schedulingIndexing, _):
119-
return .schedulingIndexing
118+
case (_, .generatingBuildGraph), (.generatingBuildGraph, _):
119+
return .generatingBuildGraph
120120
case (
121121
.indexing(let selfPreparationTasks, let selfIndexTasks),
122122
.indexing(let otherPreparationTasks, let otherIndexTasks)
@@ -250,7 +250,7 @@ package final actor SemanticIndexManager {
250250
// flickering between indexing progress and `Scheduling indexing` if we trigger an index schedule task while
251251
// indexing is already in progress
252252
if !buildGraphGenerationTasks.isEmpty {
253-
return .schedulingIndexing
253+
return .generatingBuildGraph
254254
}
255255
return .upToDate
256256
}

Sources/SourceKitLSP/IndexProgressManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ actor IndexProgressManager {
9393
case .preparingFileForEditorFunctionality:
9494
message = "Preparing current file"
9595
percentage = 0
96-
case .schedulingIndexing:
97-
message = "Scheduling tasks"
96+
case .generatingBuildGraph:
97+
message = "Determining files"
9898
percentage = 0
9999
case .indexing(let preparationTasks, let indexTasks):
100100
// We can get into a situation where queuedIndexTasks < indexTasks.count if we haven't processed all

Tests/SourceKitLSPTests/BackgroundIndexingTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ final class BackgroundIndexingTests: XCTestCase {
379379
XCTFail("Expected begin notification")
380380
return
381381
}
382-
XCTAssertEqual(beginData.message, "Scheduling tasks")
382+
XCTAssertEqual(beginData.message, "Determining files")
383383
let indexingWorkDoneProgressToken = beginNotification.token
384384

385385
_ = try await project.testClient.nextNotification(

0 commit comments

Comments
 (0)