Commit Graph
198 Commits
Author SHA1 Message Date
Paul Beusterien 3b0ed0ee4a Open Source ABTesting (#3507)
* CI for ABTesting
* README update
2019-08-05 19:30:54 -07:00
Sebastian Schmidt 9bfbb9ece0 Enable clang-format for RTDB (#3506) 2019-08-05 13:27:47 -07:00
Maksym Malyhin 77b7c6e1b6 pod_lib_lint.rb improvements (#3418)
* Make sure `pod_lib_lint.rb` fails when lint fails.

* `pod_lib_lint.rb` comment  social_media_url in the podspec.

* Typo

* pod_lib_lint.rb: exit with pod lint status.

* Code style.

* Travis: fix FirebaseInstallations lint parameters.

* Avoid dirtying the workspace when linting. (#3421)

* Proper type for `pod_lint_status`
2019-07-24 11:09:48 -04:00
Maksym Malyhin 0d76f5283f pod_lib_lint.rb - argument to ignore specified local podspecs (#3410)
* Travis: FirebaseInstallations - don't use local IID for tests

* Fix pod_lib_lint.rb.

* Typo fixed.

* Simplify --ignore-local-podspecs argument parsing.

* Use `pod_args` to get `podspec_file`

* Punctuation
2019-07-23 12:15:21 -04:00
Gil c7520060fc Add a release notes generator (#3395) 2019-07-19 13:25:49 -07:00
Gil 54da70f0b2 Upgrade to Firestore Emulator 1.6.2 (#3377)
This just brings us up-to-date without any functional changes as far as
the SDK is concerned.
2019-07-18 20:31:26 -07:00
Michael Haney 783ee5b126 Implement Firebase CoreDiagnostics (#3129)
* Implement CoreDiagnostics interop

For use by FirebaseCore.

Please pay special attention to the changes in FIRApp, I've replaced passing FIRApp in the notification with a data object that will eventually replace the same information that FIRDiagnostics extracted.

* Add CoreDiagnosticsInterop to the Example Podfile

* Style and xcodeproj updates

* Update Podfiles that dep on FirebaseCore

So that they also have a dep on FirebaseCoreDiagnosticsInterop

* ran pod deintegrate to remove unintended xcodeproj changes

* Fix Podfile paths

* Add FCD to if_changed and travis.yml

* Fix building with Firestore

* Style

* Whitespace

* Fix a changed internal API

* Make pod paths consistent

* Restore connectivity_monitor_noop.cc style

* Remove logging prior to [FIRApp configure]

Also remove sendLogsWithServiceName:version:

* style

* Remove nil checks from diagnostics data

* Put back some deleted symbols

* Restore the sendLogsWithServiceName:version: method, but as a no-op

* Restore the original version of sendLogs...

* Allow an unused parameter

* Remove obsolete nsnotificationcenter related stuff

* Whoops, missed the header change.

* Final changes to support FIRCoreDiagnostics

These changes are necessary because FIRCore has a hard dep on FIRCoreDiagnostics (FIRCD) and FIRCoreDiagnosticsInterop.

Components can't be used because FIRCD would need to have a hard dep on FIRCore to get access to FIRLibrary, FIRComponent, FIRComponentContainer, and FIRComponentCreationBlock and this would create a dep cycle. So, an extern has been put into the interop lib and the variable is implemented in the connector class inside of FIRCore, but it's unset. FIRCD actually sets that variable in +load, allowing use of FIRCD.

FIRCD can also be removed as a dependency with no ill effect by end users setting the environment variable DISABLE_FIREBASE_DIAGNOSTICS=1

* Add nanopb and project generation infrastructure

* Convert FIRCoreDiagnostics to canonical nanopb, and move to OSS.

* Remove custom build steps for CoreDiagnostics

* Addressing review comments

* Update versions, tags, and port the relevant unit tests for FIRCD

* Version and platform fixes

* Fix podspec expected tags

* A hack to solve a chicken-and-egg problem with pod lib linting.

* Heartbeat implementation

* FIRDiagnosticsDateFileStorageTests

* Fix tests for non-iOS platforms

* Heartbeat tests

* Fix initialization.

* Cleanup Installation ID.

* Fix testProtoPopulation.

* Merge conflict fix

* Typo fix.

* Remove FIRCore dep from FIRCD unit tests and move symbols to interop

* Run ./scripts/style.sh

* Typo

* #ifdef comment

* File license header.

* Import FIRDiagnosticsDateFileStorage.h using relative path.

* FIRDiagnostics -> FIRCoreDiagnostics

* Docs syntax

* Docs

* Docs typo

* Add shared variables to the interop lib

I know this goes against the convention, but it's actually the only way to resolve this very unique problem.

* Fix comment

* Style

* Removed lib version passing.

* Remove env checking for conditional deps

* Style

* Address whitespace issues

* Add copyright notice

* Add new deps to Podfiles

* Fix trailing space

* Some changes to fix working in an extension.

* Fix type in Podfile

* GDT: begin/end background task only for iOS and TVOS applications.

* Fix typo

* Style

* Stop sharing kFIRService strings across pods

* Travis test

* Change all TARGET_OS_TVOS macros to TARGET_OS_TV

TARGET_OS_TVOS doesn't exist.

Also macro out a UIApplication reference.

* style

* Update all Podfiles with deps on FIRCore

* Fix trailing whitespace

* Update Firestore cmake

* Fix FIAM build break (#3254)

* Additional cmake changes

* Fix linker issue with deprecated CoreDiagnostics (#3257)

* Adding more deps to cmake

* Fix linker error (#3266)

* Rerun only IAM tests

* whitespace

* No xcpretty or frameworks run

* Fix typo

* Revert "No xcpretty or frameworks run"

This reverts commit afc1abba37.

* Revert "whitespace"

This reverts commit fd06955a56.

* Revert "Rerun only IAM tests"

This reverts commit 98ce07600f.

* Run travis on this branch

* Add support for expanding PODS_TARGET_SRCROOT in CMake (#3267)

* Fix a few things that should have been splatted but weren't

* Define PODS_TARGET_SRCROOT in CMake for compatibility with CocoaPods

* Compile pods we depend upon with looser settings

* Rename the nanopb dependency to match what CMake actually has

* Make #include <nanopb/pb.h> work

Remove the old way of #include <pb.h> once we change the Firestore
nanopb generator to match.

* Fix warnings that fail the build

* Remove typed enum and fix a comment.

* Fix an import

* Change a line so it's not altered by Copybara

* More changes to stop copybara from altering the wrong sources

* Remove trailing whitespace

* Fix copybara modifying python.

* Add additional field in firebasecore.proto (#3273)

* Remove the dependency on interop to populate a shared variable.

* style

* Create travis jobs for FirebaseCoreDiagnostics (#3245)

* Create travis jobs for FirebaseCoreDiagnostics

And update the pod lib lints for GDT.

Remove the mph-master branch before merging to master.

* Add support for FIRCD to if_changed.sh

* Adjust tests

* Unavailable init methods should not be nullable (#3276)

* Allow firestore api to work with Codable objects + ExplicitNull + Integration tests (#3261)

* Convinience api for codables

* Integration Tests

* ExplicitNull implementation

* Update to CocoaPods 1.7.3 (#3280)

* Import GULLoggerLevel.h via public framework header (#3277)

* Put the need to include Firestore/Source/Public in the podspec (#3288)

This removes the need to munge the pods project after the fact and makes
it so that customers can click through to our headers too.

* Ensure Storage initializer doesn't get called (#3294)

* FIROptions.appGroupID introduced (#3293)

* Use a consistent set of dependencies on all platforms (#3289)

* Use a consistent set of dependencies on all platforms

* pod install for uniform dependencies

* Store the coerced base value in the BaseMutation (#3292)

* In card message: set the text color on the body text view (#3286)

* In card message: set the text color on the body text view

* Fix bug where card messages in test app were showing up with two of the same buttons

* Revert change to text color

* [docs] add missing semicolon (#3305)

Add missing semicolon to code example

* Add explicit Foundation import. (#3309)

This is causing issues when building an XCFramework.

* Pass the correct compiler flag for CoreDiagnostics. (#3312)

* Pass the correct compiler flag for CoreDiagnostics.

When CoreDiagnostics is open sourced, we'll need to ensure that the
right compiler flag is passed. This doesn't add support for Carthage yet
but allows the frameworkbuilder to pass the flag for carthage as well.
An update to the zipbuilder to allow for carthage will follow shortly.

* Remove accidental change.

* Fix and rewrite sync_project.rb (#3296)

* Fix and rewrite sync_project.rb

Ever since we added multiple platforms, removing a file has been broken.
This fixes that issue.

Also, rewrite target synchronization to make more sense. Essentially now
there's one diff between the filesystem and the groups and then an
explicit diff is done between project files and target contents.

* Run sync_project.rb on post-install

* pod lib linting should output something every minute while running

* DEBUG: This commit should be reverted

* DEBUG: This commit should be reverted

* DEBUG: This commit should be reverted

* Remove mph-master from travis

* Fix constant name conflic between old and new diagnostics (#3329)

* Rename kFIRDiagnosticsHeartbeatDateFileName -> kFIRCoreDiagnosticsHeartbeatDateFileName to avoid conflicts with FIRDiagnostics.

* Travis: temporary add `mph-master` to run tests.

* Rempve mph-master again

* Fix imports in FIRCDConnector

* Fix another import

* Fix yet another import

* Attempt to read crashing test logs from disk

* Implement printing of failed/crashed test logs.

* Print only crashed tests, rmdir between runs

* Revert reading crashing log changes

* Write CHANGELOG for all new FIRCD associated libraries

* Change all GUL deps to >= 6.2

* Revert ZipBuilder changes and do some last bits of cleanup

* Remove an assertion and populate an error instead
2019-07-18 09:54:06 -07:00
Maksym Malyhin 8e73ddb222 Firebase Installations as standalone SDK (#3376) 2019-07-17 20:07:35 -04:00
Paul Beusterien e4a0d62cd5 Handle coverage flakiness more locally (#3350) 2019-07-12 16:26:54 -07:00
Gil 37affc1eb4 Have Firestore integration tests run all tests (#3342)
* Rename FIRQueryTests to FIRQueryUnitTests

* Make IntegrationTests targets run everything

The incremental cost of running all tests is an extra two seconds of run
time, but not starting the simulator three times during a build cuts
build times by ~25%.

* sync_project.rb generated changes

* sync_project.rb generated changes

* Remove AllTests_iOS aggregate target

* Add unit test deps to Firestore_IntegrationTests_*

* Fix BasicCompileTests on macOS and tvOS

* Run Firestore IntegrationTests only on Travis

This cuts build time for the job by about 25%, primarily due to not
having to start/deploy to the simulator repeatedly.
2019-07-12 15:57:03 -07:00
Gil 6ea0fbd950 Manage resources with sync_project.rb (#3340)
* Sync resources

Apply ignored files to target contents too.

* Clean up macOS host app

resources/roots.pem does not exist
2019-07-12 10:17:33 -07:00
Gil 79627a22cc Add Swift integration tests to macOS and tvOS builds (#3336)
* Add deployment_targets for macOS and tvOS in FirebaseFirestoreSwift

* Add FirebaseFirestoreSwift as a dependency to all integration tests

* Add swift integration tests to sync_project.rb
2019-07-11 18:25:52 -07:00
Gil 3d0c97ecf5 Manage configuration for benchmarks and fuzz tests and fix them (#3335)
* Fix leveldb benchmarks

... which apparently haven't been built in a while

* Manage configuration for Benchmarks and FuzzTests

* Suppress warnings in LibFuzzer

* Add a Firestore_Benchmarks_iOS scheme

* xcodeproj: Remove manual configuration for Fuzzer and Benchmarks

* Update LibFuzzer build for recent clangs

Builds are currently failing with this on standard out:

    -fsanitize-coverage=trace-pc-guard is no longer supported by
    libFuzzer.  Please either migrate to a compiler that supports
    -fsanitize=fuzzer or use an older version of libFuzzer
2019-07-11 15:58:30 -07:00
Gil 6439e65e61 Upgrade to Firestore Emulator 1.6.1 (#3334)
This just brings us up-to-date without any functional changes as far as
the SDK is concerned.
2019-07-11 10:06:19 -07:00
Gil 072047ccfc Manage search paths with sync_project.rb (#3326)
* xcodeproj: Remove needless FRAMEWORK_SEARCH_PATHS

* xcodeproj: Remove manually specified language standards

* Manage swift versions and bridging headers

* xcodeproj: Remove manually specified swift settings

* Manage header search paths

* xcodeproj: Remove manually specified search paths

* Manage language standards based on the podspec
2019-07-11 08:08:01 -07:00
Gil 6de3382e89 Add an -all_load linker flag to all example apps (#3315)
* Add an -all_load linker flag to all example apps

This fixes macOS and tvOS builds such that they no longer need to
explicitly link against the built FirebaseFirestore framework, which is
good because this wasn't working right: changes to the framework would
take two builds to get tests to actually see them.

The mechanism here is to amend the .xcconfig files that CocoaPods plugs
into the project, just after it generates them. This avoids the need to
actually modify the project.xcodeproj file, which reduces the potential
for conflicts.

Going forward all manual modifications to the project's configuration
will be handled this way to avoid needing special project configuration.

This also moves us incrementally closer to be being able to use test
specs and cocoapods-generate. There's too much custom configuration yet
(and several other blockers) but figuring out what's required to build
will make it such that we can eventually transition.

* xcodeproj: Remove -all_load and -framework flags

-all_load is now being supplied by sync_project.rb.

Remove manually specified -framework flags from the project file. The
-framework flags are actually coming from CocoaPods, but we copied the
others when manually linking against FirebaseFirestore. Now that that's
no longer required these can go away.

* Add a test-only mode to sync_project.rb

* Re-add CodableIntegrationTests.swift

A previous commit merged this incorrectly.
2019-07-09 14:48:04 -05:00
Chuan Ren 69fad8d60a Migrate auth api tests to a dedicated firebase project (#3318) 2019-07-09 09:36:22 -07:00
Gil c7f11450d0 Fix and rewrite sync_project.rb (#3296)
* Fix and rewrite sync_project.rb

Ever since we added multiple platforms, removing a file has been broken.
This fixes that issue.

Also, rewrite target synchronization to make more sense. Essentially now
there's one diff between the filesystem and the groups and then an
explicit diff is done between project files and target contents.

* Run sync_project.rb on post-install
2019-07-08 12:30:13 -05:00
Hui-Wu 13671fda27 Allow firestore api to work with Codable objects + ExplicitNull + Integration tests (#3261)
* Convinience api for codables

* Integration Tests

* ExplicitNull implementation
2019-06-28 15:07:52 -04:00
Paul Beusterien 943b31ba63 pod repo update is incompatible with travis_wait (#3272) 2019-06-27 12:13:26 -07:00
Paul Beusterien 4e9fdab905 Reenable CocoaPods CDN (#3271) 2019-06-27 10:08:24 -07:00
Corrob 8ab90e5145 Update the coverage collection to point to the prod database (#3240)
* Update the coverage collection to point to the prod database

* Fix formatting

* Misc fixes

* Update message
2019-06-24 17:38:42 -07:00
Hui-Wu 1de21a845f Firestore swift Codable support (#3198)
FirestoreEncoder/Decoder and Timestamp/GeoPoint codable support.
2019-06-19 10:00:17 -04:00
Gil 7d09fa869b Require flake8 to actually be on the path. (#3201) 2019-06-17 10:55:03 -07:00
Gil af3a655d27 Actually change to NotImplementedError (#3190) 2019-06-14 12:23:34 -07: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
Gil 12b7397e4b Upgrade to Firestore Emulator 1.5.0 (#3171)
This includes fixes for:

  * All the field escaping tests
  * testCanWriteVeryLargeBatches
  * testWritesWithIndirectlyNestedArraysSucceed

All tests now pass. I've left isRunningAgainstEmulator in the source
even though there are now no callers.
2019-06-11 13:34:49 -07:00
Morgan Chen 93307d253e Disable CocoaPods CDN in pod installs (#3165) (#3166) 2019-06-10 17:58:32 -07:00
Corrob 5538146501 Clean the derived data between builds to help reduce flakiness (#3150)
Trying to fix #3146
2019-06-06 10:13:00 -07:00
Paul Beusterien daab8e3d11 Add FirebaseAuth test_spec (#3123) 2019-06-05 20:33:21 -07:00
Paul Beusterien f39ac87548 Exclude pod gen output from style.sh (#3143) 2019-06-04 17:23:36 -07:00
Chuan Ren 23a35b1719 Disable Auth api tests (#3128) 2019-06-03 13:35:09 -07:00
Paul Beusterien 52e42c0fe7 Use CocoaPods CDN (#3124) 2019-06-03 10:09:26 -07:00
Paul Beusterien d2fd372aa9 DynamicLinks test_spec (#3115) 2019-05-31 15:43:49 -07:00
Paul Beusterien ae2de46f2e Add script to generate a module map from a podspec (#3118) 2019-05-31 10:00:18 -07:00
Paul Beusterien 06d36108d8 Add test_spec for FCM (#3088)
* Add test_spec for FCM
* FIRMessagingRemoteNotificationsProxyTest - don't use OCMPartialMock([UIApplication sharedApplication]) to avoid crashing tests on iOS 8 (#3094)
2019-05-28 11:36:31 -07:00
Paul Beusterien 56807f383e GoogleUtilities to testspec and pod gen (#2908) 2019-05-28 11:35:51 -07:00
Paul Beusterien fff9d6dd68 Restore style checking on travis (#3080) 2019-05-26 13:50:28 -07:00
Gil 8b8ca76133 Rewrite pod_lib_lint as a ruby script (#3075)
* Find pod lib lint dependencies locally

* Trigger travis for pod_lib_lint

* Fix no local deps case

* Add a script to print the local dependencies of a given podspec file. (#3072)

* Make pod_local_deps.rb into pod_lib_lint.rb

* Remove old pod_lib_lint.sh

* Update usages of pod_lib_lint.sh to pod_lib_lint.rb

* Add tracing to pod_lib_lint.rb

* Only keep basenames in the seen set

* Mark the current podspec seen

* Handle the no deps case correctly
2019-05-24 10:59:30 -07:00
Gil 346f4ed10f Remove --warn-uninitialized from CMake builds (#3064)
This overflows the logs in travis and makes it impossible to tell if
anything is actually going wrong.
2019-05-23 13:32:04 -07:00
Paul Beusterien fcba5a2c61 Fix Auth post-submit CI build break (#3061) 2019-05-23 11:00:08 -07:00
Paul Beusterien 67e5683e81 Restore necessary pod repo update's (#3050) 2019-05-21 22:24:44 -07:00
Paul Beusterien bf62c8c9df Add InstanceID test_spec (#3036) 2019-05-21 11:22:43 -07:00
Paul Beusterien 5ab3c91d80 Add test_specs and fix test build warnings for Database (#3034) 2019-05-21 08:29:15 -07:00
Paul Beusterien 862e1332d8 Add test_spec for FirebaseStorage (#3023) 2019-05-21 06:56:48 -07:00
Gil 9f728b8458 Remove checks for boolean migration (#3039)
There are too many false positives to mark with NOLINT:

  * BOOL is type in Win32
  * BOOL is used as an identifier in the nanopb API
  * YES and NO should be used when calling Objective-C APIs
  * YES and NO are in the instructions for using NSDefaults
2019-05-20 21:44:48 -07:00
Gil c866936c7d Upgrade the emulator we use for integration testing to 1.4.6 (#3038)
* Bump to cloud-firestore-emulator 1.4.6
* Re-enable transform-related integration tests against the emulator
* Re-enable collection-group query integration tests
* Re-enable most transaction-related tests
2019-05-20 21:42:58 -07:00
Michael Haney 2009a08b0f Support macOS and tvOS in GDT and GDTCCT (#3027)
* Support macOS and tvOS in GDT and GDTCCT

* Fix travis for multiple platforms

* Give constant-value initializers for the background identifier

* Make travis platform-agonistic for GDT

* Consolidate #ifdef because they're the same code
2019-05-20 17:12:13 -07:00
Paul Beusterien b8ecdf2c8c Fix check script for 1st travis run on non-master branch (#3020)
* master -> origin/master
2019-05-17 07:54:25 -07:00
Michael Haney 3210d53aae Attempt to move GDT's integration test to the allowed_failures section (#3000)
* Attempt to move GDT's integration test to the allowed_failures section

* Fix syntax error

* Make sure the GDT integration test is run

* Rewrite allow_failures rule
2019-05-14 15:14:59 -07:00