Skip to content

Commit 172a494

Browse files
Update Xcodeproj to 8.24.3 (#1515)
* Update Xcodeproj to 8.24.3 * Bump macOS version * maintain support for removed gpuValidationMode enum --------- Co-authored-by: Yonas Kolb <[email protected]>
1 parent 26de8f1 commit 172a494

File tree

14 files changed

+156
-51
lines changed

14 files changed

+156
-51
lines changed

Docs/ProjectSpec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ The different actions share some properties:
10281028
- [ ] **postActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *after* the action
10291029
- [ ] **environmentVariables**: **[[Environment Variable](#environment-variable)]** or **[String:String]** - `run`, `test` and `profile` actions can define the environment variables. When passing a dictionary, every key-value entry maps to a corresponding variable that is enabled.
10301030
- [ ] **enableGPUFrameCaptureMode**: **GPUFrameCaptureMode** - Property value set for `GPU Frame Capture`. Possible values are `autoEnabled`, `metal`, `openGL`, `disabled`. Default is `autoEnabled`.
1031-
- [ ] **enableGPUValidationMode**: **GPUValidationMode** - Property value set for `Metal API Validation`. Possible values are `enabled`, `disabled`, `extended`. Default is `enabled`.
1031+
- [ ] **enableGPUValidationMode**: **Bool** - Property value set for `Metal API Validation`. This defaults to true.
10321032
- [ ] **disableMainThreadChecker**: **Bool** - `run` and `test` actions can define a boolean that indicates that this scheme should disable the Main Thread Checker. This defaults to false
10331033
- [ ] **stopOnEveryMainThreadCheckerIssue**: **Bool** - a boolean that indicates if this scheme should stop at every Main Thread Checker issue. This defaults to false
10341034
- [ ] **disableThreadPerformanceChecker**: **Bool** - `run` action can define a boolean that indicates that this scheme should disable the Thread Performance Checker. This defaults to false

Package.resolved

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
"kind" : "remoteSourceControl",
7878
"location" : "https://github.com/tuist/XcodeProj.git",
7979
"state" : {
80-
"revision" : "447c159b0c5fb047a024fd8d942d4a76cf47dde0",
81-
"version" : "8.16.0"
80+
"revision" : "dc3b87a4e69f9cd06c6cb16199f5d0472e57ef6b",
81+
"version" : "8.24.3"
8282
}
8383
},
8484
{

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let package = Package(
1616
.package(url: "https://github.com/yonaskolb/JSONUtilities.git", from: "4.2.0"),
1717
.package(url: "https://github.com/kylef/Spectre.git", from: "0.9.2"),
1818
.package(url: "https://github.com/onevcat/Rainbow.git", from: "4.0.0"),
19-
.package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.16.0"),
19+
.package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.24.3"),
2020
.package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.3"),
2121
.package(url: "https://github.com/mxcl/Version", from: "2.0.0"),
2222
.package(url: "https://github.com/freddi-kit/ArtifactBundleGen", exact: "0.0.6")

Sources/ProjectSpec/Scheme.swift

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,15 @@ public struct Scheme: Equatable {
131131
public static let stopOnEveryMainThreadCheckerIssueDefault = false
132132
public static let disableThreadPerformanceCheckerDefault = false
133133
public static let debugEnabledDefault = true
134+
public static let enableGPUValidationModeDefault = true
134135

135136
public var config: String?
136137
public var commandLineArguments: [String: Bool]
137138
public var preActions: [ExecutionAction]
138139
public var postActions: [ExecutionAction]
139140
public var environmentVariables: [XCScheme.EnvironmentVariable]
140141
public var enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode
141-
public var enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode
142+
public var enableGPUValidationMode: Bool
142143
public var disableMainThreadChecker: Bool
143144
public var stopOnEveryMainThreadCheckerIssue: Bool
144145
public var disableThreadPerformanceChecker: Bool
@@ -161,7 +162,7 @@ public struct Scheme: Equatable {
161162
postActions: [ExecutionAction] = [],
162163
environmentVariables: [XCScheme.EnvironmentVariable] = [],
163164
enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode,
164-
enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.enabled,
165+
enableGPUValidationMode: Bool = enableGPUValidationModeDefault,
165166
disableMainThreadChecker: Bool = disableMainThreadCheckerDefault,
166167
stopOnEveryMainThreadCheckerIssue: Bool = stopOnEveryMainThreadCheckerIssueDefault,
167168
disableThreadPerformanceChecker: Bool = disableThreadPerformanceCheckerDefault,
@@ -488,10 +489,16 @@ extension Scheme.Run: JSONObjectConvertible {
488489
} else {
489490
enableGPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode
490491
}
492+
493+
// support deprecated gpuValidationMode enum that was removed from XcodeProj
491494
if let gpuValidationMode: String = jsonDictionary.json(atKeyPath: "enableGPUValidationMode") {
492-
enableGPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.fromJSONValue(gpuValidationMode)
495+
switch gpuValidationMode {
496+
case "enabled", "extended": enableGPUValidationMode = true
497+
case "disabled": enableGPUValidationMode = false
498+
default: enableGPUValidationMode = Scheme.Run.enableGPUValidationModeDefault
499+
}
493500
} else {
494-
enableGPUValidationMode = XCScheme.LaunchAction.defaultGPUValidationMode
501+
enableGPUValidationMode = jsonDictionary.json(atKeyPath: "enableGPUValidationMode") ?? Scheme.Run.enableGPUValidationModeDefault
495502
}
496503
disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Run.disableMainThreadCheckerDefault
497504
stopOnEveryMainThreadCheckerIssue = jsonDictionary.json(atKeyPath: "stopOnEveryMainThreadCheckerIssue") ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault
@@ -539,8 +546,8 @@ extension Scheme.Run: JSONEncodable {
539546
dict["enableGPUFrameCaptureMode"] = enableGPUFrameCaptureMode.toJSONValue()
540547
}
541548

542-
if enableGPUValidationMode != XCScheme.LaunchAction.defaultGPUValidationMode {
543-
dict["enableGPUValidationMode"] = enableGPUValidationMode.toJSONValue()
549+
if enableGPUValidationMode != Scheme.Run.enableGPUValidationModeDefault {
550+
dict["enableGPUValidationMode"] = enableGPUValidationMode
544551
}
545552

546553
if disableMainThreadChecker != Scheme.Run.disableMainThreadCheckerDefault {
@@ -1002,32 +1009,6 @@ extension XCScheme.LaunchAction.GPUFrameCaptureMode: JSONEncodable {
10021009
}
10031010
}
10041011

1005-
extension XCScheme.LaunchAction.GPUValidationMode: JSONEncodable {
1006-
public func toJSONValue() -> Any {
1007-
switch self {
1008-
case .enabled:
1009-
return "enabled"
1010-
case .disabled:
1011-
return "disabled"
1012-
case .extended:
1013-
return "extended"
1014-
}
1015-
}
1016-
1017-
static func fromJSONValue(_ string: String) -> XCScheme.LaunchAction.GPUValidationMode {
1018-
switch string {
1019-
case "enabled":
1020-
return .enabled
1021-
case "disabled":
1022-
return .disabled
1023-
case "extended":
1024-
return .extended
1025-
default:
1026-
fatalError("Invalid enableGPUValidationMode value. Valid values are: enable, disable, extended")
1027-
}
1028-
}
1029-
}
1030-
10311012
extension XCScheme.TestAction.ScreenCaptureFormat: JSONEncodable {
10321013
public func toJSONValue() -> Any {
10331014
rawValue

Sources/XcodeGenKit/PBXProjGenerator.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ public class PBXProjGenerator {
102102
name: project.name,
103103
buildConfigurationList: buildConfigList,
104104
compatibilityVersion: project.compatibilityVersion,
105+
preferredProjectObjectVersion: Int(project.objectVersion),
106+
minimizedProjectReferenceProxies: project.minimizedProjectReferenceProxies,
105107
mainGroup: mainGroup,
106108
developmentRegion: developmentRegion
107109
)

Sources/XcodeGenKit/SchemeGenerator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public class SchemeGenerator {
358358
allowLocationSimulation: allowLocationSimulation,
359359
locationScenarioReference: locationScenarioReference,
360360
enableGPUFrameCaptureMode: scheme.run?.enableGPUFrameCaptureMode ?? XCScheme.LaunchAction.defaultGPUFrameCaptureMode,
361-
enableGPUValidationMode: scheme.run?.enableGPUValidationMode ?? XCScheme.LaunchAction.defaultGPUValidationMode,
361+
disableGPUValidationMode: !(scheme.run?.enableGPUValidationMode ?? Scheme.Run.enableGPUValidationModeDefault),
362362
disableMainThreadChecker: scheme.run?.disableMainThreadChecker ?? Scheme.Run.disableMainThreadCheckerDefault,
363363
disablePerformanceAntipatternChecker: scheme.run?.disableThreadPerformanceChecker ?? Scheme.Run.disableThreadPerformanceCheckerDefault,
364364
stopOnEveryMainThreadCheckerIssue: scheme.run?.stopOnEveryMainThreadCheckerIssue ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault,

Sources/XcodeGenKit/Version.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ extension Project {
1818
var objectVersion: UInt {
1919
54
2020
}
21+
22+
var minimizedProjectReferenceProxies: Int {
23+
1
24+
}
2125
}
2226

2327
public struct XCodeVersion {

Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@
254254
dependencies = (
255255
);
256256
name = Framework_tvOS;
257+
packageProductDependencies = (
258+
);
257259
productName = Framework_tvOS;
258260
productReference = 7D67F1C1BFBACE101DE7DB51 /* Framework.framework */;
259261
productType = "com.apple.product-type.framework";
@@ -270,6 +272,8 @@
270272
dependencies = (
271273
);
272274
name = Framework_macOS;
275+
packageProductDependencies = (
276+
);
273277
productName = Framework_macOS;
274278
productReference = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */;
275279
productType = "com.apple.product-type.framework";
@@ -286,6 +290,8 @@
286290
dependencies = (
287291
);
288292
name = Framework_watchOS;
293+
packageProductDependencies = (
294+
);
289295
productName = Framework_watchOS;
290296
productReference = 6177CC6263783487E93F7F4D /* Framework.framework */;
291297
productType = "com.apple.product-type.framework";
@@ -302,6 +308,8 @@
302308
dependencies = (
303309
);
304310
name = Framework_iOS;
311+
packageProductDependencies = (
312+
);
305313
productName = Framework_iOS;
306314
productReference = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */;
307315
productType = "com.apple.product-type.framework";
@@ -326,6 +334,8 @@
326334
en,
327335
);
328336
mainGroup = 293D0FF827366B513839236A;
337+
minimizedProjectReferenceProxies = 1;
338+
preferredProjectObjectVersion = 54;
329339
projectDirPath = "";
330340
projectRoot = "";
331341
targets = (

Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
D287BAAB664D1A024D9DD57E /* PBXTargetDependency */,
1717
);
1818
name = AggTarget;
19+
packageProductDependencies = (
20+
);
1921
productName = AggTarget;
2022
};
2123
/* End PBXAggregateTarget section */
@@ -168,6 +170,8 @@
168170
8693351DA9DBE579AC9DD513 /* PBXTargetDependency */,
169171
);
170172
name = Tests;
173+
packageProductDependencies = (
174+
);
171175
productName = Tests;
172176
productReference = 0613661C0D45064E81E80C37 /* Tests.xctest */;
173177
productType = "com.apple.product-type.bundle.unit-test";
@@ -247,13 +251,15 @@
247251
en,
248252
);
249253
mainGroup = 218F6C96DF9E182F526258CF;
254+
minimizedProjectReferenceProxies = 1;
250255
packageReferences = (
251256
5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */,
252257
348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */,
253258
E3887F3CB2C069E70D98092F /* XCRemoteSwiftPackageReference "SwiftRoaring" */,
254259
630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */,
255260
C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */,
256261
);
262+
preferredProjectObjectVersion = 54;
257263
projectDirPath = "";
258264
projectRoot = "";
259265
targets = (
@@ -637,6 +643,17 @@
637643
};
638644
/* End XCConfigurationList section */
639645

646+
/* Begin XCLocalSwiftPackageReference section */
647+
630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */ = {
648+
isa = XCLocalSwiftPackageReference;
649+
relativePath = FooFeature;
650+
};
651+
C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */ = {
652+
isa = XCLocalSwiftPackageReference;
653+
relativePath = ../../..;
654+
};
655+
/* End XCLocalSwiftPackageReference section */
656+
640657
/* Begin XCRemoteSwiftPackageReference section */
641658
348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */ = {
642659
isa = XCRemoteSwiftPackageReference;
@@ -664,17 +681,6 @@
664681
};
665682
/* End XCRemoteSwiftPackageReference section */
666683

667-
/* Begin XCLocalSwiftPackageReference section */
668-
630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */ = {
669-
isa = XCLocalSwiftPackageReference;
670-
relativePath = FooFeature;
671-
};
672-
C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */ = {
673-
isa = XCLocalSwiftPackageReference;
674-
relativePath = ../../..;
675-
};
676-
/* End XCLocalSwiftPackageReference section */
677-
678684
/* Begin XCSwiftPackageProductDependency section */
679685
15DB49096E2978F6BCA8D604 /* FooUI */ = {
680686
isa = XCSwiftPackageProductDependency;

Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
dependencies = (
5656
);
5757
name = IncludedLegacy;
58+
packageProductDependencies = (
59+
);
5860
passBuildSettingsInEnvironment = 0;
5961
productName = IncludedLegacy;
6062
};
@@ -71,6 +73,8 @@
7173
dependencies = (
7274
);
7375
name = BundleY;
76+
packageProductDependencies = (
77+
);
7478
productName = BundleY;
7579
productReference = F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */;
7680
productType = "com.apple.product-type.bundle";
@@ -85,6 +89,8 @@
8589
dependencies = (
8690
);
8791
name = BundleX;
92+
packageProductDependencies = (
93+
);
8894
productName = BundleX;
8995
productReference = 6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */;
9096
productType = "com.apple.product-type.bundle";
@@ -100,6 +106,8 @@
100106
dependencies = (
101107
);
102108
name = ExternalTarget;
109+
packageProductDependencies = (
110+
);
103111
productName = ExternalTarget;
104112
productReference = D6340FC7DEBC81E0127BAFD6 /* ExternalTarget.framework */;
105113
productType = "com.apple.product-type.framework";
@@ -123,6 +131,8 @@
123131
en,
124132
);
125133
mainGroup = 4E8CFA4275C972686621210C;
134+
minimizedProjectReferenceProxies = 1;
135+
preferredProjectObjectVersion = 54;
126136
projectDirPath = "";
127137
projectRoot = "";
128138
targets = (

0 commit comments

Comments
 (0)