Commit Graph
39 Commits
Author SHA1 Message Date
Paul Beusterien f5309bf45b [v11] Remove unused FIRDependency class (#13053) 2024-06-04 06:56:50 -07:00
Paul Beusterien b4d4586aaa [auth-swift] Consistent structure for FirebaseAuthInterop (#12384) 2024-02-20 17:24:46 -08:00
Andrew HeardandNick Cooke f3a14c249e Add FirebaseAppCheckInterop umbrella header (#11860)
Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
2023-10-11 18:39:18 -04:00
Nick Cooke 3b8e5553b5 [Firestore] Programmatically link un-linked symbols (#10896)
* [Firestore] Force link un-linked symbols

* Style
2023-03-10 12:48:44 -05:00
Nick Cooke a09083f9d0 [v9] Reorganize FirebaseCore* modules (#9482)
* [skip ci] [will revert] Add debug printing to `pod_lib_lint.rb`

* Reorganize FirebaseCore libraries for SPM and CP

* [skip ci] Revert "[skip ci] [will revert] Add debug printing to `pod_lib_lint.rb`"

This reverts commit 2a837e39708c21b0a324743ab226bd6c01047de7.

* Review and fix CI

* Remove `heartbeat_logging.yml` and add `core_internal.yml`

* Remove trailing whitespace

* Fix more whitespace 😞

* Fix `core_internal.yml` scheme name

* Update `check_imports.swift` and TODO

* Review

* Add FirebaseCoreInternal pod to Firestore example's Podfile

* [skip ci] Review - remove TODOs

* [skip ci] Remove duplicate `XCTest` import
2022-03-23 06:08:14 -07:00
Paul Beusterien a1cb5656fc Auth and Messaging Interop for Swift (#9314) 2022-03-23 06:08:13 -07:00
Paul Beusterien 6361347a22 Podspecs for CoreInternal and AppCheckInterop (#9300) 2022-03-23 06:08:03 -07:00
Paul Beusterien e748d16594 AppCheckInterop for Swift dependents (#9299) 2022-03-23 06:07:17 -07:00
Paul Beusterien 4f793064da Set up Core Internal for SPM (#9298) 2022-03-23 06:07:17 -07:00
Denver Coneybeare fa6dae2233 Remove unused 'using' declarations (#8919) 2021-11-02 22:31:20 -04:00
Sebastian Schmidt 63c1673255 Add plumbing for AppCheck provider (#8765) 2021-10-11 12:00:23 -06:00
Sebastian Schmidt 697730ff12 Add AppCheck Interop for Firestore (#8749) 2021-10-08 08:58:08 -06:00
Sebastian Schmidt 03a1ed5778 Rename the Auth package to Credentials (#8753) 2021-10-07 14:16:58 -06:00
Konstantin Varlamov f243335a25 Don't define a util namespace alias in the global namespace. (#8527)
This would conflict with any definition of a `util` namespace imported from a header. While this applies to other aliases as well, `util` is the one most likely to clash and the one that has actually caused problems.

#no-changelog
2021-09-24 09:11:41 -06:00
Sebastian Schmidt e8f419baf2 Migrate FieldValue to Protobuf (#8124) 2021-07-22 12:44:17 -06:00
Ehsan acc2d15b29 Fix warnings generated by Clang-Tidy (#8181)
* Remove unused namespace alias.

* Remove unused 'using' statements.

* Remove more unused 'using' and namspace aliases.

* Prefer absl::StrContains over comparing `find` result with `npos`.

* Remove more unused things.

* Prefer usage of `empty()` over `size()` when possible.

* Remove more unused things.

* Address code review.

* Address code review.

* More fixes to query_core.cc

* comment should match parameter name.

* Pre-allocate container capacity for better performance.

* More fixes.

* Fix inconsistent declaration parameter name.

* Fix inconsistent declaration parameter name.

* Fix inconsistent declaration parameter name.

* Address bugprone-inaccurate-erase (inappropriate `erase` overload was used).

* Fix return type of move and copy constructor.

* Fix bugprone use after move.

* Fix formatting.

* Reflect the param name change in the doc.
2021-06-04 10:33:43 -05:00
Paul Beusterien 83e898ab5c One Firebase version (#6634) 2020-10-02 12:26:22 -07:00
Konstantin Varlamov 2311c36dbc Integrate Firestore with Firebase platform logging (#6507)
The sample user agent string I'm getting in XCode is `apple-platform/ios apple-sdk/17E8258 fire-fst/1.17.1 fire-ios/6.10.2 swift/true xcode/11E503a`.
2020-09-25 15:47:20 -04:00
Paul Beusterien e15724a436 Migrate from interop pods to source_files header access (#5760) 2020-06-09 06:09:27 -07:00
Paul Beusterien d4621a636f Use preserve_paths instead of CocoaPods private (#5758) 2020-06-09 05:21:28 -07:00
Gil 7a58eba2e5 Remove firebase/firestore from paths in Firestore/core (#5374)
* 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).
2020-04-20 14:57:34 -07:00
Gil 74f4ceb4c9 Fix unused variable warnings (#5389)
* 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
2020-04-20 14:23:36 -07:00
Gil 77f92cd2c6 Stop using built-in CMake Framework support (#5316)
* 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
2020-04-14 08:40:33 -07:00
Gil d9b7a33f0c Use forward declarations instead of IWYU (#4868)
* 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.
2020-02-15 14:34:38 -08:00
Gil 7f84e84bf9 Fixes for issues discovered in the Unity desktop build (#4795)
* 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
2020-02-04 13:38:59 -08:00
Gil e6a4905336 Add concurrent execution support to Executor (#4309) 2019-11-15 09:34:44 -08:00
Gil cd460eca2d Rationalize input validation exceptions and assertion failures (#4107)
* 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
2019-10-18 12:58:45 -07:00
wu-hui c5b5a44603 Rename shutdown to terminate and publish it. (#3694)
* Rename shutdown to terminate and publish it.

* Addressing feedbacks
2019-08-27 11:51:01 -04:00
Michael Lehenbauer 6555e1cc7c Provide a helpful error if FIROptions.projectID is missing. (#3610) 2019-08-16 07:43:13 -07:00
Hui-Wu 902d9fe4c5 Port public shutdown (#3467)
* async_queue shutdown ready

* shutdown feature complete. need to fix shared_ptr for credprovider and stop executor leakage.

* stop executor leakage.

* Improved comments without shared_from_this

* shared_ptr everywhere!

* undo scheme change

* addressing comments #1

* addressing comments

* addressing comments #3
2019-08-06 20:33:08 -04:00
Gil 8770828dd8 Refactor usages of DatabaseId to avoid raw pointers (#3041)
* 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`
2019-05-21 20:28:51 -07:00
Gil 2e8b9181fa Port FSTUsageValidation to C++ (#2670)
* Port FSTUsageValidation to C++

* Add an error log level
2019-03-28 13:19:28 -07:00
Konstantin Varlamov 0643b36aef C++ migration: make FIRFirestore implementation delegate to core API (#2492) 2019-03-15 16:10:32 -07:00
Paul Beusterien 7c53489e03 Travis to Xcode 10.1 and clang-format to 8.0.0 (tags/google/stable/2018-08-24) (#2222)
* Travis to Xcode 10.1
* Update to clang-format 8
* Update clang-format homebrew link
* Work around space in filename style.sh issue
2019-01-02 09:27:31 -08:00
Paul Beusterien 943141e0cd Use registerLibrary for pods in Firebase workspace (#2137)
* 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
2018-12-13 08:36:08 -08:00
Konstantin Varlamov e0d797515c C++: eliminate FSTDispatchQueue and replace it with AsyncQueue (#2062)
* 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.
2018-11-18 17:49:32 -05:00
Gil 16f7be5864 Migrate nearly all usages of MakeStringView to MakeString (#1679) 2018-08-13 15:23:58 -07:00
Gil 15ef78f090 Replace uses of absl::string_view in constructor parameters with std::string (#1676)
* 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
2018-08-13 11:02:28 -07:00
Ryan Wilson 7c56bb7c03 Move Firestore to Auth interop library. (#1525)
* 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.
2018-07-25 13:19:53 -04:00