Skip to content

Commit 41e0d85

Browse files
authored
Fix build errors in Xcode 13.3.1 (#9705)
1 parent aefb2a4 commit 41e0d85

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

Firestore/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Unreleased
2+
- [fixed] Fixed build errors in Xcode 13.3.1 (#9702).
3+
14
# v9.0.0
25
- [fixed] **Breaking change:** Fixed an issue where returning `nil` from the
36
update closure when running a transaction caused a crash in Swift by removing

Firestore/Example/GoogleTest.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
Pod::Spec.new do |s|
1919
s.name = 'GoogleTest'
20-
s.version = '1.10.0'
20+
s.version = '99.99.99'
2121
s.summary = 'Google Test'
2222

2323
s.description = <<-DESC
@@ -30,7 +30,7 @@ Google's C++ test framework.
3030

3131
s.source = {
3232
:git => 'https://github.com/google/googletest.git',
33-
:tag => 'release-' + s.version.to_s
33+
:commit => 'bf66935e07825318ae519675d73d0f3e313b3ec6'
3434
}
3535

3636
s.ios.deployment_target = '10.0'
@@ -92,7 +92,7 @@ Google's C++ test framework.
9292
# Remove includes of files in internal/custom
9393
sed -i.bak -e '/include.*internal\/custom/ d' \
9494
googlemock/include/gmock/gmock-matchers.h \
95-
googlemock/include/gmock/gmock-generated-actions.h \
95+
googlemock/include/gmock/gmock-more-actions.h \
9696
googlemock/include/gmock/internal/gmock-port.h \
9797
googletest/include/gtest/gtest-printers.h \
9898
googletest/include/gtest/internal/gtest-port.h \

Firestore/Example/Tests/Integration/FSTTransactionTests.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ - (void)testReadingADocTwiceWithDifferentVersions {
539539
++(*counter);
540540
// Get the doc once.
541541
FIRDocumentSnapshot *snapshot = [transaction getDocument:doc error:error];
542+
XCTAssertNotNil(snapshot);
542543
XCTAssertNil(*error);
543544
// Do a write outside of the transaction. Because the transaction will retry, set the
544545
// document to a different value each time.
@@ -557,6 +558,7 @@ - (void)testReadingADocTwiceWithDifferentVersions {
557558
// TODO(klimt): Perhaps we shouldn't fail reads for this, but should wait and fail the
558559
// whole transaction? It's an edge-case anyway, as developers shouldn't be reading the same
559560
// doc multiple times. But they need to handle read errors anyway.
561+
XCTAssertNil(snapshot);
560562
XCTAssertNotNil(*error);
561563
return nil;
562564
}

Firestore/core/src/credentials/user.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class User {
7070
}
7171
#endif // defined(__OBJC__)
7272

73+
User(const User& other) = default;
7374
User& operator=(const User& other) = default;
7475

7576
friend bool operator==(const User& lhs, const User& rhs);

cmake/external/googletest.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ if(TARGET googletest OR NOT DOWNLOAD_GOOGLETEST)
1818
return()
1919
endif()
2020

21-
set(version 1.10.0)
21+
# Note: googletest lives at head and encourages to just point to a head commit.
22+
# https://github.com/google/googletest/blob/bf66935e07/README.md?plain=1#L5-L10
23+
set(version bf66935e07825318ae519675d73d0f3e313b3ec6)
2224

2325
ExternalProject_Add(
2426
googletest
2527

2628
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
27-
DOWNLOAD_NAME googletest-${version}.tar.gz
28-
URL https://github.com/google/googletest/archive/release-${version}.tar.gz
29-
URL_HASH SHA256=9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb
29+
GIT_REPOSITORY https://github.com/google/googletest.git
30+
GIT_TAG "${version}"
31+
GIT_SHALLOW "ON"
3032

3133
PREFIX ${PROJECT_BINARY_DIR}
3234

0 commit comments

Comments
 (0)