From c71f48370ed27c963ad3ce2fb3021fb899cea2b4 Mon Sep 17 00:00:00 2001 From: Michael Gerasymenko Date: Mon, 30 Sep 2024 17:46:20 +0200 Subject: [PATCH 1/3] Update XcodeProj, fix compatibility issue --- Package.resolved | 4 ++-- Package.swift | 2 +- Sources/DependencyCalculator/DependencyGraph.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Package.resolved b/Package.resolved index aceefaa..a303719 100644 --- a/Package.resolved +++ b/Package.resolved @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/tuist/XcodeProj.git", "state" : { - "revision" : "313aaf1ad612135b7b0ccf731c86b5c07bf149b5", - "version" : "8.20.0" + "revision" : "babd2491ea34777bec9d33381a60cd782559b4b3", + "version" : "8.24.1" } }, { diff --git a/Package.swift b/Package.swift index 26bd845..7a0600e 100644 --- a/Package.swift +++ b/Package.swift @@ -69,7 +69,7 @@ let package = Package( ], products: products, dependencies: [ - .package(url: "https://github.com/tuist/XcodeProj.git", .upToNextMajor(from: "8.20.0")), + .package(url: "https://github.com/tuist/XcodeProj.git", .upToNextMajor(from: "8.24.1")), .package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMajor(from: "1.2.0")), .package(url: "https://github.com/kylef/PathKit.git", .upToNextMinor(from: "1.0.0")), .package(url: "https://github.com/onevcat/Rainbow", .upToNextMajor(from: "4.0.0")), diff --git a/Sources/DependencyCalculator/DependencyGraph.swift b/Sources/DependencyCalculator/DependencyGraph.swift index 9b4e0d6..27ae829 100644 --- a/Sources/DependencyCalculator/DependencyGraph.swift +++ b/Sources/DependencyCalculator/DependencyGraph.swift @@ -273,7 +273,7 @@ extension WorkspaceInfo { } // Package dependencies - for packageDependency in target.packageProductDependencies { + for packageDependency in (target.packageProductDependencies ?? []) { let package = packageDependency.productName guard let packageMetadata = packagesByName[package] else { Logger.warning("Package \(package) not found") From e20034a24accd7344d19b1bdeed5d87a0a02c23f Mon Sep 17 00:00:00 2001 From: Michael Gerasymenko Date: Mon, 30 Sep 2024 17:48:02 +0200 Subject: [PATCH 2/3] Fix compilation on older Xcode --- Plugins/SelectiveTestingPlugin/SelectiveTestingPlugin.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plugins/SelectiveTestingPlugin/SelectiveTestingPlugin.swift b/Plugins/SelectiveTestingPlugin/SelectiveTestingPlugin.swift index 1b0eed2..2083309 100644 --- a/Plugins/SelectiveTestingPlugin/SelectiveTestingPlugin.swift +++ b/Plugins/SelectiveTestingPlugin/SelectiveTestingPlugin.swift @@ -56,6 +56,12 @@ struct SelectiveTestingPlugin: CommandPlugin { } #endif +#if compiler(>=6) extension String: @retroactive LocalizedError { public var errorDescription: String? { return self } } +#else +extension String: LocalizedError { + public var errorDescription: String? { return self } +} +#endif From 66af4d9dbb59462afb4b35e6540598af49f77511 Mon Sep 17 00:00:00 2001 From: Michael Gerasymenko Date: Mon, 30 Sep 2024 17:49:17 +0200 Subject: [PATCH 3/3] Use Swift 5.10.1 on Linux --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c734d13..e5692fa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,11 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 + - uses: swift-actions/setup-swift@v2 + with: + swift-version: "5.10.1" + - name: Get swift version + run: swift --version # Swift 5.1.0 - name: Prepare Git run: git config --global user.email "test@example.com" && git config --global user.name "Test User" - name: Run tests