Skip to content

Commit 51b028f

Browse files
authored
fix: Resolve build warnings, move test target, check in new test scheme (#15518)
1 parent 1fcc19a commit 51b028f

File tree

4 files changed

+71
-18
lines changed

4 files changed

+71
-18
lines changed

.github/workflows/firestore.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,9 +514,8 @@ jobs:
514514
spm-binary:
515515
uses: ./.github/workflows/common.yml
516516
with:
517-
target: FirebaseFirestore
517+
target: FirebaseFirestoreTests
518518
platforms: iOS
519-
buildonly_platforms: iOS
520519

521520
check-firestore-internal-public-headers:
522521
needs: check

Firestore/Swift/Tests/Unit/AsyncAwait/AsyncSequenceTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private struct Swizzler: ~Copyable {
123123
swizzledSelector: Selector) {
124124
guard let originalMethod = class_getInstanceMethod(cls, originalSelector),
125125
let swizzledMethod = class_getInstanceMethod(cls, swizzledSelector) else {
126-
#expect(false, "Failed to get methods for swizzling")
126+
#expect(Bool(false), "Failed to get methods for swizzling")
127127
return
128128
}
129129
method_exchangeImplementations(originalMethod, swizzledMethod)
@@ -230,7 +230,7 @@ struct QueryAsyncSequenceTests {
230230

231231
let task = Task {
232232
for try await _ in query.snapshots {
233-
#expect(false, "The stream should not have produced any values.")
233+
#expect(Bool(false), "The stream should not have produced any values.")
234234
}
235235
}
236236

@@ -350,7 +350,7 @@ struct DocumentReferenceAsyncSequenceTests {
350350

351351
let task = Task {
352352
for try await _ in docRef.snapshots {
353-
#expect(false, "The stream should not have produced any values.")
353+
#expect(Bool(false), "The stream should not have produced any values.")
354354
}
355355
}
356356

@@ -398,4 +398,4 @@ extension DocumentReference {
398398
}
399399
}
400400

401-
extension String: Error {}
401+
extension String: @retroactive Error {}

Package.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,18 @@ let package = Package(
13771377
.headerSearchPath("../../.."),
13781378
]
13791379
),
1380+
.testTarget(
1381+
name: "FirebaseFirestoreTests",
1382+
dependencies: [
1383+
"Firebase",
1384+
"FirebaseCore",
1385+
"FirebaseFirestoreTarget",
1386+
],
1387+
path: "Firestore/Swift/Tests/Unit",
1388+
cSettings: [
1389+
.headerSearchPath("../../../"),
1390+
]
1391+
),
13801392
] + firestoreTargets(),
13811393
cxxLanguageStandard: CXXLanguageStandard.gnucxx14
13821394
)
@@ -1552,18 +1564,6 @@ func firestoreTargets() -> [Target] {
15521564
.swiftLanguageMode(SwiftLanguageMode.v5),
15531565
]
15541566
),
1555-
.testTarget(
1556-
name: "FirebaseFirestoreTests",
1557-
dependencies: [
1558-
"Firebase",
1559-
"FirebaseCore",
1560-
"FirebaseFirestoreTarget",
1561-
],
1562-
path: "Firestore/Swift/Tests/Unit",
1563-
cSettings: [
1564-
.headerSearchPath("../../../"),
1565-
]
1566-
),
15671567
]
15681568
}
15691569

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1630"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES"
8+
buildArchitectures = "Automatic">
9+
</BuildAction>
10+
<TestAction
11+
buildConfiguration = "Debug"
12+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
13+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
14+
shouldUseLaunchSchemeArgsEnv = "YES"
15+
shouldAutocreateTestPlan = "YES">
16+
<Testables>
17+
<TestableReference
18+
skipped = "NO">
19+
<BuildableReference
20+
BuildableIdentifier = "primary"
21+
BlueprintIdentifier = "FirebaseFirestoreTests"
22+
BuildableName = "FirebaseFirestoreTests"
23+
BlueprintName = "FirebaseFirestoreTests"
24+
ReferencedContainer = "container:">
25+
</BuildableReference>
26+
</TestableReference>
27+
</Testables>
28+
</TestAction>
29+
<LaunchAction
30+
buildConfiguration = "Debug"
31+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
32+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
33+
launchStyle = "0"
34+
useCustomWorkingDirectory = "NO"
35+
ignoresPersistentStateOnLaunch = "NO"
36+
debugDocumentVersioning = "YES"
37+
debugServiceExtension = "internal"
38+
allowLocationSimulation = "YES">
39+
</LaunchAction>
40+
<ProfileAction
41+
buildConfiguration = "Release"
42+
shouldUseLaunchSchemeArgsEnv = "YES"
43+
savedToolIdentifier = ""
44+
useCustomWorkingDirectory = "NO"
45+
debugDocumentVersioning = "YES">
46+
</ProfileAction>
47+
<AnalyzeAction
48+
buildConfiguration = "Debug">
49+
</AnalyzeAction>
50+
<ArchiveAction
51+
buildConfiguration = "Release"
52+
revealArchiveInOrganizer = "YES">
53+
</ArchiveAction>
54+
</Scheme>

0 commit comments

Comments
 (0)