* 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).
* Fix unused variable warnings
These are now exposed because libprotobuf is no longer polluting the
compiler command-line with -Wno-unused-parameter.
* Convert (void)var to __unused where possible
* Fix previously unknown warnings
These become visible once flags are handled uniformly across all
Firestore targets in an upcoming build change.
* Stop using built-in CMake Framework support
CMake has built-in support for building Framework bundles (briefly:
bundles of libraries, associated headers, and resources) but this
doesn't work well for our needs.
1. In CMake 3.5.1 (our earliest supported CMake version) it doesn't copy
headers properly at build time.
2. Even up to CMake 3.15.5, CMake doesn't handle link-line multiplicity
correctly. CMake passes the static library location within the framework
and this seems to cause the linker to mishandle Objective-C metaclass
information resulting in duplicate symbols. Building with `-framework`
flags works correctly.
Previously we partially worked around the latter problem by building
some frameworks as shared instead of static frameworks, but this is
problematic because this mode of operation isn't actually intended and
is unsupported as far as the rest of Firebase is concerned. This turned
out to be fragile though and while refactoring libraries this workaround
broke.
Rather than piling on additional workarounds, this change converts the
frameworks to simple library targets and emulates framework imports
through include paths.
Additionally, this starts refactoring our cmake helper functions to make
them more like built-in functions. This makes it possible to freely use
different CMake features that were made difficult by trying to wrap
everything up in a single CMake command.
* style.sh generated changes
* Review feedback
* More review feedback
* Remove rarely used template argumnets from SortedMap/SortedSet
* Remove unused STATUS_CHECK_OK
* Rename QuerySnapshot::Listener to QuerySnapshotListener
This makes the type something that can be forward declared.
* Rename DocumentSnapshot::Listener to DocumentSnapshotListener
This makes the type something that can be forward declared.
* Rename ViewSnapshot::Listener to ViewSnapshotListener
This makes the type something that can be forward declared.
* Put most QueryListener implementation in .cc
* Actually use sync_engine_callback.h
* Add forward declaration headers for api, core, and model
These centralize forward declarations, including declarations for some
hard-to-forward-declare types.
* Move includes of hard_assert.h out of other headers
* Make testutil definitions out of line
* Move definitions out-of-line
* Move DocumentKey definitions out-of-line
* Move definitions out-of-line
* Shorten unnecessarily long namespace usages
* Use default destructors where possible
* Delete unused MutationBatch::kUnknown constant
* Use forward declarations instead of IWYU
* Misc fixups from Linux/GCC 9.2.1
* Fix testutil under VS 2017
Forward declarations of functions local to a function body end up
generating unresolved externals. Reduce most of these back to just
calling FieldValue::FromX methods.
* Make Filesystem's destructor virtual
* Avoid capturing a strong reference to FirestoreClient in GC tasks.
This prevents this task from keeping the FirestoreClient alive even
after the api::Firestore instance has been destroyed.
* Ensure that FirestoreClient is terminated
In the public C++ API, it's possible to delete the owning FirebaseApp
which triggers the destruction of the api::Firestore object even though
we haven't called Terminate.
This makes it such that api::Firestore calls a blocking Terminate call
on FirestoreClient in its destructor.
Additionally, change AsyncQueue to always run the operation enqueued on
shutdown, even if already shutdown. Make FirestoreClient capable of
short circuiting the termination work for itself. This makes terminate
idempotent in a more staightforward way.
* Clean up excess logging
* Remove defintion of weak_from_this
* Review feedback
* Make AsyncQueue extend std::enable_shared_from_this
Also hide the AsyncQueue's public constructor and force all users to
manage their reference to it via std::shared_ptr.
* Handle Executor shutdown from within its own pool
* Rationalize input validation exceptions and assertions
... under a single ThrowHandler concept. This makes it possible to set
an alternative ThrowHandler in our C# bindings that properly translates
input validation exceptions to the correct .NET exception types.
* Rename api/input_validation.h to util/exception.h
* Reimplement util/hard_assert.h in terms of util/exception.h
* 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`
* Add versioning to Functions and convert to FIRLibrary
* Convert Firestore to FIRLibrary
* Point travis to FirebaseCore pre-release for its deps
* Update user agent strings to match spec
* 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.
* 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
* Move Firestore to Auth interop library.
* Fixed TODO with no name.
* Extract interop into separate class.
* Further Firestore interop changes.
* Move auth instance to constructor of CredentialsProvider.
* Resolved travis failures.
* Create separate queue for FIRApp instances, remove dead test code.
* Add missing <string> import.