From 40dc57ded08b7a5827ad03365c143baf37685c2a Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 5 May 2025 15:53:21 +1000 Subject: [PATCH 1/9] =?UTF-8?q?Add=20a=20dummy=20local=20package=E2=80=94W?= =?UTF-8?q?e'll=20try=20to=20put=20the=20Modules=20there=20next?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ModulesAlterantive/.gitignore | 8 +++++++ ModulesAlterantive/Package.swift | 21 +++++++++++++++++++ .../ModulesAlterantive.swift | 2 ++ .../contents.xcworkspacedata | 3 +++ 4 files changed, 34 insertions(+) create mode 100644 ModulesAlterantive/.gitignore create mode 100644 ModulesAlterantive/Package.swift create mode 100644 ModulesAlterantive/Sources/ModulesAlterantive/ModulesAlterantive.swift diff --git a/ModulesAlterantive/.gitignore b/ModulesAlterantive/.gitignore new file mode 100644 index 000000000000..0023a5340637 --- /dev/null +++ b/ModulesAlterantive/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/ModulesAlterantive/Package.swift b/ModulesAlterantive/Package.swift new file mode 100644 index 000000000000..d94f91f4b181 --- /dev/null +++ b/ModulesAlterantive/Package.swift @@ -0,0 +1,21 @@ +// swift-tools-version: 6.1 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "ModulesAlterantive", + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "ModulesAlterantive", + targets: ["ModulesAlterantive"]), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target( + name: "ModulesAlterantive"), + + ] +) diff --git a/ModulesAlterantive/Sources/ModulesAlterantive/ModulesAlterantive.swift b/ModulesAlterantive/Sources/ModulesAlterantive/ModulesAlterantive.swift new file mode 100644 index 000000000000..08b22b80fc09 --- /dev/null +++ b/ModulesAlterantive/Sources/ModulesAlterantive/ModulesAlterantive.swift @@ -0,0 +1,2 @@ +// The Swift Programming Language +// https://docs.swift.org/swift-book diff --git a/WordPress.xcworkspace/contents.xcworkspacedata b/WordPress.xcworkspace/contents.xcworkspacedata index e1bc1296b185..0aab95b7b99c 100644 --- a/WordPress.xcworkspace/contents.xcworkspacedata +++ b/WordPress.xcworkspace/contents.xcworkspacedata @@ -1,6 +1,9 @@ + + From 758f86202298cc6b3c2fd8b6881db015472467ac Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 5 May 2025 15:58:45 +1000 Subject: [PATCH 2/9] Replace ModulesAlterantive with Modules --- ModulesAlterantive/.gitignore | 8 ------- ModulesAlterantive/Package.swift | 21 ------------------- .../ModulesAlterantive.swift | 2 -- .../contents.xcworkspacedata | 2 +- WordPress/WordPress.xcodeproj/project.pbxproj | 8 ------- 5 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 ModulesAlterantive/.gitignore delete mode 100644 ModulesAlterantive/Package.swift delete mode 100644 ModulesAlterantive/Sources/ModulesAlterantive/ModulesAlterantive.swift diff --git a/ModulesAlterantive/.gitignore b/ModulesAlterantive/.gitignore deleted file mode 100644 index 0023a5340637..000000000000 --- a/ModulesAlterantive/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.DS_Store -/.build -/Packages -xcuserdata/ -DerivedData/ -.swiftpm/configuration/registries.json -.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata -.netrc diff --git a/ModulesAlterantive/Package.swift b/ModulesAlterantive/Package.swift deleted file mode 100644 index d94f91f4b181..000000000000 --- a/ModulesAlterantive/Package.swift +++ /dev/null @@ -1,21 +0,0 @@ -// swift-tools-version: 6.1 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "ModulesAlterantive", - products: [ - // Products define the executables and libraries a package produces, making them visible to other packages. - .library( - name: "ModulesAlterantive", - targets: ["ModulesAlterantive"]), - ], - targets: [ - // Targets are the basic building blocks of a package, defining a module or a test suite. - // Targets can depend on other targets in this package and products from dependencies. - .target( - name: "ModulesAlterantive"), - - ] -) diff --git a/ModulesAlterantive/Sources/ModulesAlterantive/ModulesAlterantive.swift b/ModulesAlterantive/Sources/ModulesAlterantive/ModulesAlterantive.swift deleted file mode 100644 index 08b22b80fc09..000000000000 --- a/ModulesAlterantive/Sources/ModulesAlterantive/ModulesAlterantive.swift +++ /dev/null @@ -1,2 +0,0 @@ -// The Swift Programming Language -// https://docs.swift.org/swift-book diff --git a/WordPress.xcworkspace/contents.xcworkspacedata b/WordPress.xcworkspace/contents.xcworkspacedata index 0aab95b7b99c..54a51748df8c 100644 --- a/WordPress.xcworkspace/contents.xcworkspacedata +++ b/WordPress.xcworkspace/contents.xcworkspacedata @@ -2,7 +2,7 @@ + location = "group:Modules"> diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 5df5b276a969..1a5c40d79a4c 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -2705,7 +2705,6 @@ ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; packageReferences = ( - 0C8095952DC2A4B9008DFC2F /* XCLocalSwiftPackageReference "../Modules" */, ); preferredProjectObjectVersion = 77; productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */; @@ -7040,13 +7039,6 @@ }; /* End XCConfigurationList section */ -/* Begin XCLocalSwiftPackageReference section */ - 0C8095952DC2A4B9008DFC2F /* XCLocalSwiftPackageReference "../Modules" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = ../Modules; - }; -/* End XCLocalSwiftPackageReference section */ - /* Begin XCSwiftPackageProductDependency section */ 0C2155A52C39A24D00EFE2C0 /* XcodeTarget_UITests */ = { isa = XCSwiftPackageProductDependency; From 7e2e8905318662e79ebd6cdd421d7d3e537f919b Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 5 May 2025 16:03:14 +1000 Subject: [PATCH 3/9] Re-enable all the test targets in WordPressUnitTests --- Tests/KeystoneTests/WordPressUnitTests.xctestplan | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Tests/KeystoneTests/WordPressUnitTests.xctestplan b/Tests/KeystoneTests/WordPressUnitTests.xctestplan index 533e46b6ccd9..5fbff54d114f 100644 --- a/Tests/KeystoneTests/WordPressUnitTests.xctestplan +++ b/Tests/KeystoneTests/WordPressUnitTests.xctestplan @@ -32,7 +32,6 @@ }, "testTargets" : [ { - "enabled" : false, "target" : { "containerPath" : "container:..\/Modules", "identifier" : "AsyncImageKitTests", @@ -40,7 +39,6 @@ } }, { - "enabled" : false, "target" : { "containerPath" : "container:WordPress.xcodeproj", "identifier" : "4AD953BA2C21451700D0EEFA", @@ -62,7 +60,6 @@ } }, { - "enabled" : false, "target" : { "containerPath" : "container:..\/Modules", "identifier" : "WordPressUIUnitTests", @@ -70,7 +67,6 @@ } }, { - "enabled" : false, "target" : { "containerPath" : "container:..\/Modules", "identifier" : "WordPressSharedTests", @@ -78,7 +74,6 @@ } }, { - "enabled" : false, "target" : { "containerPath" : "container:..\/Modules", "identifier" : "JetpackStatsWidgetsCoreTests", @@ -86,7 +81,6 @@ } }, { - "enabled" : false, "target" : { "containerPath" : "container:..\/Modules", "identifier" : "WordPressFluxTests", @@ -94,7 +88,6 @@ } }, { - "enabled" : false, "target" : { "containerPath" : "container:..\/Modules", "identifier" : "WordPressSharedObjCTests", From e2465ccd7eccf8529cf9ade6349683207c8b8642 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 5 May 2025 16:07:32 +1000 Subject: [PATCH 4/9] Delete unnecessary OCLint scheme Given OCLint is something we should drop soon, because it's only for Objective-C and we want to reduce that code surface. --- .../xcshareddata/xcschemes/OCLint.xcscheme | 76 ------------------- 1 file changed, 76 deletions(-) delete mode 100644 WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/OCLint.xcscheme diff --git a/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/OCLint.xcscheme b/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/OCLint.xcscheme deleted file mode 100644 index 204b88ed5dab..000000000000 --- a/WordPress/WordPress.xcodeproj/xcshareddata/xcschemes/OCLint.xcscheme +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From b17efe119e006cb845f201016d20aab299bcc89c Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 5 May 2025 17:17:17 +1000 Subject: [PATCH 5/9] Configure WordPressFlux scheme to run tests --- Modules/Package.swift | 7 +++++- .../WordPressFluxTests.xctestplan | 24 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 Modules/Tests/WordPressFluxTests/WordPressFluxTests.xctestplan diff --git a/Modules/Package.swift b/Modules/Package.swift index 0d88e290f045..279239b77f41 100644 --- a/Modules/Package.swift +++ b/Modules/Package.swift @@ -168,7 +168,12 @@ let package = Package( ), .testTarget(name: "JetpackStatsWidgetsCoreTests", dependencies: [.target(name: "JetpackStatsWidgetsCore")], swiftSettings: [.swiftLanguageMode(.v5)]), .testTarget(name: "DesignSystemTests", dependencies: [.target(name: "DesignSystem")], swiftSettings: [.swiftLanguageMode(.v5)]), - .testTarget(name: "WordPressFluxTests", dependencies: ["WordPressFlux"], swiftSettings: [.swiftLanguageMode(.v5)]), + .testTarget( + name: "WordPressFluxTests", + dependencies: ["WordPressFlux"], + exclude: ["WordPressFluxTests.xctestplan"], + swiftSettings: [.swiftLanguageMode(.v5)] + ), .testTarget(name: "AsyncImageKitTests", dependencies: [ .target(name: "AsyncImageKit"), .target(name: "WordPressTesting"), diff --git a/Modules/Tests/WordPressFluxTests/WordPressFluxTests.xctestplan b/Modules/Tests/WordPressFluxTests/WordPressFluxTests.xctestplan new file mode 100644 index 000000000000..5dd4d0071652 --- /dev/null +++ b/Modules/Tests/WordPressFluxTests/WordPressFluxTests.xctestplan @@ -0,0 +1,24 @@ +{ + "configurations" : [ + { + "id" : "92A65F35-8051-4F5F-B68A-1802B2E06105", + "name" : "Test Scheme Action", + "options" : { + + } + } + ], + "defaultOptions" : { + "codeCoverage" : false + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:", + "identifier" : "WordPressFluxTests", + "name" : "WordPressFluxTests" + } + } + ], + "version" : 1 +} From f6dd3c496782a7f858d66631e741e149f1865528 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Thu, 8 May 2025 12:03:12 +1000 Subject: [PATCH 6/9] Move Modules package reference from workspace to project --- .gitignore | 6 -- .../swiftpm => Modules}/Package.resolved | 58 +++++++++---------- Modules/Package.swift | 5 +- .../contents.xcworkspacedata | 3 - WordPress/WordPress.xcodeproj/project.pbxproj | 2 + 5 files changed, 34 insertions(+), 40 deletions(-) rename {WordPress.xcworkspace/xcshareddata/swiftpm => Modules}/Package.resolved (88%) diff --git a/.gitignore b/.gitignore index b9ef88a5e0e6..9924e15ba219 100644 --- a/.gitignore +++ b/.gitignore @@ -125,12 +125,6 @@ WordPress/InfoPlist-internal.h # and assume no local copy would have generated the Pods. Pods/ -# Modules — Where the Swift packages that make up the modular app live -# -# Ignore the Package.resolved file. The packages source of truth is the -# resolved file generated by the Xcode workspace. -Modules/Package.resolved - # While we depend on gutenberg-mobile, we download its XCFrameworks in # WordPress/Frameworks WordPress/Frameworks/*.xcframework diff --git a/WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Modules/Package.resolved similarity index 88% rename from WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved rename to Modules/Package.resolved index cb31731be9ca..cd1cac121943 100644 --- a/WordPress.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Modules/Package.resolved @@ -1,13 +1,13 @@ { - "originHash" : "4d299ae36ff454e0e3ec59a9c04557210efa32d8b96b189963ad0f3ffebb3e70", + "originHash" : "0effbb0d05b722668680dd92a52d353d911169640ab51a2b7ca2c0df9f0f94ae", "pins" : [ { "identity" : "alamofire", "kind" : "remoteSourceControl", "location" : "https://github.com/Alamofire/Alamofire", "state" : { - "revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a", - "version" : "5.9.1" + "revision" : "513364f870f6bfc468f9d2ff0a95caccc10044c5", + "version" : "5.10.2" } }, { @@ -61,7 +61,7 @@ "location" : "https://github.com/Automattic/color-studio", "state" : { "branch" : "trunk", - "revision" : "bdcf795bc2c191bd45bd6c24734030257becd050" + "revision" : "453700ac1ce3b2b17392d56696ead43aeeb579fb" } }, { @@ -69,8 +69,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/zendesk/commonui_sdk_ios", "state" : { - "revision" : "8729e7f4e316b46f6d33f046e663b6eedfe9955a", - "version" : "9.0.1" + "revision" : "8c1ab48a4a04637c42afc46d6b45b57c26ac05aa", + "version" : "9.0.2" } }, { @@ -78,8 +78,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/zendesk/core_sdk_ios", "state" : { - "revision" : "8163d4d67f3aa8954467aa8191ee13cb4f1a2b9e", - "version" : "5.0.3" + "revision" : "4d676f214e48017d102cd499d5f453c5cf6d9ef2", + "version" : "5.0.4" } }, { @@ -87,8 +87,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mattgallagher/CwlCatchException.git", "state" : { - "revision" : "35f9e770f54ce62dd8526470f14c6e137cef3eea", - "version" : "2.1.1" + "revision" : "07b2ba21d361c223e25e3c1e924288742923f08c", + "version" : "2.2.1" } }, { @@ -96,8 +96,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git", "state" : { - "revision" : "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688", - "version" : "2.1.0" + "revision" : "0139c665ebb45e6a9fbdb68aabfd7c39f3fe0071", + "version" : "2.2.2" } }, { @@ -168,8 +168,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/airbnb/lottie-ios", "state" : { - "revision" : "f522990668c2f9132323a2e68d924c7dcb9130b4", - "version" : "4.4.0" + "revision" : "047aa81b77adcbf583a966dfef620d17650cc656", + "version" : "4.5.1" } }, { @@ -178,7 +178,7 @@ "location" : "https://github.com/wordpress-mobile/MediaEditor-iOS", "state" : { "branch" : "task/spm-support", - "revision" : "4f3fe298a95d1de81099f8c9e5612e0c59c9bf53" + "revision" : "e9f74b21276d5cd1cb94ee1c09cc060b23187832" } }, { @@ -186,8 +186,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/zendesk/messaging_sdk_ios", "state" : { - "revision" : "4dbb16d26b90452c1d41cba8e8dc81a1bcea7f1e", - "version" : "6.0.1" + "revision" : "0f81007fe9c9467bc583040f3343b205311cebfd", + "version" : "6.0.2" } }, { @@ -195,8 +195,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/zendesk/messagingapi_sdk_ios", "state" : { - "revision" : "2f21e014a1f284edf484faf39b2b6fe377ec8c64", - "version" : "6.0.0" + "revision" : "f86020a681e28a7bfae9e2445eb027d37dc5d5f5", + "version" : "6.0.1" } }, { @@ -222,7 +222,6 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/wordpress-mobile/NSURL-IDN", "state" : { - "branch" : "cmm-322-remove-plus-from-name", "revision" : "b34794c9a3f32312e1593d4a3d120572afa0d010" } }, @@ -293,8 +292,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/zendesk/support_providers_sdk_ios", "state" : { - "revision" : "16da780d8a0aa905b3935eee7836b9a0ee276597", - "version" : "8.0.3" + "revision" : "b8194243297eaab61a92138a1dc5872bce358346", + "version" : "8.0.4" } }, { @@ -302,8 +301,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/zendesk/support_sdk_ios", "state" : { - "revision" : "44cf26111bf0bc608a2474578b3d506793eef483", - "version" : "8.0.3" + "revision" : "6b5f6d2ffc92c10d38cb9c716ae37b2832230c89", + "version" : "8.0.4" } }, { @@ -329,8 +328,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-log", "state" : { - "revision" : "e97a6fcb1ab07462881ac165fdbb37f067e205d5", - "version" : "1.5.4" + "revision" : "96a2f8a0fa41e9e09af4585e2724c4e825410b91", + "version" : "1.6.2" } }, { @@ -345,7 +344,7 @@ { "identity" : "swiftsoup", "kind" : "remoteSourceControl", - "location" : "https://github.com/scinfu/SwiftSoup.git", + "location" : "https://github.com/scinfu/SwiftSoup", "state" : { "revision" : "3c2c7e1e72b8abd96eafbae80323c5c1e5317437", "version" : "2.7.5" @@ -356,8 +355,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/buildkite/test-collector-swift", "state" : { - "revision" : "77c7f492f5c1c9ca159f73d18f56bbd1186390b0", - "version" : "0.3.0" + "revision" : "631a2400dbe876141a3ef8c7400885907fec7f89", + "version" : "0.4.1" } }, { @@ -392,7 +391,6 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/wordpress-mobile/WordPressKit-iOS", "state" : { - "branch" : "wpios-edition", "revision" : "5bc08764d2025e21685816065f611e884c8672d1" } }, diff --git a/Modules/Package.swift b/Modules/Package.swift index 279239b77f41..0078ff2e7a7a 100644 --- a/Modules/Package.swift +++ b/Modules/Package.swift @@ -48,7 +48,10 @@ let package = Package( .package(url: "https://github.com/wordpress-mobile/MediaEditor-iOS", branch: "task/spm-support"), .package(url: "https://github.com/wordpress-mobile/NSObject-SafeExpectations", from: "0.0.6"), .package(url: "https://github.com/wordpress-mobile/NSURL-IDN", revision: "b34794c9a3f32312e1593d4a3d120572afa0d010"), - .package(url: "https://github.com/wordpress-mobile/WordPressKit-iOS", branch: "wpios-edition"), + .package( + url: "https://github.com/wordpress-mobile/WordPressKit-iOS", + revision: "5bc08764d2025e21685816065f611e884c8672d1" // see wpios-edition branch + ), .package(url: "https://github.com/zendesk/support_sdk_ios", from: "8.0.3"), // We can't use wordpress-rs branches nor commits here. Only tags work. .package(url: "https://github.com/Automattic/wordpress-rs", revision: "alpha-20250505"), diff --git a/WordPress.xcworkspace/contents.xcworkspacedata b/WordPress.xcworkspace/contents.xcworkspacedata index 54a51748df8c..e1bc1296b185 100644 --- a/WordPress.xcworkspace/contents.xcworkspacedata +++ b/WordPress.xcworkspace/contents.xcworkspacedata @@ -1,9 +1,6 @@ - - diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 1a5c40d79a4c..57f829d04d52 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -804,6 +804,7 @@ 3F9DD3F62CC214BF00DF1760 /* Common.debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Common.debug.xcconfig; sourceTree = ""; }; 3F9DD3F72CC2188400DF1760 /* Common.alpha.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Common.alpha.xcconfig; sourceTree = ""; }; 3FA640652670CEFE0064401E /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 3FD4B20E2DCC468200781DFA /* Modules */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = Modules; path = ../Modules; sourceTree = SOURCE_ROOT; }; 406A0EEF224D39C50016AD6A /* Flags.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Flags.xcassets; sourceTree = ""; }; 433840C622C2BA5B00CB13F8 /* AppImages.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = AppImages.xcassets; path = Resources/AppImages.xcassets; sourceTree = ""; }; 4A690C142BA790BC00A8E0C5 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; @@ -1606,6 +1607,7 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + 3FD4B20E2DCC468200781DFA /* Modules */, 0C5C46FB2D98395300F2CD55 /* Sources */, 0C5A19CB2D9B07E700C25301 /* Tests */, F14B5F6F208E648200439554 /* config */, From 38c0d8a9408f2e6129af2b85f0510ef004ef27a5 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Thu, 8 May 2025 12:25:08 +1000 Subject: [PATCH 7/9] Use the shared setup CI script in the complete code freeze step --- .buildkite/commands/complete-code-freeze.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.buildkite/commands/complete-code-freeze.sh b/.buildkite/commands/complete-code-freeze.sh index 40653d10c534..9297d9e4d298 100755 --- a/.buildkite/commands/complete-code-freeze.sh +++ b/.buildkite/commands/complete-code-freeze.sh @@ -12,11 +12,7 @@ source use-bot-for-git .buildkite/commands/checkout-release-branch.sh "$RELEASE_NUMBER" -echo '--- :ruby: Setup Ruby tools' -install_gems - -echo "--- :swift: Set up Swift Packages" -install_swiftpm_dependencies +"$(dirname "${BASH_SOURCE[0]}")/shared-set-up.sh" echo '--- :closed_lock_with_key: Access secrets' bundle exec fastlane run configure_apply From cc744d89c823ae8f1f32c1f0dfd91cda86f36d35 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Thu, 8 May 2025 12:28:59 +1000 Subject: [PATCH 8/9] Add workaround for package path support missing --- .buildkite/commands/shared-set-up.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.buildkite/commands/shared-set-up.sh b/.buildkite/commands/shared-set-up.sh index 15a74d84b996..1e04425db6f8 100755 --- a/.buildkite/commands/shared-set-up.sh +++ b/.buildkite/commands/shared-set-up.sh @@ -3,8 +3,12 @@ echo "--- :rubygems: Setting up Gems" install_gems +# The push/pop is workaround for tooling not supporting a Package.swift path. +# Note that neither ours nor Apple's tooling does. +pushd "$(dirname "${BASH_SOURCE[0]}")/../../Modules" echo "--- :swift: Setting up Swift Packages" install_swiftpm_dependencies +popd echo "--- :xcode: Fetch XCFrameworks" rake dependencies From 35e360bb81fb0967ed20b2b02727da28679473f0 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Fri, 9 May 2025 11:35:17 +1000 Subject: [PATCH 9/9] Point `color-studio` to a commit instead of a branch Locking dependencies to commits makes updating them a bit more burdensome, but at least it makes the update intentional and not automatic and surprising. This change was done to test Xcode's behavior in monitoring `Modules/Package.swift` and updating `Modules/Package.resolved`. See https://github.com/wordpress-mobile/WordPress-iOS/pull/24518#discussion_r2079810655 --- Modules/Package.resolved | 7 +++---- Modules/Package.swift | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Modules/Package.resolved b/Modules/Package.resolved index cd1cac121943..e16ac268b03a 100644 --- a/Modules/Package.resolved +++ b/Modules/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "0effbb0d05b722668680dd92a52d353d911169640ab51a2b7ca2c0df9f0f94ae", + "originHash" : "fe094f15c8e18dab512a2ddf88e08b4c895c60964ac1158c031ee731381eda34", "pins" : [ { "identity" : "alamofire", @@ -60,8 +60,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Automattic/color-studio", "state" : { - "branch" : "trunk", - "revision" : "453700ac1ce3b2b17392d56696ead43aeeb579fb" + "revision" : "bf141adc75e2769eb469a3e095bdc93dc30be8de" } }, { @@ -344,7 +343,7 @@ { "identity" : "swiftsoup", "kind" : "remoteSourceControl", - "location" : "https://github.com/scinfu/SwiftSoup", + "location" : "https://github.com/scinfu/SwiftSoup.git", "state" : { "revision" : "3c2c7e1e72b8abd96eafbae80323c5c1e5317437", "version" : "2.7.5" diff --git a/Modules/Package.swift b/Modules/Package.swift index 0078ff2e7a7a..b8b352da1f8c 100644 --- a/Modules/Package.swift +++ b/Modules/Package.swift @@ -56,7 +56,10 @@ let package = Package( // We can't use wordpress-rs branches nor commits here. Only tags work. .package(url: "https://github.com/Automattic/wordpress-rs", revision: "alpha-20250505"), .package(url: "https://github.com/wordpress-mobile/GutenbergKit", from: "0.2.0"), - .package(url: "https://github.com/Automattic/color-studio", branch: "trunk"), + .package( + url: "https://github.com/Automattic/color-studio", + revision: "bf141adc75e2769eb469a3e095bdc93dc30be8de" + ), .package(url: "https://github.com/wordpress-mobile/AztecEditor-iOS", from: "1.20.0"), ], targets: XcodeSupport.targets + [