7 Commits
Author SHA1 Message Date
Paul BeusterienandMarek Gilbert 4ea4340285 Upgrade clang-format (#5265)
Co-authored-by: Marek Gilbert <mcg@google.com>
2020-04-03 11:38:31 -07:00
Gil d4e86ba091 Fixes for compatibility with builds in firebase-cpp-sdk (#4984)
* 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.
2020-02-26 17:54:13 -08:00
Gil d9c3e6a15f Fix the build on Windows (#4384)
* Fix errors about Abseil using std::copy

The C++11 version of this function can be unsafe if used improperly.
Defining this macro is also done in the Abseil build, though they don't
export the setting.

* Prevent output differences in generated certificate data

* Don't regenerate nanopb sources on Windows

There's something wrong with the interaction between protoc and the
nanopb generator that prevents this from working properly.
2019-11-22 16:44:57 -08:00
Gil 37c97d8f32 Fix completely out-of-source CMake builds (#4377)
Visual Studio 2017 runs creates its CMake output directory in a location
outside the git checkout, which causes the check for a current git
repository to fail.
2019-11-21 15:25:32 -08:00
Konstantin Varlamov 57f8d7d675 Embed root certificates into the binary on Apple platforms as well (#4352)
Currently, on iOS Firestore is loading `roots.pem` file from the gRPC bundle. The mechanism has proved to be brittle, so instead we can use the same approach as the CMake build does -- parse the file at build time and embed its contents into the binary.

One downside of this approach is that now we would have to periodically update the generated files for embedding manually. Judging from history, `roots.pem` is updated quite often in gRPC repo, and can be expected to be modified on each release.

The command to regenerate the certificates is something like:
```sh
mkdir build # From the root of the repo
cd build
cmake .. && make -j 8 generate_grpc_root_certificates
```

TESTED=with Fireeats.
2019-11-19 01:50:08 -05:00
Gil 3e3bcb41f7 Rewrite lint.sh as check_lint.py (#3161)
* Rewrite lint.sh as check_lint.py

This makes several beneficial changes:

  * Runs in parallel: lint all now takes 5.5 seconds, down from 25.
  * Supports linting specific files, passed on the command-line.
  * Defaults to linting files changed since master, pass --all to lint
    everything.
  * Infers header language based on related files.
  * Lays the groundwork for linting more than just C++.
  * Adds support for linting python.

* Fix lint errors

* Use check_lint.py in check.sh

* Remove lint.sh

* Python lint configuration

* Enable python linting in travis
2019-06-14 09:22:55 -07:00
Konstantin Varlamov 8b1efabd82 gRPC: replace Objective-C implementation with the new C++ implementation (#2068)
* Revert "Revert "gRPC: replace Objective-C implementation with the new C++ implementation (#1968)" (#2030)"

This reverts commit ea567dca47.

* gRPC: fix bugs found during testing (#2039)

All in `GrpcStream`:
* make sure there are no pending completions when "finish" operation is enqueued;
* always finish gRPC calls;
* when connectivity changes, reset not just the calls, but the underlying channel as well.

* Revert "Partially revert "Update CHANGELOG for Firestore v0.14.0 (#2025)" (#2031)"

This reverts commit b2437b80f6.

* Update changelog for v0.15.0.

* gRPC: add gRPC wrapper classes to CMake build (#2015)

* add a C++ equivalent of `FIRFirestoreVersionString`. This eliminates the only Objective-C dependency of `grpc_connection.mm` and allows making it a pure C++ file;
* open-source `binary_to_array.py` script and use it in the build to embed `roots.pem` certificate file from gRPC into the Firestore binary. The embedded char array is then used to load certificate at runtime.

* Revert local change -- do not enable sanitizers by default
2018-11-13 11:51:06 -08:00