Revert "Merge pull request #5 from CognitiveDisson/fix-cache-miss-for-xcode13"

This reverts commit 0f44da7bea, reversing
changes made to caed3b253c.
This commit is contained in:
Bartosz Polaczyk
2021-10-18 21:50:32 +02:00
parent 80515205cc
commit a9ee8dceb3
4 changed files with 0 additions and 36 deletions
@@ -29,12 +29,6 @@ enum MachOType: String, Codable {
case unknown
}
enum PostbuildActionType: String, Codable {
case build
case index = "indexbuild"
case unknown
}
enum PostbuildContextError: Error {
/// URL address is not a valid URL
case invalidAddress(String)
@@ -77,8 +71,6 @@ public struct PostbuildContext {
let derivedSourcesDir: URL
/// List of all targets to downloaded from the thinning aggregation target
var thinnedTargets: [String]
/// Action type: build, indexbuild etc.
var action: PostbuildActionType = .unknown
}
extension PostbuildContext {
@@ -120,10 +112,5 @@ extension PostbuildContext {
derivedSourcesDir = try env.readEnv(key: "DERIVED_SOURCES_DIR")
let thinFocusedTargetsString: String = env.readEnv(key: "SPT_XCREMOTE_CACHE_THINNED_TARGETS") ?? ""
thinnedTargets = thinFocusedTargetsString.split(separator: ",").map(String.init)
if let rawAction = env.readEnv(key: "ACTION") {
action = PostbuildActionType(rawValue: rawAction) ?? .unknown
} else {
action = .unknown
}
}
}
@@ -47,11 +47,6 @@ public class XCPostbuild {
exit(1, "FATAL: Postbuild initialization failed with error: \(error)")
}
guard context.action != .index else {
printToUser("Indexbuild. Skip remote cache")
exit(0)
}
// Postbuild cannot disable marker, so NoopMarkerWriter used instead of a real file writer
let modeController = PhaseCacheModeController(
tempDir: context.targetTempDir,
@@ -24,12 +24,6 @@ enum PrebuildContextError: Error {
case invalidAddress(String)
}
enum PrebuildActionType: String, Codable {
case build
case index = "indexbuild"
case unknown
}
public struct PrebuildContext {
let targetTempDir: URL
let productsDir: URL
@@ -49,8 +43,6 @@ public struct PrebuildContext {
let targetName: String
/// List of all targets to downloaded from the thinning aggregation target
var thinnedTargets: [String]?
/// Action type: build, indexbuild etc.
var action: PrebuildActionType = .unknown
}
extension PrebuildContext {
@@ -72,10 +64,5 @@ extension PrebuildContext {
self.targetName = targetName
let thinFocusedTargetsString: String? = env.readEnv(key: "SPT_XCREMOTE_CACHE_THINNED_TARGETS")
thinnedTargets = thinFocusedTargetsString?.split(separator: ",").map(String.init)
if let rawAction = env.readEnv(key: "ACTION") {
action = PrebuildActionType(rawValue: rawAction) ?? .unknown
} else {
action = .unknown
}
}
}
@@ -36,11 +36,6 @@ public class XCPrebuild {
exit(1, "FATAL: Prebuild initialization failed with error: \(error)")
}
guard context.action != .index else {
printToUser("Indexbuild. Skip remote cache")
exit(0)
}
// Xcode may call xcprebuild phase even none of compilation files has changed (e.g. when switching between
// simulator versions) and modifying 'mdate' of a marker file unnecessary invalidates compilation steps
// that have to repeat their "use-from-cache" flow