@@ -79,9 +79,9 @@ public final actor SemanticIndexManager {
79
79
/// ...). `nil` if no build graph is currently being generated.
80
80
private var generateBuildGraphTask : Task < Void , Never > ?
81
81
82
- private let preparationUpToDateStatus = IndexUpToDateStatusManager < ConfiguredTarget > ( )
82
+ private let preparationUpToDateTracker = UpToDateTracker < ConfiguredTarget > ( )
83
83
84
- private let indexStoreUpToDateStatus = IndexUpToDateStatusManager < DocumentURI > ( )
84
+ private let indexStoreUpToDateTracker = UpToDateTracker < DocumentURI > ( )
85
85
86
86
/// The preparation tasks that have been started and are either scheduled in the task scheduler or currently
87
87
/// executing.
@@ -273,23 +273,23 @@ public final actor SemanticIndexManager {
273
273
// We only re-index the files that were changed and don't re-index any of their dependencies. See the
274
274
// `Documentation/Files_To_Reindex.md` file.
275
275
let changedFiles = events. map ( \. uri)
276
- await indexStoreUpToDateStatus . markOutOfDate ( changedFiles)
276
+ await indexStoreUpToDateTracker . markOutOfDate ( changedFiles)
277
277
278
278
// Note that configured targets are the right abstraction layer here (instead of a non-configured target) because a
279
279
// build system might have targets that include different source files. Hence a source file might be in target T
280
280
// configured for macOS but not in target T configured for iOS.
281
281
let targets = await changedFiles. asyncMap { await buildSystemManager. configuredTargets ( for: $0) } . flatMap { $0 }
282
282
if let dependentTargets = await buildSystemManager. targets ( dependingOn: targets) {
283
- await preparationUpToDateStatus . markOutOfDate ( dependentTargets)
283
+ await preparationUpToDateTracker . markOutOfDate ( dependentTargets)
284
284
} else {
285
- await preparationUpToDateStatus . markAllOutOfDate ( )
285
+ await preparationUpToDateTracker . markAllKnownOutOfDate ( )
286
286
// `markAllOutOfDate` only marks targets out-of-date that have been indexed before. Also mark all targets with
287
287
// in-progress preparation out of date. So we don't get into the following situation, which would result in an
288
288
// incorrect up-to-date status of a target
289
289
// - Target preparation starts for the first time
290
290
// - Files changed
291
291
// - Target preparation finishes.
292
- await preparationUpToDateStatus . markOutOfDate ( inProgressPreparationTasks. keys)
292
+ await preparationUpToDateTracker . markOutOfDate ( inProgressPreparationTasks. keys)
293
293
}
294
294
295
295
await scheduleBackgroundIndex ( files: changedFiles)
@@ -367,7 +367,7 @@ public final actor SemanticIndexManager {
367
367
// schedule two preparations of the same target in quick succession, only the first one actually performs a prepare
368
368
// and the second one will be a no-op once it runs.
369
369
let targetsToPrepare = await targets. asyncFilter {
370
- await !preparationUpToDateStatus . isUpToDate ( $0)
370
+ await !preparationUpToDateTracker . isUpToDate ( $0)
371
371
}
372
372
373
373
guard !targetsToPrepare. isEmpty else {
@@ -378,7 +378,7 @@ public final actor SemanticIndexManager {
378
378
PreparationTaskDescription (
379
379
targetsToPrepare: targetsToPrepare,
380
380
buildSystemManager: self . buildSystemManager,
381
- preparationUpToDateStatus : preparationUpToDateStatus ,
381
+ preparationUpToDateTracker : preparationUpToDateTracker ,
382
382
indexProcessDidProduceResult: indexProcessDidProduceResult,
383
383
testHooks: testHooks
384
384
)
@@ -425,7 +425,7 @@ public final actor SemanticIndexManager {
425
425
filesToIndex: filesAndTargets,
426
426
buildSystemManager: self . buildSystemManager,
427
427
index: index,
428
- indexStoreUpToDateStatus : indexStoreUpToDateStatus ,
428
+ indexStoreUpToDateTracker : indexStoreUpToDateTracker ,
429
429
indexProcessDidProduceResult: indexProcessDidProduceResult,
430
430
testHooks: testHooks
431
431
)
@@ -470,7 +470,7 @@ public final actor SemanticIndexManager {
470
470
// schedule two indexing jobs for the same file in quick succession, only the first one actually updates the index
471
471
// store and the second one will be a no-op once it runs.
472
472
let outOfDateFiles = await filesToIndex ( toCover: files) . asyncFilter {
473
- if await indexStoreUpToDateStatus . isUpToDate ( $0. sourceFile) {
473
+ if await indexStoreUpToDateTracker . isUpToDate ( $0. sourceFile) {
474
474
return false
475
475
}
476
476
guard let language = await buildSystemManager. defaultLanguage ( for: $0. mainFile) ,
0 commit comments