Skip to content

Commit 6f7e251

Browse files
committed
Fix abseil forward ref warning for StrSplit
1 parent 90b117f commit 6f7e251

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

FirebaseFirestore.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
8888

8989
s.dependency 'FirebaseCore', '~> 8.0'
9090

91-
abseil_version = '0.20200225.0'
91+
abseil_version = '~> 1.20211102.0'
9292
s.dependency 'abseil/algorithm', abseil_version
9393
s.dependency 'abseil/base', abseil_version
9494
s.dependency 'abseil/container/flat_hash_map', abseil_version
@@ -98,7 +98,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
9898
s.dependency 'abseil/time', abseil_version
9999
s.dependency 'abseil/types', abseil_version
100100

101-
s.dependency 'gRPC-C++', '~> 1.28.0'
101+
s.dependency 'gRPC-C++', '~> 1.44.0'
102102
s.dependency 'leveldb-library', '~> 1.22'
103103
s.dependency 'nanopb', '~> 2.30908.0'
104104

Firestore/core/src/model/field_path.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include <algorithm>
2020
#include <utility>
21+
#include <vector>
2122

2223
#include "Firestore/core/src/util/exception.h"
2324
#include "Firestore/core/src/util/hard_assert.h"
@@ -100,7 +101,7 @@ FieldPath FieldPath::FromDotSeparatedStringView(absl::string_view path) {
100101
path);
101102
}
102103

103-
SegmentsT segments =
104+
std::vector<absl::string_view> segments =
104105
absl::StrSplit(path, '.', [path](absl::string_view segment) {
105106
if (segment.empty()) {
106107
ThrowInvalidArgument(
@@ -111,7 +112,10 @@ FieldPath FieldPath::FromDotSeparatedStringView(absl::string_view path) {
111112
return true;
112113
});
113114

114-
return FieldPath(std::move(segments));
115+
std::vector<std::string> segment_strs =
116+
std::vector<std::string>(segments.begin(), segments.end());
117+
118+
return FieldPath(std::move(segment_strs));
115119
}
116120

117121
StatusOr<FieldPath> FieldPath::FromServerFormat(const std::string& path) {

Firestore/core/src/model/resource_path.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,12 @@ ResourcePath ResourcePath::FromStringView(absl::string_view path) {
4545

4646
// SkipEmpty because we may still have an empty segment at the beginning or
4747
// end if they had a leading or trailing slash (which we allow).
48-
std::vector<std::string> segments =
48+
std::vector<absl::string_view> segments =
4949
absl::StrSplit(path, '/', absl::SkipEmpty());
50-
return ResourcePath{std::move(segments)};
50+
std::vector<std::string> segment_strs =
51+
std::vector<std::string>(segments.begin(), segments.end());
52+
53+
return ResourcePath{std::move(segment_strs)};
5154
}
5255

5356
std::string ResourcePath::CanonicalString() const {

Firestore/core/src/model/value_util.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ ComparisonResult CompareBlobs(const google_firestore_v1_Value& left,
161161

162162
ComparisonResult CompareReferences(const google_firestore_v1_Value& left,
163163
const google_firestore_v1_Value& right) {
164-
std::vector<std::string> left_segments = absl::StrSplit(
164+
std::vector<absl::string_view> left_segments = absl::StrSplit(
165165
nanopb::MakeStringView(left.reference_value), '/', absl::SkipEmpty());
166-
std::vector<std::string> right_segments = absl::StrSplit(
166+
std::vector<absl::string_view> right_segments = absl::StrSplit(
167167
nanopb::MakeStringView(right.reference_value), '/', absl::SkipEmpty());
168168

169169
size_t min_length = std::min(left_segments.size(), right_segments.size());

Package.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ let package = Package(
178178
.package(
179179
name: "abseil",
180180
url: "https://github.com/firebase/abseil-cpp-SwiftPM.git",
181-
"0.20200225.4" ..< "0.20200226.0"
181+
"0.20220203.1" ..< "0.20220204.0"
182182
),
183183
.package(
184184
name: "gRPC",
185-
url: "https://github.com/firebase/grpc-SwiftPM.git",
186-
"1.28.4" ..< "1.29.0"
185+
url: "https://github.com/grpc/grpc-ios.git",
186+
"1.44.0-grpc" ..< "1.45.0-grpc"
187187
),
188188
.package(
189189
name: "OCMock",

0 commit comments

Comments
 (0)