* [1/4] Split Query and Target, and make LocalStore/RemoteStore work with Target. (#4413)
* [2/4]LimitToLast: Make SyncEngine work with Target (#4491)
* [3/4] Implement LimitToLast (#4505)
* Use C++ Filters in FSTQuery without changing interface
* Remove FSTQuery initWithPath
* sync_project.rb generated changes
* Implement Filter equality
* Consistently use testutil:: helpers unqualified
* Use C++ Filters in FSTQuery
This makes it match the convention we've established for other
converters of this type. WrapNSString was perhaps the earliest of these
that we wrote and the convention hadn't yet been established.
This includes fixes for:
* All the field escaping tests
* testCanWriteVeryLargeBatches
* testWritesWithIndirectlyNestedArraysSucceed
All tests now pass. I've left isRunningAgainstEmulator in the source
even though there are now no callers.
* Make GrpcConnection safe to use with thread sanitizer
One additional lock acquisition per connection attempt isn't going to
kill us.
* Make tests pass with tsan and ubsan
* Run Firestore integration tests against the emulator
* Ignore emulator-related files
* Add a script to run the Firestore emulator
* Blacklist all transformation-related tests
* Test that shows a leak.
* Add EventListener to match Android.
* Use AsyncEventListener in FSTQueryListenerTests
* Remove FSTAsyncQueryListener
* Use EventListener throughout
* Update Firestore project to Xcode 10.1 defaults
* Fix NSUInteger in format strings warning
* Fix implicit conversion warning in FSTLevelDB
* Fix BOOL/bool mismatch
* Fix erroneous comparison
This failure shows up on 32-bit targets. I have no idea why this
succeeds on 64-bit targets.
* Fix incorrect type inference with explicit cast
clang is inferring the type of the key in these maps is `NSString *` and
then complaining that `FIRFieldValue *` doesn't match that type, despite
the underlying method taking `NSDictionary<id, id>`. Explicitly casting
to `id` prevents the warning.
* Remove reliance on representation in FSTFieldValue tests
On *some* platforms [NSNumber numberWithChar:1] ends up with a "c"
(signed char) objcType, but apparently on 32-bit platforms this ends up
as "i" (signed int). Rather than relying on this working properly just
test that [NSNumber numberWithBool:] does the right thing.
* Fix field_value_test on 32-bit targets
When sizeof(void*) is 4 the test failed :-(.
* Rephrase testWritesWithLargeNumbersFail in terms of fixed size types
The prior definition only worked on LP64. Switching to LLONG_MAX would
have also fixed this, but Firestore's data model is independent of C's
data model, so rewriting this in terms of fixed size types more closely
models what's actually an invalid value.
* Fix implicit retain self warnings
Without this, it still fails, but:
a) not until serializing the query, and
b) the error is an internal error, and
c) the error message is quite cryptic and has nothing to do with the problem.
Port of https://github.com/firebase/firebase-android-sdk/pull/138
* Reorder tests to match Android
* Add missing NS_ASSUME_NONNULL_BEGIN
* Add missing [self awaitExpectations]
* Port can write very large batches from Android
* replace all references to `FSTDispatchQueue` and `FSTTimerID` with their C++ equivalents;
* remove `FSTDispatchQueue` class and related tests;
* in method argument names, replace `workerDispatchQueue` with just `workerQueue`, more similar to other platforms;
* move `Executor` and derived classes out of `internal` namespace.
* Drop acknowledged mutations in schema migration (#1818)
Drop acknowledged mutations in schema migration as part of removing held write acks.
Port of firebase/firebase-js-sdk#1149
* Change removeMutationBatch to remove a single batch (#1955)
* Update Firestore Generated Protos
* Adding UnknownDocument and hasCommittedMutations (#1971)
* Removing held write batch handling from LocalStore (#1997)
* View changes for held write acks (#2004)
* Held Write Acks Unit Test Fixes (#2008)
* Held Write Ack Removal Spec Tests (#2018)
* Fix integration test
[Port of https://github.com/firebase/firebase-js-sdk/pull/1197]
1. Changed MAX_WATCH_STREAM_FAILURES to 1 per conversation with @wilhuff and
@jdimond.
2. Fixed a "race" where when a get() triggered a watch stream error, we'd
restart the stream, then get() would remove its listener, and so we had no
listener left once the watch stream was "opened". Without a listen to send
we'd be stuck in Offline state (even though we should be Unknown whenever
we have no listens to send), resulting in the next get() returning data
from cache without even attempting to reach the backend.