| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* port FieldMask to C++
* address changes
* address changes
* fix test
* address change
* Port transform operations (FSTTransformOperation, FSTServerTimestampTransform) to C++
* address changes
* address changes
* address changes
* implement `FieldTransform` in C++
* port `FieldTransform`
* make `fieldTransforms` shared inside `context`
* address changes
* fix lint
* address changes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lint.sh now lints Objective-C++ too
* cpplint checks system-style includes that should be user-style
This prevents it from recognizing project sources as if they were C
system headers and then complaining that they're in the wrong place.
* cpplint checks #imports and #includes
* cpplint checks that C++ system headers aren't #imported
* cpplint checks for C system headers that could be C++ system headers
* cpplint checks that Objective-C sources include their headers
|
|
|
|
|
|
|
|
| |
Deserializing not handled yet.
Note that the serializing case is fairly uninteresting, as assuming
valid input is passed in, there's no real reason why it should fail (and
if it does fail, it indicates a gross violation of our understanding of
the system.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* port FieldMask to C++
* address changes
* address changes
* fix test
* address change
* Port transform operations (FSTTransformOperation, FSTServerTimestampTransform) to C++
* address changes
* address changes
* address changes
* address change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* port FieldMask to C++
* address changes
* address changes
* fix test
* address change
* fix lint
* address changes
* Revert "address changes"
This reverts commit c75bb42851b785ab0838bb23679f87dfad9df4bb.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some Timestamp tests check that constructor fails if given values beyond
the supported (pretty wide) range. In case Timestamp is created from
chrono::time_point, the time_point's underlying duration is
implementation-defined and may overflow when tests try to set it to
a value beyond Timestamp supported range. To work around this, make
these tests not run if time_point cannot represent boundary values on
this platform. For example, on OS X, time_point has microseconds
precision, so the tests may run, but on Linux, time_point has
nanoseconds precision, which would overflow.
|
|
|
|
|
|
|
|
|
|
| |
* Prepare for TreeSortedMap
* Factor out SortedMapBase
* Move ArraySortedMap to impl
* Factor out SortedMap testing utilities
* Add a minimal TreeSortedMap
* Add the public SortedMap type
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* move Timestamp from model/ to the root directory;
* move Timestamp to top-level firebase namespace and update all references;
* add conversions to and from native date types;
* add a specialization of std::hash;
* add comments to public member functions;
* rename nanos -> nanoseconds;
* add public headers, including Timestamp, to CMake;
* increase test coverage.
|
|
|
|
|
|
|
| |
* Rename Writer::Encode* methods to Writer::Write*
* Rename: s/stream/writer/ (approximately)
but only where it applies to Writer (rather than pb_ostream_t).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change CredentialsProvider::TokenListener to use StatusOr
Rather than a token plus error code/msg.
* Eliminate the concept of an invalid Token
Instead, we'll just use StatusOr<Token>. Note that unauthenticated
tokens are handled as a special case; they're created via:
Token::Unauthenticated()
and are otherwise "valid", though attempting to retrieve the raw token
on one of these tokens will cause an assertion failure.
|
|
|
|
| |
* Pull in status files from tensorflow
* Add missing dependency to immutable library
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix ArraySortedMap.ChecksSize test (when NDEBUG is enabled)
assert() is a noop when NDEBUG is defined (i.e. during production
builds) so the size assertion check doesn't occur. Assuming we want this
check even during prod use, I've switched assert to FIREBASE_ASSERT.
* s/FIREBASE_ASSERT/FIREBASE_DEV_ASSERT/g in ordered_code.cc
This keeps the behaviour in line with the original (which purposely
differs if NDEBUG is defined or not.) Discovered due to the test suite
(correctly) breaking during a prod build.
|
|
|
| |
These can (recursively) contain other FieldValues.
|
|
|
|
|
|
|
|
| |
* replace path with C++ implementation in FSTDocumentKey.{h,mm} only
* address changes
* address changes
|
|
|
|
|
|
|
|
|
|
| |
* add converters and fix FSTQuery.{h,m} only
* address changes
* a change forget to address
* add a dummy function to make inline-only-library buildable
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lazy replacing FST(Firebase)CredentialsProvider by (Firebase)CredentialsProvider
* lazy replacing FSTUser by User
* adding error-code parameter to TokenListener
* actually use const user& instead of pointer; also add an error util
* add HashUser and pass into the unordered_map
* use User in test
* use c++ CredentialsProvider and subclass in test
* fix unit test
* use explicit capture in lambda instead of capture all by reference
* cache currentUser explicitly when reset sync engineer test driver
* objc object should be captured by value in lambda
* replacing Auth/FSTUser by C++ auth implementation
* address changes
* replacing FSTGetTokenResult by C++ Token implementation
* address changes
* fix unintentional change in merging
* patch the change in objc Auth up-stream
* somehow, the lambda-version of set-user-change-listener does not work... fallback to block
* address changes
* fix another const& v.s. dispatch bug
* fix more const& v.s. dispatch bug zxu123 committed
* fix a bad sync line
* address changes
* address change
* address change
* fix upstream change from merge
* fix upstream changes
* Suggested fixes for cpp/port_auth (#846)
* Get rid of MockDatastore factory
This avoids the need to statically allocate (and leak) a credentials
provider
* Use absl::make_unique
std::make_unique technically does not exist until C++14.
* #include <utility> for std::move
* Use std::future for the initial user
* fix style
|
|
|
|
|
|
|
|
| |
This will likely only apply for proto messages that use 'oneof's. (Because we need to serialize these manually.)
The problem was that as we were adding additional types, TypeValue was evolving into a parallel implementation of the FieldValue union.
When serializing/deserializing oneofs we need to supply a custom value to serialize and a custom function to do the work. There's no value in translating from FieldValue to TypeValue just to store as this custom object. We might as well just store the FieldValue model directly and write the custom serializer/deserializer to use the model directly.
|
|
|
| |
Was failing the cmake build on linux.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add FIRFirestoreTests to the Firestore Xcode project
* Avoid waitForExpectations:timeout:
This API was added in Xcode 8.3, but we still build production releases
with Xcode 8.2. waitForExpectationsWithTimeout:handler: is available
from Xcode 7.2.
* Add AppForUnitTesting
Add a utility for constructing a Firebase App for testing.
* Handle the nil UID from FIRAuth
* Avoid running CMake tests twice
* Only build app_testing on Apple platforms
* Revise test.sh messages
|
|
|
|
|
|
| |
* Avoid wrapping and rewrapping NSStrings when constructing DatabaseId
* Shorten DatabaseId::kDefaultDatabaseId
|
| |
|
|
|
|
| |
Reduces noise while running valgrind so that I can see the leaks that
I'm introducing. :/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* replacing Auth/FSTUser by C++ auth implementation
* address changes
* replacing FSTGetTokenResult by C++ Token implementation
* address changes
* address changes
* fix another const& v.s. dispatch bug
* fix more const& v.s. dispatch bug zxu123 committed
* fix
* passing by value in callback
|
| |
|
|
|
|
|
|
| |
* replacing Auth/FSTUser by C++ auth implementation
* address changes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Build (grpc's) nanopb with -DPB_FIELD_16BIT
We require (at least) 16 bit fields. (By default, nanopb uses 8 bit
fields, ie allowing up to 256 field tags.)
Also note that this patch adds this to grpc's nanopb, rather than to our
nanopb. We'll need to eventually either:
a) we instruct grpc to use our nanopb
b) we rely on grpc's nanopb instead of using our own.
(^ marked as a TODO for now.)
* Add some dependant protos
Imported from protobuf. Nanopb requires these to be present (though
anything using libprotobuf does not, as these are already built into
that.)
* Add generated nanopb protos based off of newly added proto definitions
* Build the nanopb protos
* Serialize and deserialize null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* implement SnapshotVersion and test
* update project
* implement MaybeDocument and test
* move snapshot-version from core to model
* fix a bug
* implement Document and test
* implement NoDocument
* adding type tag and fix style
* fix a few bugs, discovered after merging and test run.
* add assert to check FieldValue type and more test for comparision.
* address changes
* allow moving FieldValue to construct Document.
* address changes
* add document tests to project
* use std::less convention
* make Type::Unknown static initializer
|
|
|
|
|
|
|
|
|
|
| |
* update FieldValue of type Reference
* address change
* fix bad path string literal in test
* use ReferenceValue and qualified name
|
|
|
|
|
| |
Also move kDocumentKeyPath to the only point of usage - make it a static
member variable of FieldPath.
|
|
|
| |
* implement SnapshotVersion and test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement firestore/auth/user
* add user to project and some fixes
* implement firestore/auth/{credentials_provider,empty_credentials_provider}
* implement firestore/auth/firebase_credentials_provider
* refactoring firebase_credentials_provider and add (disabled but working) unit test
* add auth test to project
* address changes
* small fix to style and project
* fix the firebase_credentials_provider_test
* fix style
* address changes
* revert the change to static mutex_
* remove my custom plist path
* fix style
* address changes
* refactoring FirebaseCredentialsProvider to fix the issue w.r.t. auth global dispatch queue
* add /*force_refresh=*/ tag to bool literal for style purpose
* Use a shared_ptr/weak_ptr handoff on FirebaseCredentialsProvider (#778)
* Revert "refactoring FirebaseCredentialsProvider to fix the issue w.r.t. auth global dispatch queue"
This reverts commit 87175a4146267d403a774f138b85f8d3b532fa4b.
* Use a shared_ptr/weak_ptr handoff on FirebaseCredentialsProvider
This avoids any problems with callsbacks retaining pointers to objects
destroyed by a C++ destructor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix nanopb (in cmake build)
Look for binaries in the src dir (since that's where we build now.) This
error would be masked if a previous build had completed prior to
switching nanopb to build out of src.
Also, don't patch the protoc path multiple times. This could be
triggered by (eg) 'make && make clean && make'.
* Add resource_path.{h,cc} to the cmake build
* Fix signed/unsigned int comparison warnings
* Ensure FieldValue tag_ is initialized during cp/mv ctor.
Otherwise, the assignment operator attempts to deallocate based on the
(uninitialized) tag_ variable, posssibly leading to segfaults.
* Fix tests that throw exceptions.
The (previous) tests checked to ensure that an abort() occurs, but if
ABSL_HAVE_EXCEPTIONS is defined on non-macos (which is currently the
default) then the assertions will throw a std::logic_error rather than
abort()ing.
On macos, an exception is thrown too, but the exception doesn't derrive
from std::exception, so ASSERT_DEATH_* doesn't catch it (hence why
ASSERT_DEATH_* actually works.)
To resolve this, I've switched to ASSERT_ANY_THROW.
|
|
|
| |
Similar to Objective-C, FieldPath and ResourcePath share most of their interface (and implementation) by deriving from BasePath (using CRTP, so that factory methods in BasePath can return an instance of the derived class).
|
|\
| |
| | |
Integrate nanopb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
iOS code (#738)
* implement Firestore DatabaseInfo in C++
* temporary stash changes; blocking on the massive renaming of .m to .mm
* add database_info_test to project
* finish port DatabaseId and fix style, modular fixing DatabaseInfo
* port DatabaseInfo
* remove FSTDatabase{ID,Info} and their tests from project
* fix unit test
* use namespace alias
* use namespace alias, leftover
* address more changes
* refactoring to use raw pointer instead of value for property
* address changes
* remove self->
* fix style
* remove the name suffix Alloc
* fix a bug
|
| | |
|
|/
|
|
|
| |
Use remote/serializer placeholder class as a hook for the test to ensure
nanopb headers can be found, and test can be linked.
|
|
|
|
|
| |
This is dead code.
I think it was probably useful in the RTDB because of the way it notified of changes, but we give changes with indexes in Firestore so I think we don't need it.
|
|
|
|
|
|
| |
* Implement ArraySortedMap.remove
* Implement ArraySortedMap.insert
* Ensure ArraySortedMap.insert avoids copying on duplicates
* Port more ArraySortedMapTests
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement DataBaseId in C++
* add database_id_test to project
* fix project
* address changes
* fix style
|
|
|
| |
Required to link the test on rodete.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Import iterator_adapters from google3
* Remove -Wconversion which is annoyingly hard to satisfy
* Strip dependency on absl_container from iterator_adapters_test
* Format and lint iterator_adaptors
* More flexible copyright checking in Travis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move -fvisibility-inlines-hidden from common_flags to cxx_flags
This option isn't supported by C (and causes the build to fail under
at least rodete).
Manifested error was:
```
-- Looking for include file openssl/rand.h
-- Looking for include file openssl/rand.h - not found
CMake Error at core/src/firebase/firestore/util/CMakeLists.txt:94 (message):
No implementation for SecureRandom available.
-- Configuring incomplete, errors occurred!
```
which is completely misleading. :(
* Fix exception include for std::logic_error
Was causing compiler error on (at least) rodete.
(http://en.cppreference.com/w/cpp/error/logic_error suggests that
stdexcept is the correct header.)
* Remove 'const' from vector contents.
vectors cannot contain const objects as the contained objects are
required to be assignable and copy constructable. (Not *quite* strictly
true; since c++11, this requirement now depends on the operations
performed on the container. But my compiler objects at any rate.)
http://en.cppreference.com/w/cpp/container/vector
https://stackoverflow.com/questions/8685257/why-cant-you-put-a-const-object-into-a-stl-container
* Add brackets as suggested (required) by my compiler.
* Add missing include
For LLONG_MIN, etc.
* Enable gnu extension to c++11 for firestore/util *test*.
We disable them by default (in cmake/CompilerSetup.cmake) but our tests
requires hexidecimal floating point, which is not supported in c++11
(though is supported in C++17, gnu++11, and others).
http://en.cppreference.com/w/cpp/language/floating_literal
https://bugzilla.redhat.com/show_bug.cgi?id=1321986
* Fix printf format for uint64_t
http://en.cppreference.com/w/cpp/types/integer
https://stackoverflow.com/questions/9225567/how-to-print-a-int64-t-type-in-c
* Allow 0 length printf template strings in tests.
* Get rid of a multi line comment.
The backslash is apparently interpreted by the compiler cause the next
line to be ignored too. In this case, the next line is (currently) a
comment, and would be ignored anyways. (But that doesn't stop the
compiler from yelling.)
* Run ./scripts/style.sh
|
|
|
|
| |
* normalize bits
* normalize ordered_code
|
|
|
|
|
|
| |
* implement `TargetIdGenerator`
* address changes
|