* Move FSTPersistenceHelpers to core/test/.../local
* Rewrite persistence_testing in C++
* Migrate from FSTPersistenceTestHelpers to C++ persistence_testing
* Rename .mm to .cc where possible in IndexManager tests
* Remove Objective-C gunk from index_manager_test.h
Replace all uses of `FSTSerializerBeta` in `remote_objc_bridge.{h,mm}` with the C++ `Serializer`. Also, make most of `remote/` sources pure C++ and remove no-longer-used methods in `FSTSerializerBeta`. All integration tests pass, under Address Sanitizer as well.
Unfortunately, pretty-printing is still delegated to Objective-C, so that `remote_objc_bridge.mm` still has to be an Objective-C++ source (and which prevents inlining `remote_objc_bridge` into the streams).
#no-changelog Will add a changelog entry when local serializer is ported, too.
* Add Executor::CreateSerial
... a standard way to create an Executor for most cases where we don't
care about the implementation.
* Add ExecutorForTesting/AsyncQueueForTesting
Uses Executor::CreateSerial to do the heavy lifting.
* Use AsyncQueueForTesting
* Avoid direct references to ExecutorLibdispatch in prod code
* Rewrite time_testing in terms of absl::Time
* Migrate async_test_util's now to time_testing
* Fix AddressSanitizer stack-buffer-underflow error
This was reading random data off the stack until it hit a negative
integer's worth of data. The test passed because this was generating the
input and expected values, which were much longer than expected given
the input.
* Port FSTMemoryPersistence to C++ (#3754)
* Add local::Persistence
* Add MemoryPersistence
* Add MemoryEagerReferenceDelegate
* Make LruDelegate extend ReferenceDelegate
This enables downcasting to LruDelegate in tests that need to do so.
* Add MemoryLruReferenceDelegate
* Don't double-count document key size.
* Port FSTLevelDB to C++ (#3755)
* Add LevelDbPersistence
Note that Apple-specific initialization has been partitioned off in
anticipation of being able to run this code on non-Apple platforms.
* Add LevelDbLruReferenceDelegate
* Migrate to C++ Persistence (1/2) (#3756)
* Use C++ Persistence classes in FSTLocalStore
* Remove ReferenceDelegateBridge
* Cut src over to C++ persistence types
* Remove Objective-C requirement from some classes
... that no longer require it.
* Migrate to C++ Persistence (2/2) (#3757)
* Remove LruDelegateBridge
* Update test initialization of persistence components
In particular, ensure that there's always an owner for the Persistence
instance, which wasn't always handled explicitly in the Objective-C
version of the tests.
* Largely mechanical changes to tests
* Remove Objective-C persistence classes
* Forward declare util::Status when possible (#3761)
* Add a header dedicated to forward declarations for util::Status
* Use status_fwd.h wherever possible
* Rewrite Document-related classes as a polymorphic value type
* Pass ObjectValue without rvalue references
* Rename HasLocalMutations
* Port C++ users to new Documents
* Port FSTDocumentTests to C++
* Port FSTDocumentSetTests to C++
* Migrate DocumentMap and DocumentSet to C++ Document
* Migrate test helpers
* Delete FSTDocumentSetTests
* Delete FSTDocumentTests
* Mechanical changes to use C++ Document
* Updates to the project file
* Nontrivial test updates
* Remove FSTTestDeletedDoc
* Remove FSTTestUnknownDoc
* Remove FSTDocument
* Convert usage of FSTDocument to C++ Document
* Fix Serializer usage of Documents
* Port FSTSortOrder to C++ OrderBy
* Finish port of C++ Direction from Android
* Reimplement FSTSortOrder with C++ OrderBy
* Migrate FSTSortOrder to C++ OrderBy
* Remove FSTSortOrder
* Compare OrderBy equality in C++ Query
* Rename relation_filter.{h,cc} to field_filter.{h,cc}
* Rename RelationFilter to FieldFilter
* Move Filter::Create to FieldFilter
* Port api::Query::ValidateNewFilter
* Add ArrayContainsFilter
* Add KeyFieldFilter
* Make FieldFilter constructor protected
* Port FieldFilter refactor from the JS SDK
https://github.com/firebase/firebase-js-sdk/pull/1894
* Add spec test from firebase/firebase-js-sdk#1913
* Accept array-contains as a synonym for array_contains
* 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
* Add a test that verifies canonical IDs don't change
* Remove Query::AtPath
This has no parallel in Typescript or Java implementations.
* Add util::Equals
... for comparing pointers by the thing to which they point.
* Use std::shared_ptr<const std::string> for collection group IDs
* Reorder/Cleanup C++ Query to match Android
* Add collection group to C++ Query
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.
* Remove stale references to DatabaseId
* Have Firestore take the DatabaseId directly
* Allow tests to default the database implicitly
* Have FSTSerializerBeta take DatabaseId by value
* Have FSTUserDataConverter take DatabaseId by value
* Make FIRFirestore.databaseID a const reference
* Make FSTFirestoreClient.databaseID a const reference
* Have FSTReferenceValue take DatabaseId by value
* Have DatabaseInfo take DatabaseId by value
* Have Serializer take DatabaseId by value
* Fix C++ ReferenceValue
* Take DatabaseId by value
* Reverse order to match Android
* Rename `reference` to `key`
* Move the util::objc namespace to just objc
This removes all the namespace objc = firebase::firestore::util::objc
gunk to make it seem as if this was really the arrangement.
This is motivated by wanting to put additional things in this namespace
and use them in headers without having to use util::objc::Foo
* Add CMake support for header-only cc_library targets
* Have the linter allow #include <objc/objc.h>, a C header
use namespace aliases instead.
This makes the Objective-C code much more like what it's going to end up
being like when translated to C++: headers will include classes declared
in a namespace relative to firebase::firestore so everything else will
be named relative to firebase::firestore.
Meanwhile the using statements in the headers were causing us to miss
adding using statements in source files which was moving us away from
where we wanted to be.
* Test that shows a leak.
* Add EventListener to match Android.
* Use AsyncEventListener in FSTQueryListenerTests
* Remove FSTAsyncQueryListener
* Use EventListener throughout
* Add deployment targets for osx
* Fix bundle path to make spec tests work
On iOS, resources are directly within the bundle so the bundlePath and
the resourcePath are the same.
On macOS, resources are in a Contents/Resources subfolder so enumerating
from bundlePath causes us to look for names like
Contents/Resources/offline_spec_test, which doesn't work.
* Fix documentation warnings that show up under the macOS build