diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c41ae63e..773a0e3ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,10 +8,10 @@ jobs: name: Xcode ${{ matrix.xcode }} strategy: matrix: - xcode: ["14.3.1"] + xcode: ["15.4"] include: - - xcode: "14.3.1" - macos: macos-13 + - xcode: "15.4" + macos: macos-14 env: DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer steps: diff --git a/Docs/ProjectSpec.md b/Docs/ProjectSpec.md index 5dfec8f3d..e3e9dd718 100644 --- a/Docs/ProjectSpec.md +++ b/Docs/ProjectSpec.md @@ -1028,7 +1028,7 @@ The different actions share some properties: - [ ] **postActions**: **[[Execution Action](#execution-action)]** - Scripts that are run *after* the action - [ ] **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. - [ ] **enableGPUFrameCaptureMode**: **GPUFrameCaptureMode** - Property value set for `GPU Frame Capture`. Possible values are `autoEnabled`, `metal`, `openGL`, `disabled`. Default is `autoEnabled`. -- [ ] **enableGPUValidationMode**: **GPUValidationMode** - Property value set for `Metal API Validation`. Possible values are `enabled`, `disabled`, `extended`. Default is `enabled`. +- [ ] **enableGPUValidationMode**: **Bool** - Property value set for `Metal API Validation`. This defaults to true. - [ ] **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 - [ ] **stopOnEveryMainThreadCheckerIssue**: **Bool** - a boolean that indicates if this scheme should stop at every Main Thread Checker issue. This defaults to false - [ ] **disableThreadPerformanceChecker**: **Bool** - `run` action can define a boolean that indicates that this scheme should disable the Thread Performance Checker. This defaults to false diff --git a/Package.resolved b/Package.resolved index b4c35e437..237f873fa 100644 --- a/Package.resolved +++ b/Package.resolved @@ -77,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tuist/XcodeProj.git", "state" : { - "revision" : "447c159b0c5fb047a024fd8d942d4a76cf47dde0", - "version" : "8.16.0" + "revision" : "dc3b87a4e69f9cd06c6cb16199f5d0472e57ef6b", + "version" : "8.24.3" } }, { diff --git a/Package.swift b/Package.swift index 8e32c5858..016cabe93 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ let package = Package( .package(url: "https://github.com/yonaskolb/JSONUtilities.git", from: "4.2.0"), .package(url: "https://github.com/kylef/Spectre.git", from: "0.9.2"), .package(url: "https://github.com/onevcat/Rainbow.git", from: "4.0.0"), - .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.16.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.24.3"), .package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.3"), .package(url: "https://github.com/mxcl/Version", from: "2.0.0"), .package(url: "https://github.com/freddi-kit/ArtifactBundleGen", exact: "0.0.6") diff --git a/Sources/ProjectSpec/Scheme.swift b/Sources/ProjectSpec/Scheme.swift index a476b71a6..94763b285 100644 --- a/Sources/ProjectSpec/Scheme.swift +++ b/Sources/ProjectSpec/Scheme.swift @@ -131,6 +131,7 @@ public struct Scheme: Equatable { public static let stopOnEveryMainThreadCheckerIssueDefault = false public static let disableThreadPerformanceCheckerDefault = false public static let debugEnabledDefault = true + public static let enableGPUValidationModeDefault = true public var config: String? public var commandLineArguments: [String: Bool] @@ -138,7 +139,7 @@ public struct Scheme: Equatable { public var postActions: [ExecutionAction] public var environmentVariables: [XCScheme.EnvironmentVariable] public var enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode - public var enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode + public var enableGPUValidationMode: Bool public var disableMainThreadChecker: Bool public var stopOnEveryMainThreadCheckerIssue: Bool public var disableThreadPerformanceChecker: Bool @@ -161,7 +162,7 @@ public struct Scheme: Equatable { postActions: [ExecutionAction] = [], environmentVariables: [XCScheme.EnvironmentVariable] = [], enableGPUFrameCaptureMode: XCScheme.LaunchAction.GPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode, - enableGPUValidationMode: XCScheme.LaunchAction.GPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.enabled, + enableGPUValidationMode: Bool = enableGPUValidationModeDefault, disableMainThreadChecker: Bool = disableMainThreadCheckerDefault, stopOnEveryMainThreadCheckerIssue: Bool = stopOnEveryMainThreadCheckerIssueDefault, disableThreadPerformanceChecker: Bool = disableThreadPerformanceCheckerDefault, @@ -484,11 +485,7 @@ extension Scheme.Run: JSONObjectConvertible { } else { enableGPUFrameCaptureMode = XCScheme.LaunchAction.defaultGPUFrameCaptureMode } - if let gpuValidationMode: String = jsonDictionary.json(atKeyPath: "enableGPUValidationMode") { - enableGPUValidationMode = XCScheme.LaunchAction.GPUValidationMode.fromJSONValue(gpuValidationMode) - } else { - enableGPUValidationMode = XCScheme.LaunchAction.defaultGPUValidationMode - } + enableGPUValidationMode = jsonDictionary.json(atKeyPath: "enableGPUValidationMode") ?? Scheme.Run.enableGPUValidationModeDefault disableMainThreadChecker = jsonDictionary.json(atKeyPath: "disableMainThreadChecker") ?? Scheme.Run.disableMainThreadCheckerDefault stopOnEveryMainThreadCheckerIssue = jsonDictionary.json(atKeyPath: "stopOnEveryMainThreadCheckerIssue") ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault disableThreadPerformanceChecker = jsonDictionary.json(atKeyPath: "disableThreadPerformanceChecker") ?? Scheme.Run.disableThreadPerformanceCheckerDefault @@ -535,8 +532,8 @@ extension Scheme.Run: JSONEncodable { dict["enableGPUFrameCaptureMode"] = enableGPUFrameCaptureMode.toJSONValue() } - if enableGPUValidationMode != XCScheme.LaunchAction.defaultGPUValidationMode { - dict["enableGPUValidationMode"] = enableGPUValidationMode.toJSONValue() + if enableGPUValidationMode != Scheme.Run.enableGPUValidationModeDefault { + dict["enableGPUValidationMode"] = enableGPUValidationMode } if disableMainThreadChecker != Scheme.Run.disableMainThreadCheckerDefault { @@ -992,29 +989,3 @@ extension XCScheme.LaunchAction.GPUFrameCaptureMode: JSONEncodable { } } } - -extension XCScheme.LaunchAction.GPUValidationMode: JSONEncodable { - public func toJSONValue() -> Any { - switch self { - case .enabled: - return "enabled" - case .disabled: - return "disabled" - case .extended: - return "extended" - } - } - - static func fromJSONValue(_ string: String) -> XCScheme.LaunchAction.GPUValidationMode { - switch string { - case "enabled": - return .enabled - case "disabled": - return .disabled - case "extended": - return .extended - default: - fatalError("Invalid enableGPUValidationMode value. Valid values are: enable, disable, extended") - } - } -} diff --git a/Sources/XcodeGenKit/PBXProjGenerator.swift b/Sources/XcodeGenKit/PBXProjGenerator.swift index a5f667afd..e54c745f2 100644 --- a/Sources/XcodeGenKit/PBXProjGenerator.swift +++ b/Sources/XcodeGenKit/PBXProjGenerator.swift @@ -102,6 +102,8 @@ public class PBXProjGenerator { name: project.name, buildConfigurationList: buildConfigList, compatibilityVersion: project.compatibilityVersion, + preferredProjectObjectVersion: Int(project.objectVersion), + minimizedProjectReferenceProxies: project.minimizedProjectReferenceProxies, mainGroup: mainGroup, developmentRegion: developmentRegion ) diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index ac100e89f..2db1a4ad7 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -357,7 +357,7 @@ public class SchemeGenerator { allowLocationSimulation: allowLocationSimulation, locationScenarioReference: locationScenarioReference, enableGPUFrameCaptureMode: scheme.run?.enableGPUFrameCaptureMode ?? XCScheme.LaunchAction.defaultGPUFrameCaptureMode, - enableGPUValidationMode: scheme.run?.enableGPUValidationMode ?? XCScheme.LaunchAction.defaultGPUValidationMode, + disableGPUValidationMode: !(scheme.run?.enableGPUValidationMode ?? Scheme.Run.enableGPUValidationModeDefault), disableMainThreadChecker: scheme.run?.disableMainThreadChecker ?? Scheme.Run.disableMainThreadCheckerDefault, disablePerformanceAntipatternChecker: scheme.run?.disableThreadPerformanceChecker ?? Scheme.Run.disableThreadPerformanceCheckerDefault, stopOnEveryMainThreadCheckerIssue: scheme.run?.stopOnEveryMainThreadCheckerIssue ?? Scheme.Run.stopOnEveryMainThreadCheckerIssueDefault, diff --git a/Sources/XcodeGenKit/Version.swift b/Sources/XcodeGenKit/Version.swift index 0f4fed636..57618046d 100644 --- a/Sources/XcodeGenKit/Version.swift +++ b/Sources/XcodeGenKit/Version.swift @@ -18,6 +18,10 @@ extension Project { var objectVersion: UInt { 54 } + + var minimizedProjectReferenceProxies: Int { + 1 + } } public struct XCodeVersion { diff --git a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj index a9c8a23cb..eb6cf67fe 100644 --- a/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/CarthageProject/Project.xcodeproj/project.pbxproj @@ -254,6 +254,8 @@ dependencies = ( ); name = Framework_tvOS; + packageProductDependencies = ( + ); productName = Framework_tvOS; productReference = 7D67F1C1BFBACE101DE7DB51 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -270,6 +272,8 @@ dependencies = ( ); name = Framework_macOS; + packageProductDependencies = ( + ); productName = Framework_macOS; productReference = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -286,6 +290,8 @@ dependencies = ( ); name = Framework_watchOS; + packageProductDependencies = ( + ); productName = Framework_watchOS; productReference = 6177CC6263783487E93F7F4D /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -302,6 +308,8 @@ dependencies = ( ); name = Framework_iOS; + packageProductDependencies = ( + ); productName = Framework_iOS; productReference = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -326,6 +334,8 @@ en, ); mainGroup = 293D0FF827366B513839236A; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 54; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj index 2e33e2c09..59311f725 100644 --- a/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/SPM/SPM.xcodeproj/project.pbxproj @@ -16,6 +16,8 @@ D287BAAB664D1A024D9DD57E /* PBXTargetDependency */, ); name = AggTarget; + packageProductDependencies = ( + ); productName = AggTarget; }; /* End PBXAggregateTarget section */ @@ -168,6 +170,8 @@ 8693351DA9DBE579AC9DD513 /* PBXTargetDependency */, ); name = Tests; + packageProductDependencies = ( + ); productName = Tests; productReference = 0613661C0D45064E81E80C37 /* Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -247,6 +251,7 @@ en, ); mainGroup = 218F6C96DF9E182F526258CF; + minimizedProjectReferenceProxies = 1; packageReferences = ( 5BA91390AE78D2EE15C60091 /* XCRemoteSwiftPackageReference "Codability" */, 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */, @@ -254,6 +259,7 @@ 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */, C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */, ); + preferredProjectObjectVersion = 54; projectDirPath = ""; projectRoot = ""; targets = ( @@ -637,6 +643,17 @@ }; /* End XCConfigurationList section */ +/* Begin XCLocalSwiftPackageReference section */ + 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = FooFeature; + }; + C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */ = { + isa = XCLocalSwiftPackageReference; + relativePath = ../../..; + }; +/* End XCLocalSwiftPackageReference section */ + /* Begin XCRemoteSwiftPackageReference section */ 348C81C327DB1710B742C370 /* XCRemoteSwiftPackageReference "Prefire" */ = { isa = XCRemoteSwiftPackageReference; @@ -664,17 +681,6 @@ }; /* End XCRemoteSwiftPackageReference section */ -/* Begin XCLocalSwiftPackageReference section */ - 630A8CE9F2BE39704ED9D461 /* XCLocalSwiftPackageReference "FooFeature" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = FooFeature; - }; - C6539B364583AE96C18CE377 /* XCLocalSwiftPackageReference "../../.." */ = { - isa = XCLocalSwiftPackageReference; - relativePath = ../../..; - }; -/* End XCLocalSwiftPackageReference section */ - /* Begin XCSwiftPackageProductDependency section */ 15DB49096E2978F6BCA8D604 /* FooUI */ = { isa = XCSwiftPackageProductDependency; diff --git a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj index 67468978a..8592ba116 100644 --- a/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/AnotherProject/AnotherProject.xcodeproj/project.pbxproj @@ -55,6 +55,8 @@ dependencies = ( ); name = IncludedLegacy; + packageProductDependencies = ( + ); passBuildSettingsInEnvironment = 0; productName = IncludedLegacy; }; @@ -71,6 +73,8 @@ dependencies = ( ); name = BundleY; + packageProductDependencies = ( + ); productName = BundleY; productReference = F1EFFCA88BFC3A1DD2D89DA7 /* BundleY.bundle */; productType = "com.apple.product-type.bundle"; @@ -85,6 +89,8 @@ dependencies = ( ); name = BundleX; + packageProductDependencies = ( + ); productName = BundleX; productReference = 6023D61BF2C57E6AE09CE7A3 /* BundleX.bundle */; productType = "com.apple.product-type.bundle"; @@ -100,6 +106,8 @@ dependencies = ( ); name = ExternalTarget; + packageProductDependencies = ( + ); productName = ExternalTarget; productReference = D6340FC7DEBC81E0127BAFD6 /* ExternalTarget.framework */; productType = "com.apple.product-type.framework"; @@ -123,6 +131,8 @@ en, ); mainGroup = 4E8CFA4275C972686621210C; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 54; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj index 09b541bf6..a89b434d4 100644 --- a/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj @@ -18,6 +18,8 @@ 106CDB4BCFD183241A565E6C /* PBXTargetDependency */, ); name = SuperTarget; + packageProductDependencies = ( + ); productName = SuperTarget; }; /* End PBXAggregateTarget section */ @@ -1731,6 +1733,8 @@ dependencies = ( ); name = IncludedLegacy; + packageProductDependencies = ( + ); passBuildSettingsInEnvironment = 0; productName = IncludedLegacy; }; @@ -1744,6 +1748,8 @@ dependencies = ( ); name = Legacy; + packageProductDependencies = ( + ); passBuildSettingsInEnvironment = 1; productName = Legacy; }; @@ -1773,6 +1779,8 @@ B95DA92D1265C094E71B4A5D /* PBXTargetDependency */, ); name = App_macOS; + packageProductDependencies = ( + ); productName = App_macOS; productReference = 33F6DCDC37D2E66543D4965D /* App_macOS.app */; productType = "com.apple.product-type.application"; @@ -1790,6 +1798,8 @@ dependencies = ( ); name = TestFramework; + packageProductDependencies = ( + ); productName = TestFramework; productReference = E43116070AFEF5D8C3A5A957 /* TestFramework.framework */; productType = "com.apple.product-type.framework"; @@ -1840,6 +1850,8 @@ dependencies = ( ); name = Tool; + packageProductDependencies = ( + ); productName = Tool; productReference = BECEA4A483ADEB8158F640B3 /* Tool */; productType = "com.apple.product-type.tool"; @@ -1857,6 +1869,8 @@ dependencies = ( ); name = CrossOverlayFramework_iOS; + packageProductDependencies = ( + ); productName = CrossOverlayFramework_iOS; productReference = 8FE05BF7897ECFD58B7AC8B1 /* CrossOverlayFramework.framework */; productType = "com.apple.product-type.framework"; @@ -1873,6 +1887,8 @@ dependencies = ( ); name = StaticLibrary_ObjC_iOS; + packageProductDependencies = ( + ); productName = StaticLibrary_ObjC_iOS; productReference = B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */; productType = "com.apple.product-type.library.static"; @@ -1888,6 +1904,8 @@ dependencies = ( ); name = iMessageStickersExtension; + packageProductDependencies = ( + ); productName = iMessageStickersExtension; productReference = C53ACB2962FED621389C36A2 /* iMessageStickersExtension.appex */; productType = "com.apple.product-type.app-extension.messages-sticker-pack"; @@ -1904,6 +1922,8 @@ dependencies = ( ); name = StaticLibrary_Swift; + packageProductDependencies = ( + ); productName = StaticLibrary_Swift; productReference = 8CB86294FB939FE6E90932E1 /* libStaticLibrary_Swift.a */; productType = "com.apple.product-type.library.static"; @@ -1920,6 +1940,8 @@ dependencies = ( ); name = iMessageExtension; + packageProductDependencies = ( + ); productName = iMessageExtension; productReference = D629E142AB87C681D4EC90F7 /* iMessageExtension.appex */; productType = "com.apple.product-type.app-extension.messages"; @@ -1937,6 +1959,8 @@ 62DA64F61B337719A2CF993D /* PBXTargetDependency */, ); name = App_watchOS; + packageProductDependencies = ( + ); productName = App_watchOS; productReference = A680BE9F68A255B0FB291AE6 /* App_watchOS.app */; productType = "com.apple.product-type.application.watchapp2"; @@ -1951,6 +1975,8 @@ dependencies = ( ); name = BundleY; + packageProductDependencies = ( + ); productName = BundleY; productReference = BB677D970923F663D846D7E0 /* BundleY.bundle */; productType = "com.apple.product-type.bundle"; @@ -1968,6 +1994,8 @@ dependencies = ( ); name = CrossOverlayFramework_macOS; + packageProductDependencies = ( + ); productName = CrossOverlayFramework_macOS; productReference = E0F31A9DE15B210D101AFC81 /* CrossOverlayFramework.framework */; productType = "com.apple.product-type.framework"; @@ -1985,6 +2013,8 @@ dependencies = ( ); name = "App_watchOS Extension"; + packageProductDependencies = ( + ); productName = "App_watchOS Extension"; productReference = 0D09D243DBCF9D32E239F1E8 /* App_watchOS Extension.appex */; productType = "com.apple.product-type.watchkit2-extension"; @@ -2002,6 +2032,8 @@ dependencies = ( ); name = CrossOverlayFramework_tvOS; + packageProductDependencies = ( + ); productName = CrossOverlayFramework_tvOS; productReference = 0095836FE59395511E0CB4F0 /* CrossOverlayFramework.framework */; productType = "com.apple.product-type.framework"; @@ -2018,6 +2050,8 @@ dependencies = ( ); name = DriverKitDriver; + packageProductDependencies = ( + ); productName = DriverKitDriver; productReference = 83B5EC7EF81F7E4B6F426D4E /* DriverKitDriver.dext */; productType = "com.apple.product-type.driver-extension"; @@ -2038,6 +2072,8 @@ CE96B0951433713033A03DCD /* PBXTargetDependency */, ); name = Framework_tvOS; + packageProductDependencies = ( + ); productName = Framework_tvOS; productReference = 7D67F1C1BFBACE101DE7DB51 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -2057,6 +2093,8 @@ AD555A4814F2D294E2AC72D8 /* PBXTargetDependency */, ); name = Framework_macOS; + packageProductDependencies = ( + ); productName = Framework_macOS; productReference = 41FC82ED1C4C3B7B3D7B2FB7 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -2073,6 +2111,8 @@ dependencies = ( ); name = StaticLibrary_ObjC_macOS; + packageProductDependencies = ( + ); productName = StaticLibrary_ObjC_macOS; productReference = 86169DEEDEAF09AB89C8A31D /* libStaticLibrary_ObjC.a */; productType = "com.apple.product-type.library.static"; @@ -2092,6 +2132,8 @@ 2D1B4333107E10912508724E /* PBXTargetDependency */, ); name = App_Clip_Tests; + packageProductDependencies = ( + ); productName = App_Clip_Tests; productReference = 3FC04772130400920D68A167 /* App_Clip_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -2108,6 +2150,8 @@ dependencies = ( ); name = Framework2_watchOS; + packageProductDependencies = ( + ); productName = Framework2_watchOS; productReference = AB055761199DF36DB0C629A6 /* Framework2.framework */; productType = "com.apple.product-type.framework"; @@ -2128,6 +2172,8 @@ 35DF16CA4A1F88140CF69620 /* PBXTargetDependency */, ); name = Framework_watchOS; + packageProductDependencies = ( + ); productName = Framework_watchOS; productReference = 6177CC6263783487E93F7F4D /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -2145,6 +2191,8 @@ 8B1B6143B8996B3CF0FE61C5 /* PBXTargetDependency */, ); name = App_macOS_Tests; + packageProductDependencies = ( + ); productName = App_macOS_Tests; productReference = 0B9D98D935F2C69A1F5BA539 /* App_macOS_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -2161,6 +2209,8 @@ dependencies = ( ); name = StaticLibrary_ObjC_watchOS; + packageProductDependencies = ( + ); productName = StaticLibrary_ObjC_watchOS; productReference = 46DD8F9AAC104BDB63793625 /* libStaticLibrary_ObjC.a */; productType = "com.apple.product-type.library.static"; @@ -2178,6 +2228,8 @@ 053FF4219E7A0E38E90071B0 /* PBXTargetDependency */, ); name = iMessageApp; + packageProductDependencies = ( + ); productName = iMessageApp; productReference = 9A87A926D563773658FB87FE /* iMessageApp.app */; productType = "com.apple.product-type.application.messages"; @@ -2194,6 +2246,8 @@ dependencies = ( ); name = Framework2_tvOS; + packageProductDependencies = ( + ); productName = Framework2_tvOS; productReference = A0DC40025AB59B688E758829 /* Framework2.framework */; productType = "com.apple.product-type.framework"; @@ -2211,6 +2265,8 @@ 1341A437B2D0402F4F4CEA51 /* PBXTargetDependency */, ); name = App_Clip_UITests; + packageProductDependencies = ( + ); productName = App_Clip_UITests; productReference = 7C7EC00B53FF878007F6ECAB /* App_Clip_UITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; @@ -2227,6 +2283,8 @@ dependencies = ( ); name = StaticLibrary_ObjC_tvOS; + packageProductDependencies = ( + ); productName = StaticLibrary_ObjC_tvOS; productReference = 469B630D28015F0EDC456F6B /* libStaticLibrary_ObjC.a */; productType = "com.apple.product-type.library.static"; @@ -2243,6 +2301,8 @@ dependencies = ( ); name = EndpointSecuritySystemExtension; + packageProductDependencies = ( + ); productName = EndpointSecuritySystemExtension; productReference = E5E0A80CCE8F8DB662DCD2D0 /* EndpointSecuritySystemExtension.systemextension */; productType = "com.apple.product-type.system-extension"; @@ -2259,6 +2319,8 @@ dependencies = ( ); name = NetworkSystemExtension; + packageProductDependencies = ( + ); productName = NetworkSystemExtension; productReference = 2049B6DD2AFE85F9DC9F3EB3 /* NetworkSystemExtension.systemextension */; productType = "com.apple.product-type.system-extension"; @@ -2278,6 +2340,8 @@ 486D84E583999BAA22C679EC /* PBXTargetDependency */, ); name = Framework_iOS; + packageProductDependencies = ( + ); productName = Framework_iOS; productReference = 8A9274BE42A03DC5DA1FAD04 /* Framework.framework */; productType = "com.apple.product-type.framework"; @@ -2293,6 +2357,8 @@ dependencies = ( ); name = EntitledApp; + packageProductDependencies = ( + ); productName = EntitledApp; productReference = 7D700FA699849D2F95216883 /* EntitledApp.app */; productType = "com.apple.product-type.application"; @@ -2330,6 +2396,8 @@ dependencies = ( ); name = CrossOverlayFramework_watchOS; + packageProductDependencies = ( + ); productName = CrossOverlayFramework_watchOS; productReference = 89EB41A001D8BF26431C5798 /* CrossOverlayFramework.framework */; productType = "com.apple.product-type.framework"; @@ -2346,6 +2414,8 @@ dependencies = ( ); name = Framework2_iOS; + packageProductDependencies = ( + ); productName = Framework2_iOS; productReference = 3EF21DF245F66BEF5446AAEF /* Framework2.framework */; productType = "com.apple.product-type.framework"; @@ -2368,6 +2438,8 @@ CFEACC1CED73B52EA1CCD054 /* PBXTargetDependency */, ); name = App_Clip; + packageProductDependencies = ( + ); productName = App_Clip; productReference = 38DB679FF1CF4E379D1AB103 /* App_Clip.app */; productType = "com.apple.product-type.application.on-demand-install-capable"; @@ -2382,6 +2454,8 @@ dependencies = ( ); name = BundleX; + packageProductDependencies = ( + ); productName = BundleX; productReference = 84317819C92F78425870E483 /* BundleX.bundle */; productType = "com.apple.product-type.bundle"; @@ -2401,6 +2475,8 @@ 6AE62A40F64046B597B07801 /* PBXTargetDependency */, ); name = App_iOS_Tests; + packageProductDependencies = ( + ); productName = App_iOS_Tests; productReference = CB77A637470A3CDA2BDDBE99 /* App_iOS_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -2416,6 +2492,8 @@ dependencies = ( ); name = ExternalTarget; + packageProductDependencies = ( + ); productName = ExternalTarget; productReference = 2385A62F6C6EE8D461EE19F2 /* ExternalTarget.framework */; productType = "com.apple.product-type.framework"; @@ -2431,6 +2509,8 @@ dependencies = ( ); name = "XPC Service"; + packageProductDependencies = ( + ); productName = "XPC Service"; productReference = 22237B8EBD9E6BE8EBC8735F /* XPC Service.xpc */; productType = "com.apple.product-type.xpc-service"; @@ -2448,6 +2528,8 @@ 49587048934568C2182DA825 /* PBXTargetDependency */, ); name = App_iOS_UITests; + packageProductDependencies = ( + ); productName = App_iOS_UITests; productReference = 13EEAB58665D79C15184D9D0 /* App_iOS_UITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; @@ -2464,6 +2546,8 @@ dependencies = ( ); name = Framework2_macOS; + packageProductDependencies = ( + ); productName = Framework2_macOS; productReference = 2233774B86539B1574D206B0 /* Framework2.framework */; productType = "com.apple.product-type.framework"; @@ -2507,9 +2591,11 @@ en, ); mainGroup = 293D0FF827366B513839236A; + minimizedProjectReferenceProxies = 1; packageReferences = ( 4EDA79334592CBBA0E507AD2 /* XCRemoteSwiftPackageReference "Swinject" */, ); + preferredProjectObjectVersion = 54; projectDirPath = ""; projectReferences = ( { diff --git a/Tests/Fixtures/TestProject/project.yml b/Tests/Fixtures/TestProject/project.yml index cc4ec4e68..4df6d2fe2 100644 --- a/Tests/Fixtures/TestProject/project.yml +++ b/Tests/Fixtures/TestProject/project.yml @@ -504,7 +504,7 @@ schemes: defaultLocation: Honolulu, HI, USA customLLDBInit: ${SRCROOT}/.lldbinit enableGPUFrameCaptureMode: "disabled" - enableGPUValidationMode: "disabled" + enableGPUValidationMode: false storeKitConfiguration: "App_iOS/Configuration.storekit" macroExpansion: App_iOS test: diff --git a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj index 3318273cf..e48b84f42 100644 --- a/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj +++ b/Tests/Fixtures/scheme_test/TestProject.xcodeproj/project.pbxproj @@ -42,6 +42,8 @@ dependencies = ( ); name = ExternalTarget; + packageProductDependencies = ( + ); productName = ExternalTarget; productReference = 9194D98A5CC4C58074AED541 /* ExternalTarget.framework */; productType = "com.apple.product-type.framework"; @@ -56,6 +58,8 @@ dependencies = ( ); name = Shared_TargetScheme; + packageProductDependencies = ( + ); productName = Shared_TargetScheme; productReference = 5FE827133AD803E389008F92 /* Shared_TargetScheme.bundle */; productType = "com.apple.product-type.bundle"; @@ -80,6 +84,8 @@ en, ); mainGroup = 2D08B11F4EE060D112B7BCA1; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 54; projectDirPath = ""; projectRoot = ""; targets = ( diff --git a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift index 5db44698a..10131ab93 100644 --- a/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/ProjectGeneratorTests.swift @@ -1553,12 +1553,12 @@ class ProjectGeneratorTests: XCTestCase { let pbxProject = try project.generatePbxProj(specValidate: false) let nativeTarget = try unwrap(pbxProject.nativeTargets.first(where: { $0.name == app.name })) - let projectSpecDependency = try unwrap(nativeTarget.packageProductDependencies.first(where: { $0.productName == "ProjectSpec" })) + let projectSpecDependency = try unwrap(nativeTarget.packageProductDependencies?.first(where: { $0.productName == "ProjectSpec" })) try expect(projectSpecDependency.package?.name) == "XcodeGen" try expect(projectSpecDependency.package?.versionRequirement) == .branch("master") - let codabilityDependency = try unwrap(nativeTarget.packageProductDependencies.first(where: { $0.productName == "Codability" })) + let codabilityDependency = try unwrap(nativeTarget.packageProductDependencies?.first(where: { $0.productName == "Codability" })) try expect(codabilityDependency.package?.name) == "Codability" try expect(codabilityDependency.package?.versionRequirement) == .exact("1.0.0")