Skip to content

Commit 0f31582

Browse files
committed
Rename traceFile to traceFilePath
1 parent c79c953 commit 0f31582

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Sources/SWBCore/SpecImplementations/Tools/CCompiler.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,9 @@ public struct ClangTaskPayload: ClangModuleVerifierPayloadType, DependencyInfoEd
433433
public let fileNameMapPath: Path?
434434

435435
public let moduleDependenciesContext: ModuleDependenciesContext?
436-
public let traceFile: Path?
436+
public let traceFilePath: Path?
437437

438-
fileprivate init(serializedDiagnosticsPath: Path?, indexingPayload: ClangIndexingPayload?, explicitModulesPayload: ClangExplicitModulesPayload? = nil, outputObjectFilePath: Path? = nil, fileNameMapPath: Path? = nil, developerPathString: String? = nil, moduleDependenciesContext: ModuleDependenciesContext? = nil, traceFile: Path? = nil) {
438+
fileprivate init(serializedDiagnosticsPath: Path?, indexingPayload: ClangIndexingPayload?, explicitModulesPayload: ClangExplicitModulesPayload? = nil, outputObjectFilePath: Path? = nil, fileNameMapPath: Path? = nil, developerPathString: String? = nil, moduleDependenciesContext: ModuleDependenciesContext? = nil, traceFilePath: Path? = nil) {
439439
if let developerPathString, explicitModulesPayload == nil {
440440
self.dependencyInfoEditPayload = .init(removablePaths: [], removableBasenames: [], developerPath: Path(developerPathString))
441441
} else {
@@ -447,7 +447,7 @@ public struct ClangTaskPayload: ClangModuleVerifierPayloadType, DependencyInfoEd
447447
self.outputObjectFilePath = outputObjectFilePath
448448
self.fileNameMapPath = fileNameMapPath
449449
self.moduleDependenciesContext = moduleDependenciesContext
450-
self.traceFile = traceFile
450+
self.traceFilePath = traceFilePath
451451
}
452452

453453
public func serialize<T: Serializer>(to serializer: T) {
@@ -459,7 +459,7 @@ public struct ClangTaskPayload: ClangModuleVerifierPayloadType, DependencyInfoEd
459459
serializer.serialize(fileNameMapPath)
460460
serializer.serialize(dependencyInfoEditPayload)
461461
serializer.serialize(moduleDependenciesContext)
462-
serializer.serialize(traceFile)
462+
serializer.serialize(traceFilePath)
463463
}
464464
}
465465

@@ -472,7 +472,7 @@ public struct ClangTaskPayload: ClangModuleVerifierPayloadType, DependencyInfoEd
472472
self.fileNameMapPath = try deserializer.deserialize()
473473
self.dependencyInfoEditPayload = try deserializer.deserialize()
474474
self.moduleDependenciesContext = try deserializer.deserialize()
475-
self.traceFile = try deserializer.deserialize()
475+
self.traceFilePath = try deserializer.deserialize()
476476
}
477477
}
478478

@@ -1166,7 +1166,7 @@ public class ClangCompilerSpec : CompilerSpec, SpecIdentifierType, GCCCompatible
11661166
}
11671167

11681168
let moduleDependenciesContext = cbc.producer.moduleDependenciesContext
1169-
let traceFile: Path?
1169+
let traceFilePath: Path?
11701170
if clangInfo?.hasFeature("print-headers-direct-per-file") ?? false,
11711171
(moduleDependenciesContext?.validate ?? .defaultValue) != .no {
11721172
let file = Path(outputNode.path.str + ".trace.json")
@@ -1176,9 +1176,9 @@ public class ClangCompilerSpec : CompilerSpec, SpecIdentifierType, GCCCompatible
11761176
"-Xclang", "-header-include-filtering=direct-per-file",
11771177
"-Xclang", "-header-include-format=json"
11781178
]
1179-
traceFile = file
1179+
traceFilePath = file
11801180
} else {
1181-
traceFile = nil
1181+
traceFilePath = nil
11821182
}
11831183

11841184
// Add the diagnostics serialization flag. We currently place the diagnostics file right next to the output object file.
@@ -1293,7 +1293,7 @@ public class ClangCompilerSpec : CompilerSpec, SpecIdentifierType, GCCCompatible
12931293
fileNameMapPath: verifierPayload?.fileNameMapPath,
12941294
developerPathString: recordSystemHeaderDepsOutsideSysroot ? cbc.scope.evaluate(BuiltinMacros.DEVELOPER_DIR).str : nil,
12951295
moduleDependenciesContext: moduleDependenciesContext,
1296-
traceFile: traceFile
1296+
traceFilePath: traceFilePath
12971297
)
12981298

12991299
var inputNodes: [any PlannedNode] = inputDeps.map { delegate.createNode($0) }

Sources/SWBTaskExecution/TaskActions/ClangCompileTaskAction.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,16 +249,16 @@ public final class ClangCompileTaskAction: TaskAction, BuildValueValidatingTaskA
249249
}
250250

251251
// Check if verifying dependencies from trace data is enabled.
252-
var traceFile: Path? = nil
252+
var traceFilePath: Path? = nil
253253
var moduleDependenciesContext: ModuleDependenciesContext? = nil
254254
if let payload = task.payload as? ClangTaskPayload {
255-
traceFile = payload.traceFile
255+
traceFilePath = payload.traceFilePath
256256
moduleDependenciesContext = payload.moduleDependenciesContext
257257
}
258-
if let traceFile {
258+
if let traceFilePath {
259259
// Remove the trace output file if it already exists.
260-
if executionDelegate.fs.exists(traceFile) {
261-
try executionDelegate.fs.remove(traceFile)
260+
if executionDelegate.fs.exists(traceFilePath) {
261+
try executionDelegate.fs.remove(traceFilePath)
262262
}
263263
}
264264

@@ -319,10 +319,10 @@ public final class ClangCompileTaskAction: TaskAction, BuildValueValidatingTaskA
319319
}
320320
}
321321

322-
if let moduleDependenciesContext, let traceFile, lastResult == .succeeded {
322+
if let moduleDependenciesContext, let traceFilePath, lastResult == .succeeded {
323323
// Verify the dependencies from the trace data.
324324
let fs = executionDelegate.fs
325-
let traceData = try JSONDecoder().decode(Array<TraceData>.self, from: fs.readMemoryMapped(traceFile))
325+
let traceData = try JSONDecoder().decode(Array<TraceData>.self, from: fs.readMemoryMapped(traceFilePath))
326326

327327
var allFiles = Set<Path>()
328328
traceData.forEach { allFiles.formUnion(Set($0.includes)) }

0 commit comments

Comments
 (0)