* Manual Xcode project fixups
* Remove `firebase/firestore` from paths in Firestore/core
This renames all Firestore files under `Firestore/core` to remove the
interior `firebase/firestore` directory structure. This is motivated by
build failures under Windows where the filenames of intermediates were
too long.
Concretely:
* `Firebase/core/src/firebase/firestore` becomes `Firebase/core/src`
* `Firebase/core/test/firebase/firestore` becomes
`Firebase/core/test/unit`
Moving the tests into a `unit` subdirectory aligns Firestore with the
directory structure in
[AddNewPod](https://github.com/firebase/firebase-ios-sdk/blob/master/AddNewPod.md),
modified for C++ (see discussion in #3224).
* 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
* working serverTimestamp
* working FieldValue. Still need: document ref and ability to Eq of FieldValue
* DocumentReference implemented and testing works
* clean up header search path
* improving FieldValue enum comments
* run through formatting
* addressing comments
* formatted with swiftformat 0.35.7
* add missing bool->BOOL change
* undo unintended swift version change
* remove unwanted proj file change
* 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`
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.
* Replace FSTDocumentSet's guts with immutable::SortedSet.
* Port FSTDocumentSet to C++ DocumentSet.
* Replace implementation of FSTDocumentSet with C++ DocumentSet
* Update all usages of FSTDocumentSet
* Remove FSTDocumentSet
* Add Objective-C++ guard
* Use absl::c_equal instead of hand-rolling it.
* Split SortedContainer out of SortedMapBase
... and use it
* Fix NSNotFound -> npos
* Remove = default constructors that aren't true.
These are implicitly deleted because DocumentSet is a member and isn't
default constructible.
* Fix usage of FSTQuery.limit
* 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
Also eliminate most usages of `FSTDocumentKey`, remove most methods from the Objective-C class and make it just a wrapper over `DocumentKey`. The only usage that cannot be directly replaced by C++ `DocumentKey` is in `FSTFieldValue`.
* 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
* Add a MakeStringView benchmark
Turns out this is worse than just creating a std::string:
BM_MakeString 29 ns 29 ns 189065849
BM_MakeStringView 59 ns 59 ns 93013367
* Convert database_id to take std::string
* Convert DatabaseInfo to take std::string
* Convert User to take std::string
* Convert Token to take std::string
* Convert MakeStringView([NSString stringWithFormat:]) to StringFormat
* naively remove FSTPath import and source/test files.
* port FieldPath, part I
* port FieldPath, part II
* port ResourcePath, part I
* port ResourcePath, part II
* the grand commit to fix build errors
* use testutil:: helper instead of those from FSTHelpers
* fix test and lint
* use c_str in errmsg directly
* fix
* fix
* make code clean
* fix integration test I missed
* fix to avoid naming collision in preprocessor
* address changes
* address changes
* address changes
* fix: fieldMask are actually shared with different context.
* address changes
* add converter function between two DocumentKey implementations
* add unit test
* address changes
* fix lint
* using DocumentKey in model except for the container types `FSTDocumentDictionary`, `FSTDocumentKeySet`, and `FSTDocumentVersionDictionary`
* change other place w.r.t. the use of `DocumentKey` in model
* update parameter of test helpers from NSString to string_view
* revert a temporary change used in debug
* address changes
* naively remove FSTPath import and source/test files.
* port FieldPath, part I
* port FieldPath, part II
* port ResourcePath, part I
* port ResourcePath, part II
* the grand commit to fix build errors
* use testutil:: helper instead of those from FSTHelpers
* fix test and lint
* use c_str in errmsg directly
* fix
* fix
* make code clean
* fix integration test I missed
* fix to avoid naming collision in preprocessor
* address changes
* address changes
* address changes
* fix: fieldMask are actually shared with different context.
* address changes
* address changes
* Move all Firestore files to Objective-C++
* Update project file references
* Don't use module imports from Objective-C++
* Use extern "C" for C-accessible globals
* Work around more stringent type checking in Objective-C++
* NSMutableDictionary ivars aren't implicitly casted to NSDictionary
* FSTMaybeDocument callback can't be passed a function that accepts
FSTDocument
* NSComparisonResult can't be multiplied by -1 without casting
* Add a #include <inttypes.h> where needed
* Avoid using C++ keywords as variables
* Remove #if __cplusplus guards