Skip to content

Commit

Permalink
Merge pull request #135 from polac24/fix-hybrid-incremental
Browse files Browse the repository at this point in the history
Fix hybrid incremental performance
  • Loading branch information
polac24 authored May 16, 2022
2 parents 30e49ef + 59c1d99 commit 91505a5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/XCRemoteCache/Commands/Prebuild/XCPrebuild.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public class XCPrebuild {
exit(0)
}

let compilationHistoryOrganizer = CompilationHistoryFileOrganizer(
context.compilationHistoryFile,
fileManager: fileManager
)
do {
let envFingerprint = try EnvironmentFingerprintGenerator(
configuration: config,
Expand Down Expand Up @@ -148,10 +152,6 @@ public class XCPrebuild {
algorithm: MD5Algorithm()
)
let organizer = ZipArtifactOrganizer(targetTempDir: context.targetTempDir, fileManager: fileManager)
let compilationHistoryOrganizer = CompilationHistoryFileOrganizer(
context.compilationHistoryFile,
fileManager: fileManager
)
let metaReader = JsonMetaReader(fileAccessor: fileManager)
var consumerPlugins: [ArtifactConsumerPrebuildPlugin] = []

Expand Down Expand Up @@ -189,14 +189,14 @@ public class XCPrebuild {
case .compatible(localDependencies: let dependencies):
// TODO: pass `allowedInputFiles` observed in the build time
try modeController.enable(allowedInputFiles: dependencies, dependencies: dependencies)
compilationHistoryOrganizer.reset()
}
} catch {
disableRemoteCache(
modeController: modeController,
errorMessage: "Prebuild step failed with error: \(error)"
)
}
compilationHistoryOrganizer.reset()
}

private func disableRemoteCache(modeController: PhaseCacheModeController, errorMessage: String?) {
Expand Down

0 comments on commit 91505a5

Please sign in to comment.