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 {
508508 private var workspacesAndIsImplicit : [ ( workspace: Workspace , isImplicit: Bool ) ] = [ ] {
509509 didSet {
510510 uriToWorkspaceCache = [ : ]
511+ // `indexProgressManager` iterates over all workspaces in the SourceKitLSPServer. Modifying workspaces might thus
512+ // update the index progress status.
513+ indexProgressManager. indexStatusDidChange ( )
511514 }
512515 }
513516
Original file line number Diff line number Diff line change @@ -384,21 +384,19 @@ final class BackgroundIndexingTests: XCTestCase {
384384 XCTAssertEqual ( beginData. message, " Generating build graph " )
385385 let indexingWorkDoneProgressToken = beginNotification. token
386386
387- let reportNotification = try await project. testClient. nextNotification (
387+ _ = try await project. testClient. nextNotification (
388388 ofType: WorkDoneProgress . self,
389389 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 {
391394 return false
392395 }
393396 return true
394397 }
395398 )
396399 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 " )
402400
403401 _ = try await project. testClient. nextNotification (
404402 ofType: WorkDoneProgress . self,
You can’t perform that action at this time.
0 commit comments