In particular:
* All tasks are guaranteed to either run to completion or not run at all;
* Executors can now be destroyed from the threads they own (if applicable); and
* Many common concepts between the Executor implementations have been harmonized and shared.
Note:
* This change does not yet implement `Executor::Dispose` or clean up any of the higher level componentry to take advantage of these changes.
* The executors implement shutdown by canceling any tasks that haven't started yet. This diverges from the plan (which called for a separate `UserCallbackExecutor` to handle this), but in the end it turns out to be simpler to just cancel everything and make cancel handle tasks-in-progress in a reasonable way. LMK if you have grave objections to this, in which case I can rework this.
This is the foundation for addressing firebase/quickstart-unity#638.
The tests in this target are already covered by
Firestore_IntegrationTests_iOS and also run on the other platforms
through the other platform variants of this target.
Also remove an explicit override of CLANG_WARN_COMMA in the
Firestore_Example_macOS target. This should have been cleaned up earlier
--no other targets have this setting.
* 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).
There are some particular pain points debugging Firestore today because contents of variables are obscured due to information hiding and shared representation techniques we use. Also, we use elements of the Abseil library to supplement what's available in the C++11 standard library.
Taken together, these make our default experience in LLDB and the Xcode debugger quite painful: getting the path of a document currently takes 5 clicks. This change pulls the document path into the summary line, making it available with no clicks.
This change adds type summaries for
* DocumentKey and ResourcePath
* DocumentReference and FIRDocumentReference
* DocumentSnapshot and FIRDocumentSnapshot
* absl::optional
* DatabaseId
* Add new, simpler CMake helper functions
... making them more like built-in functions. This makes it possible to
combine other CMake functions in ways that weren't possible with the
original all-in-one approach.
This includes:
* firebase_ios_add_executable
* firebase_ios_add_test
* firebase_ios_add_library
All of which can be combined with target_link_libraries, etc.
* Shorten CMake test targets, e.g. firebase_firestore_util_test => firestore_util_test
* Remove CMake file inclusion check
Now that we're committed to using globs for finding sources, this check
is incompatible and no longer useful.
This really needs to be set on the command-line if it's to be effective,
and setting it here breaks downstream projects that include
firebase-ios-sdk as a subdirectory.
* Don't modify CMAKE_CXX_FLAGS
* Avoid conflict on RANDOM_FILE
* Only conditionally build tests
* Remove alias provided by the upstream build
* Set SOURCE_DIR and BINARY_DIR for each external library
* Compute repo root without git
This supports building Firestore from a source archive
* Make empty files C++
This makes it possible to compile with a single set of flags for every
cc_library.