@@ -243,7 +243,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
243
243
func readMetrics( _ suffix: String ) throws -> String {
244
244
try tester. fs. read ( tmpDirPath. join ( " Test/aProject/build/XCBuildData/metrics- \( suffix) .json " ) ) . asString
245
245
}
246
- #expect( try readMetrics ( " one " ) == #"{"global":{"clangCacheHits":0,"clangCacheMisses":1,"swiftCacheHits":0,"swiftCacheMisses":0},"tasks":{"CompileC":{"cacheMisses":1}}}"# )
246
+ #expect( try readMetrics ( " one " ) == #"{"global":{"clangCacheHits":0,"clangCacheMisses":1,"swiftCacheHits":0,"swiftCacheMisses":0},"tasks":{"CompileC":{"cacheMisses":1,"headerDependenciesNotValidatedTasks":1,"moduleDependenciesNotValidatedTasks":1 }}}"# )
247
247
248
248
// Touch the source file to trigger a new scan.
249
249
try await tester. fs. updateTimestamp ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) )
@@ -268,7 +268,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
268
268
}
269
269
results. checkNoDiagnostics ( )
270
270
}
271
- #expect( try readMetrics ( " two " ) == #"{"global":{"clangCacheHits":1,"clangCacheMisses":0,"swiftCacheHits":0,"swiftCacheMisses":0},"tasks":{"CompileC":{"cacheHits":1}}}"# )
271
+ #expect( try readMetrics ( " two " ) == #"{"global":{"clangCacheHits":1,"clangCacheMisses":0,"swiftCacheHits":0,"swiftCacheMisses":0},"tasks":{"CompileC":{"cacheHits":1,"headerDependenciesNotValidatedTasks":1,"moduleDependenciesNotValidatedTasks":1 }}}"# )
272
272
273
273
// Modify the source file to trigger a cache miss.
274
274
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
@@ -288,7 +288,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
288
288
results. checkCompileCacheMiss ( compileTask)
289
289
results. checkNoDiagnostics ( )
290
290
}
291
- #expect( try readMetrics ( " three " ) == #"{"global":{"clangCacheHits":0,"clangCacheMisses":1,"swiftCacheHits":0,"swiftCacheMisses":0},"tasks":{"CompileC":{"cacheMisses":1}}}"# )
291
+ #expect( try readMetrics ( " three " ) == #"{"global":{"clangCacheHits":0,"clangCacheMisses":1,"swiftCacheHits":0,"swiftCacheMisses":0},"tasks":{"CompileC":{"cacheMisses":1,"headerDependenciesNotValidatedTasks":1,"moduleDependenciesNotValidatedTasks":1 }}}"# )
292
292
293
293
// Return to the original source -> should still be a hit.
294
294
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
@@ -308,7 +308,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
308
308
results. checkCompileCacheHit ( compileTask)
309
309
results. checkNoDiagnostics ( )
310
310
}
311
- #expect( try readMetrics ( " four " ) == #"{"global":{"clangCacheHits":1,"clangCacheMisses":0,"swiftCacheHits":0,"swiftCacheMisses":0},"tasks":{"CompileC":{"cacheHits":1}}}"# )
311
+ #expect( try readMetrics ( " four " ) == #"{"global":{"clangCacheHits":1,"clangCacheMisses":0,"swiftCacheHits":0,"swiftCacheMisses":0},"tasks":{"CompileC":{"cacheHits":1,"headerDependenciesNotValidatedTasks":1,"moduleDependenciesNotValidatedTasks":1 }}}"# )
312
312
313
313
// The cache should normally persist after the build.
314
314
#expect( tester. fs. exists ( tmpDirPath. join ( " CompilationCache " ) ) )
0 commit comments