Commit Graph
123 Commits
Author SHA1 Message Date
Gil 315effec4a Port FSTQueryListener to C++ (#2618) 2019-03-26 07:11:02 -07:00
Gil 080c64daba Rework the IWYU test to handle types with multiple valid sources (#2633) 2019-03-25 16:38:28 -07:00
Gil 675e74a535 Add missing #include <ostream> (#2616)
* Add a lint check for ostream

* Actaully #include <ostream> to undefined stream insertion operators at link time
2019-03-25 11:12:21 -07:00
Gil 38496c450c Add DelayedConstructor<T> (#2579)
* Add util::DelayedConstructor

* Run sync_project on any Firestore change since start

* Use DelayedConstructor in a few places to show how it works
2019-03-20 10:29:02 -07:00
Gil 1e6305f494 Travis: when linting Firestore, only lint iOS (#2569)
* Enable strict mode in pod_lib_lint.sh

Use bash arrays to make quoting work correctly.

* Only check pod lib lint for iOS on each PR

This cuts build time for Firestore in half and should help cut bring
down total build times.

Note that cronned pod lib lint still checks all platforms.
2019-03-15 17:17:22 -07:00
Gil 9c3cb40525 Add a run-all-checks script (#2533)
This makes it easier to check everything before submission to travis,
cutting the cycle time on format/lint failures down considerably.
2019-03-15 11:03:29 -07:00
Paul Beusterien ee10c4edb0 Use test specs for Functions unit tests (#1864) 2019-03-07 16:38:31 -08:00
Ryan Wilson b57fc82752 Disable index-while-compiling in Travis (#2452)
We don't need to use Xcode's index-while-compiling during builds. Folks have
seen ~8% speedup with builds here.

Seen at https://twitter.com/steipete/status/1100404024224804871
2019-02-27 10:47:06 -05:00
Chuan Ren 9cddf51b40 Added encrypted credential files and enable integration tests (#2412) 2019-02-25 11:07:00 -08:00
Paul Beusterien f76ae211e9 Fix GoogleUtilities regression for Firestore builds 2 (#2433)
* Run Firestore builds/tests on GoogleUtilities changes
* Silence macOS 10.10 warnings
* Add cast to fix Firestore macOS builds
2019-02-22 20:07:47 -08:00
Paul Beusterien 6e4af0f2ad Fix import references to other pod's headers to fix pod lib lint (#2409)
* Fix import references to other pod's headers to fix pod lib lint

* style

* fiam travis config fixes

* Fix Sample's HEADER_SEARCH_PATHS
2019-02-20 13:31:28 -08:00
Konstantin Varlamov 19fa24cecd C++ migration: port FSTDocumentViewChange (#2388) 2019-02-19 18:30:12 -05:00
Paul Beusterien a6fcd308c2 Start pod lib lint CI for IAM (#2347) 2019-02-05 12:59:43 -08:00
Paul Beusterien 86051203ac Add IAM headless to CI (#2341)
* Fix new Xcode 10.2 warning
2019-02-04 06:57:42 -08:00
Michael Lehenbauer 11b5ddb13d Make scripts/style.sh compatible with newer swiftformat versions (0.38) (#2334)
* Log swiftformat version in non-interactive builds.
* Use a mildly-terrible regex for version check to ensure at least 0.35.0 (travis has 0.35.8).
* Include StorageViewController.swift change swiftformat 0.38 makes (but which seems to be compatible with 0.35)
2019-02-01 14:21:38 -08:00
Konstantin Varlamov 9ec14cc0db Don't build fuzz tests target on Travis (#2330)
This XCode target started failing on Travis for no clear reason. This isn't reproducible locally; remove the target to unblock development.
2019-02-01 14:14:53 -05:00
Paul Beusterien 4b9ca8c91f Stop using SpecStaging (#2308) 2019-01-23 17:18:05 -08:00
Paul Beusterien 3b3e7196fe Use travis_retry to minimize flakes (#2287) 2019-01-22 07:25:46 -08:00
Paul Beusterien 5e42dd29ad Reset simulators before each xcodebuild (#2282) 2019-01-18 06:41:14 -08:00
Paul Harter 2c03cf16f7 Example of Firestore working in macOS app (#2241)
Besides adding a new macOS example to the project, this:
* Adds a search for roots.pem in root of main bundle
* Accepts swiftformat 0.37 in `style.sh`
* Extends the travis_wait from the default 20 mins to 45 to allow for building iOS and macOS.
2019-01-17 12:37:42 -08:00
Paul Beusterien aa7016f718 Prevent prevalent Xcode 10.1 simulator flake (#2276) 2019-01-17 12:10:37 -08:00
Chen Liang ab962ce244 use instanceIDForTest for instance init in unit tests (#2239)
* use instanceIDForTest for instance init in unit tests
* looks like realInstanceID is not needed
* Get InstanceID from SpecsStaging to fix tests
2019-01-10 10:49:43 -08: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
Paul Beusterien 522f0121b1 Add a travis cron job for CocoaPod symbol collision testing (#2154) 2018-12-06 10:27:53 -08:00
Konstantin Varlamov 93ad9fc551 Make fuzzing less verbose to avoid exceeding Travis log limit (#2126)
Fuzzing triggers many assertion failures, which generates enormous log output. AFAIK, there is no way to make `NSAssertionHandler` _not_ write to log, and the assertions themselves are valid. Thus, implement a workaround: only output the last part of the logs in Travis, in order to avoid exceeding the log size limit (4 Mb).
2018-11-29 14:00:23 -05: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
Gil f250f50c53 Update abseil to master@{2018-11-06} (#2058)
* Update abseil-cpp to a new upstream

Update to 7990fd459e9339467814ddb95000c87cb1e4d945 master@{2018-11-06}

* Re-apply -Wcomma fix

* Update add_subdirectory for Abseil

* Remove references to Firestore/Port (which longer exists)

* Fix ABSL_HAVE_THREAD_LOCAL when targeting iOS 8 in Xcode 10

* Clean up abseil warnings

* Clean up a Firestore format string warning.

* Exclude third_party/abseil-cpp from whitespace checks
2018-11-09 10:27:31 -08:00
Paul Beusterien 420dfc257b Comply with c99 standard (#1992)
* Trigger travis for Firestore podspec changes
2018-10-24 11:04:00 -07:00
Paul Beusterien 3fd6ec87cf Restore pod lib lint testing to public (#1958)
* AnalyticsInterop 1.1.0 is public so restore pod lib lint testing
* better if_changed checking
2018-10-16 15:03:57 -07:00
Paul Beusterien 2c30068ef3 Fix if_changed for addition of InAppMessagingDisplay (#1954) 2018-10-16 11:57:25 -07:00
Paul Beusterien 8225588a9a Fix formatting in build.sh (#1939) 2018-10-12 09:56:28 -07:00
Paul Beusterien a36367292d Add Xcode 10 travis testing (#1932) 2018-10-11 19:28:15 -07:00
Paul Beusterien 467354a58f Do Messaging's Analytics logging via Interop (#1902) 2018-10-09 16:34:06 -07:00
Gil 86dc058729 Add a lint check for const references to absl::string_view (#1915)
* Check for const absl::string_view&, which should just be absl::string_view.

* Fix uses of const absl::string_view&
2018-10-05 13:58:43 -07:00
Konstantin Varlamov 4e067e55dd gRPC: use SCNetworkReachability to quickly end connections when reachability changes (#1843)
The reachability state is not (yet) used to determine whether it's possible to reconnect; rather, the its only use is to quickly end any existing connections. The benefit is potentially quicker reaction to network being disconnected than it would take for the connection to time out.
2018-10-01 15:27:11 -04:00
Yong Mao fac0b7f4e8 turn on travis testing for in-app messaging display (#1887) 2018-09-28 09:27:45 -07:00
rsgowman f98239755a Fix building of objc protos (#1858)
All proto targets (objc, cpp, nanopb) now depend on the proto sources,
so they'll be rebuilt if the proto sources change.

Also updated Firestore/Protos/README.md to reflect recent changes.

Also update travis config to build the protos. (Previously, cpp and
nanopb were rebuilt, since they're used in the cmake build. But objc was
not since it's not actually depended on by anything in cmake.)
2018-09-21 15:33:40 -04:00
zxu f999fffbb6 fix common typo (#1833) 2018-09-17 13:00:50 -04:00
Marek Gilbert 11c84b008c Install prerequisites for generating proto sources 2018-09-07 13:54:29 -07:00
Marek Gilbert 99ccff50dc Remove pod install and xcpretty from cmake build
These are no longer used since #1531 landed.
2018-09-07 13:49:04 -07:00
rsgowman bb045a5b90 Create process to build proto sources (#1704)
* Rename nanopb/.../*.pb.c to nanopb/.../*.nanopb.c

This ensures that all generated nanopb files use the same (sub)
extension of nanopb. This matches up with nanopb's --extension
parameter (which will be enabled later in this PR.)

* Remove references to NANOPB_PROTOC_BIN

Which wasn't being used, and wasn't pointing to a valid protoc.

* Add ability to generate protos from cmake build.

Currently, it's an entirely manual process via 'generate_protos' target.
This target is not automatically run during a build.

See Firestore/Protos/build-protos.sh for expected usage.

* cleanup/update license in build-protos.sh

* Build grpc proto sources (objc only)

* Use 32bit nanopb fields (instead of 16)

To match xcode build, but also to allow google/api/annotations.proto to
compile. (A recent change to nanopb now enforces this.) This isn't
strictly necessary, since we don't make use of that proto, so we
could've simply removed it instead (and in fact, the objc protos do
exactly that) but matching the xcode build certainly seems worthwhile.

* Rebuild all proto sources

* Skip whitespace checks on protoc generated files
2018-09-04 12:26:28 -04:00
Gil 3ada7da29f Ignore dotfiles when running sync_project.rb (#1771)
* Fix typos

* Ignore dot files (like .DS_Store)

* Also avoid .orig files
2018-09-01 15:50:27 -07:00
Gil 2813ac30da Fix analyze issues in Firestore (#1763)
* Fix analyzer errors in Firestore

* Add testutil to IntegrationTests
2018-08-29 12:09:52 -07:00
Konstantin Varlamov e70eebda1a Reduce fuzz time to 25 minutes (#1755)
Should prevent timeout on Travis.
2018-08-28 11:24:00 -04:00
Paul Beusterien ec7f79659d Travis config for Storage and DB integration tests (#1751) 2018-08-27 06:48:24 -07:00
Paul Beusterien ae30dc8381 Add current version to swiftformat upgrade message (#1724) 2018-08-21 13:18:39 -07:00
Gil de64b235de Make fuzzing run in the test stage (#1716)
Stages, even when cut off early with if_cron, still take about two
minutes to run. The fuzz_test stage was waiting for all tests to
complete before starting, which was artificially adding two minutes to
every build.

Use a different method to keep this visually distinct from the rest.
2018-08-18 12:16:03 -07:00
Mina Farid b5afc6b522 Run fuzzing as a travis cron job (#1662)
* Added fuzzing script to run all fuzzing targets on cron jobs.
* Added travis fuzzing script and `FUZZING_DURATION` to control fuzzing time.
* Given a total fuzzing duration, select 1 target to run for half of
  the duration, and divide the remaining duration over the rest of
  targets equally.
2018-08-16 18:20:08 -04:00
Michael Lehenbauer ccd3a142bc Log style.sh clang-format version. (#1680) 2018-08-15 11:00:31 -07:00