From ba6edbff2996f152275d8c5f3ffbccbd624ffd5e Mon Sep 17 00:00:00 2001 From: Christoph Aldrian Date: Fri, 31 Oct 2025 13:41:41 +0100 Subject: [PATCH 1/9] pass -warnings-as-errors --- WireLogging/Package.swift | 6 +++++- .../xcshareddata/xcschemes/WireLoggingAll.xcscheme | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) rename WireLogging/.swiftpm/xcode/xcshareddata/xcschemes/WireLogging.xcscheme => wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme (95%) diff --git a/WireLogging/Package.swift b/WireLogging/Package.swift index d65eaa8998d..6a46f066360 100644 --- a/WireLogging/Package.swift +++ b/WireLogging/Package.swift @@ -1,5 +1,6 @@ // swift-tools-version: 6.2 +import Foundation import PackageDescription let package = Package( @@ -32,5 +33,8 @@ for target in package.targets { .enableUpcomingFeature("InternalImportsByDefault"), .enableUpcomingFeature("MemberImportVisibility"), .enableUpcomingFeature("StrictMemorySafety"), - ] + isCI ? .unsafeFlags(["-warnings-as-errors"]) : nil + ].compactMap(\.self) } + +let isCI = ProcessInfo.processInfo.environment["CI"] != nil diff --git a/WireLogging/.swiftpm/xcode/xcshareddata/xcschemes/WireLogging.xcscheme b/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme similarity index 95% rename from WireLogging/.swiftpm/xcode/xcshareddata/xcschemes/WireLogging.xcscheme rename to wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme index 6b7d5c03bed..bf323730e98 100644 --- a/WireLogging/.swiftpm/xcode/xcshareddata/xcschemes/WireLogging.xcscheme +++ b/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme @@ -18,7 +18,7 @@ BlueprintIdentifier = "WireLogging" BuildableName = "WireLogging" BlueprintName = "WireLogging" - ReferencedContainer = "container:"> + ReferencedContainer = "container:WireLogging"> @@ -58,7 +58,7 @@ BlueprintIdentifier = "WireLogging" BuildableName = "WireLogging" BlueprintName = "WireLogging" - ReferencedContainer = "container:"> + ReferencedContainer = "container:WireLogging"> From 5da431299a69144ee0d2732fe20dc6a0733b2472 Mon Sep 17 00:00:00 2001 From: Christoph Aldrian Date: Fri, 31 Oct 2025 13:42:46 +0100 Subject: [PATCH 2/9] adjust fastlane files --- fastlane/Fastfile | 9 ++++++++- fastlane/framework.rb | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 85da9d882ae..8b53648f798 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -477,7 +477,14 @@ platform :ios do if build.for_simulator Dir.chdir("..") do # Build the app for simulator - sh "xcodebuild -workspace 'wire-ios-mono.xcworkspace' -scheme 'Wire-iOS' -configuration 'Debug' -destination \"generic/platform=iOS Simulator\" -derivedDataPath DerivedData -quiet build BUILD_NUMBER=#{build.build_number}" + sh "xcodebuild " \ + "-workspace 'wire-ios-mono.xcworkspace' " \ + "-scheme 'Wire-iOS' " \ + "-configuration 'Debug' " \ + "-destination \"generic/platform=iOS Simulator\" " \ + "-derivedDataPath DerivedData " \ + "-quiet build " \ + "BUILD_NUMBER=#{build.build_number}" # make a "fake" .ipa package that QA will use for installing to simulator sh "mkdir -p debug/Payload" diff --git a/fastlane/framework.rb b/fastlane/framework.rb index 8362d19b819..0890b01ccdb 100644 --- a/fastlane/framework.rb +++ b/fastlane/framework.rb @@ -176,7 +176,7 @@ def to_scheme(name) when "WireAnalytics" "WireAnalyticsAll" # if a package has multiple targets, fastlane does not found -Package when "WireLogging" - "WireLogging" + "WireLoggingAll" # if a package has multiple targets, fastlane does not find -Package when "wire-ios-mocktransport" "WireMockTransport" else From 20c206c55db14dbde9a9fcc00df7d0eb37bccff3 Mon Sep 17 00:00:00 2001 From: Christoph Aldrian Date: Fri, 31 Oct 2025 13:46:35 +0100 Subject: [PATCH 3/9] trigger warning --- WireLogging/Sources/WireLogging/Flow.swift | 2 ++ WireLogging/Tests/TestPlans/AllTests.xctestplan | 2 +- .../xcshareddata/xcschemes/WireLoggingAll.xcscheme | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WireLogging/Sources/WireLogging/Flow.swift b/WireLogging/Sources/WireLogging/Flow.swift index 426ad75c4ad..b3c524e7cac 100644 --- a/WireLogging/Sources/WireLogging/Flow.swift +++ b/WireLogging/Sources/WireLogging/Flow.swift @@ -48,6 +48,8 @@ open class Flow { ) { self.name = name self.logger = WireLogger(tag: tag) + + let i = 0 } // MARK: - Methods diff --git a/WireLogging/Tests/TestPlans/AllTests.xctestplan b/WireLogging/Tests/TestPlans/AllTests.xctestplan index ac2c1a8e298..10ba28770a2 100644 --- a/WireLogging/Tests/TestPlans/AllTests.xctestplan +++ b/WireLogging/Tests/TestPlans/AllTests.xctestplan @@ -14,7 +14,7 @@ "testTargets" : [ { "target" : { - "containerPath" : "container:", + "containerPath" : "container:WireLogging", "identifier" : "WireLoggingTests", "name" : "WireLoggingTests" } diff --git a/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme b/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme index bf323730e98..787e4182d68 100644 --- a/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme +++ b/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme @@ -30,7 +30,7 @@ shouldUseLaunchSchemeArgsEnv = "YES"> From 625ea1d7fdb36c5662c746f8869717b5e33f48d7 Mon Sep 17 00:00:00 2001 From: Christoph Aldrian Date: Fri, 31 Oct 2025 13:52:52 +0100 Subject: [PATCH 4/9] minor fixes --- WireAnalytics/Package.swift | 1 + WireAuthentication/Package.swift | 2 +- WireLogging/Tests/TestPlans/AllTests.xctestplan | 6 +++--- .../xcshareddata/swiftpm/Package.resolved | 8 ++++---- .../xcshareddata/xcschemes/WireLoggingAll.xcscheme | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/WireAnalytics/Package.swift b/WireAnalytics/Package.swift index 1144db07581..fb7237b645f 100644 --- a/WireAnalytics/Package.swift +++ b/WireAnalytics/Package.swift @@ -4,6 +4,7 @@ import Foundation import PackageDescription // You can enable/disable Datadog for debugging by overriding the boolean. +// open --env ENABLE_DATADOG=true --env ENABLE_COUNTLY=true wire-ios-mono.xcworkspace let isDatadogEnabled = hasEnvironmentVariable("ENABLE_DATADOG", "true") let isCountlyEnabled = hasEnvironmentVariable("ENABLE_COUNTLY", "true") diff --git a/WireAuthentication/Package.swift b/WireAuthentication/Package.swift index 4c70e12f416..0939cd9f92f 100644 --- a/WireAuthentication/Package.swift +++ b/WireAuthentication/Package.swift @@ -21,7 +21,7 @@ let package = Package( .package(path: "../WireUI"), .package(path: "../WirePlugins"), .package(url: "https://github.com/uber/needle.git", .upToNextMinor(from: "0.25.1")), - .package(url: "https://github.com/siteline/swiftui-introspect", from: "1.0.0") + .package(url: "https://github.com/siteline/swiftui-introspect", from: "26.0.0"), ], targets: [ .target( diff --git a/WireLogging/Tests/TestPlans/AllTests.xctestplan b/WireLogging/Tests/TestPlans/AllTests.xctestplan index 10ba28770a2..a7a5aa8b594 100644 --- a/WireLogging/Tests/TestPlans/AllTests.xctestplan +++ b/WireLogging/Tests/TestPlans/AllTests.xctestplan @@ -1,15 +1,15 @@ { "configurations" : [ { - "id" : "8C7B2297-3D36-4CFC-9B55-BF2CC1C85BF4", - "name" : "Configuration 1", + "id" : "4D5F2F6E-3C6F-4ED2-AAD7-132E9DA30D40", + "name" : "Test Scheme Action", "options" : { } } ], "defaultOptions" : { - + "performanceAntipatternCheckerEnabled" : true }, "testTargets" : [ { diff --git a/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved b/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved index 09a6e9e494e..7c4b6c95cd9 100644 --- a/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -204,8 +204,8 @@ "repositoryURL": "https://github.com/swiftlang/swift-docc-plugin", "state": { "branch": null, - "revision": "85e4bb4e1cd62cec64a4b8e769dcefdf0c5b9d64", - "version": "1.4.3" + "revision": "3e4f133a77e644a5812911a0513aeb7288b07d06", + "version": "1.4.5" } }, { @@ -258,8 +258,8 @@ "repositoryURL": "https://github.com/siteline/swiftui-introspect", "state": { "branch": null, - "revision": "807f73ce09a9b9723f12385e592b4e0aaebd3336", - "version": "1.3.0" + "revision": "a08b87f96b41055577721a6e397562b21ad52454", + "version": "26.0.0" } }, { diff --git a/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme b/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme index 787e4182d68..0367c2de833 100644 --- a/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme +++ b/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme @@ -1,6 +1,6 @@ Date: Fri, 31 Oct 2025 14:25:17 +0100 Subject: [PATCH 5/9] minor fix --- WireLogging/Package.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WireLogging/Package.swift b/WireLogging/Package.swift index 6a46f066360..5710c9e60bf 100644 --- a/WireLogging/Package.swift +++ b/WireLogging/Package.swift @@ -27,6 +27,8 @@ let package = Package( ] ) +let isCI = ProcessInfo.processInfo.environment["CI"] != nil + for target in package.targets { target.swiftSettings = (target.swiftSettings ?? []) + [ .enableUpcomingFeature("ExistentialAny"), @@ -36,5 +38,3 @@ for target in package.targets { isCI ? .unsafeFlags(["-warnings-as-errors"]) : nil ].compactMap(\.self) } - -let isCI = ProcessInfo.processInfo.environment["CI"] != nil From caf702ac08ec39d64939dcb0c815ed5f100aa97b Mon Sep 17 00:00:00 2001 From: Christoph Aldrian Date: Fri, 31 Oct 2025 14:32:26 +0100 Subject: [PATCH 6/9] fix error --- WireLogging/Package.swift | 3 +++ WireLogging/Sources/WireLogging/Flow.swift | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WireLogging/Package.swift b/WireLogging/Package.swift index 5710c9e60bf..6b1d48c94b2 100644 --- a/WireLogging/Package.swift +++ b/WireLogging/Package.swift @@ -27,6 +27,9 @@ let package = Package( ] ) +// open --env CI wire-ios-mono.xcworkspace +// or +// CI= swift build let isCI = ProcessInfo.processInfo.environment["CI"] != nil for target in package.targets { diff --git a/WireLogging/Sources/WireLogging/Flow.swift b/WireLogging/Sources/WireLogging/Flow.swift index b3c524e7cac..426ad75c4ad 100644 --- a/WireLogging/Sources/WireLogging/Flow.swift +++ b/WireLogging/Sources/WireLogging/Flow.swift @@ -48,8 +48,6 @@ open class Flow { ) { self.name = name self.logger = WireLogger(tag: tag) - - let i = 0 } // MARK: - Methods From 8a17e57f95e313c3a1195fd77848009d578f00aa Mon Sep 17 00:00:00 2001 From: Christoph Aldrian Date: Fri, 31 Oct 2025 14:36:32 +0100 Subject: [PATCH 7/9] minor fixes --- .../Tests/TestPlans/AllTests.xctestplan | 2 +- .../xcschemes/WireLoggingAll.xcscheme | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/WireLogging/Tests/TestPlans/AllTests.xctestplan b/WireLogging/Tests/TestPlans/AllTests.xctestplan index a7a5aa8b594..c207acddbfe 100644 --- a/WireLogging/Tests/TestPlans/AllTests.xctestplan +++ b/WireLogging/Tests/TestPlans/AllTests.xctestplan @@ -1,7 +1,7 @@ { "configurations" : [ { - "id" : "4D5F2F6E-3C6F-4ED2-AAD7-132E9DA30D40", + "id" : "8DA8C849-71C0-4072-92BA-9AF39BAA1039", "name" : "Test Scheme Action", "options" : { diff --git a/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme b/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme index 0367c2de833..d35138b815f 100644 --- a/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme +++ b/wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme @@ -21,6 +21,20 @@ ReferencedContainer = "container:WireLogging"> + + + + + + + + + + Date: Fri, 31 Oct 2025 17:01:52 +0100 Subject: [PATCH 8/9] Trigger CI From 2157fb31f03e39642d0834e0f3b21d8cfbc42559 Mon Sep 17 00:00:00 2001 From: Christoph Aldrian Date: Fri, 31 Oct 2025 17:06:09 +0100 Subject: [PATCH 9/9] fix swiftformat action --- .github/workflows/swiftformat.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/swiftformat.yml b/.github/workflows/swiftformat.yml index 175d12df3b9..7d6d192c789 100644 --- a/.github/workflows/swiftformat.yml +++ b/.github/workflows/swiftformat.yml @@ -29,6 +29,7 @@ jobs: if: ${{ steps.changes.outputs.swift == 'true' }} - name: Install SwiftFormat 0.58.3 + if: ${{ steps.changes.outputs.swift == 'true' }} run: | curl -L -o swiftformat.zip https://github.com/nicklockwood/SwiftFormat/releases/download/0.58.3/swiftformat_linux.zip unzip swiftformat.zip -d swiftformat_bin @@ -36,4 +37,5 @@ jobs: chmod +x /usr/local/bin/swiftformat - name: Run SwiftFormat + if: ${{ steps.changes.outputs.swift == 'true' }} run: swiftformat --lint . --reporter github-actions-log --config .swiftformat