File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -508,6 +508,9 @@ public actor SourceKitLSPServer {
508
508
private var workspacesAndIsImplicit : [ ( workspace: Workspace , isImplicit: Bool ) ] = [ ] {
509
509
didSet {
510
510
uriToWorkspaceCache = [ : ]
511
+ // `indexProgressManager` iterates over all workspaces in the SourceKitLSPServer. Modifying workspaces might thus
512
+ // update the index progress status.
513
+ indexProgressManager. indexStatusDidChange ( )
511
514
}
512
515
}
513
516
Original file line number Diff line number Diff line change @@ -384,21 +384,19 @@ final class BackgroundIndexingTests: XCTestCase {
384
384
XCTAssertEqual ( beginData. message, " Generating build graph " )
385
385
let indexingWorkDoneProgressToken = beginNotification. token
386
386
387
- let reportNotification = try await project. testClient. nextNotification (
387
+ _ = try await project. testClient. nextNotification (
388
388
ofType: WorkDoneProgress . self,
389
389
satisfying: { notification in
390
- guard notification. token == indexingWorkDoneProgressToken, case . report = notification. value else {
390
+ guard notification. token == indexingWorkDoneProgressToken,
391
+ case . report( let reportData) = notification. value,
392
+ reportData. message == " 0 / 1 "
393
+ else {
391
394
return false
392
395
}
393
396
return true
394
397
}
395
398
)
396
399
receivedReportProgressNotification. fulfill ( )
397
- guard case . report( let reportData) = reportNotification. value else {
398
- XCTFail ( " Expected report notification " )
399
- return
400
- }
401
- XCTAssertEqual ( reportData. message, " 0 / 1 " )
402
400
403
401
_ = try await project. testClient. nextNotification (
404
402
ofType: WorkDoneProgress . self,
You can’t perform that action at this time.
0 commit comments