From 892288d5236e20ac31b68b7d4f508cb59b3e77a2 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Fri, 15 Jun 2018 15:06:39 -0700 Subject: Add an explicit dependency on nanopb --- FirebaseFirestore.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index 8e32a53..f97cfe7 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -51,6 +51,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, s.dependency 'gRPC-ProtoRPC', '~> 1.0' s.dependency 'leveldb-library', '~> 1.18' s.dependency 'Protobuf', '~> 3.1' + s.dependency 'nanopb', '~> 0.3.8' s.frameworks = 'MobileCoreServices' s.library = 'c++' -- cgit v1.2.3 From 0b77f5a68fb983ff9a3f6232c6025282ed8a89e8 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Fri, 15 Jun 2018 15:07:08 -0700 Subject: Move -D flags into GCC_PREPROCESSOR_DEFINITIONS --- FirebaseFirestore.podspec | 14 +++++++------- Firestore/Example/ProtobufCpp.podspec | 7 ++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index f97cfe7..892b136 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -56,18 +56,18 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, s.frameworks = 'MobileCoreServices' s.library = 'c++' s.pod_target_xcconfig = { - 'GCC_PREPROCESSOR_DEFINITIONS' => 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' + - 'FIRFirestore_VERSION=' + s.version.to_s + ' PB_FIELD_16BIT', + 'GCC_PREPROCESSOR_DEFINITIONS' => + "FIRFirestore_VERSION=#{s.version} " + + 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' + + # The nanopb pod sets these defs, so we must too. (We *do* require 16bit + # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT + # anyways.) + 'PB_FIELD_16BIT=1 PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1', 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}" ' + '"${PODS_TARGET_SRCROOT}/Firestore/third_party/abseil-cpp" ' + '"${PODS_ROOT}/nanopb" ' + '"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"', - - # The nanopb pod (which is pulled in indirectly) sets these defs, so we - # must too. (We *do* require 16bit (or larger) fields, so we'd have to set - # at least PB_FIELD_16BIT anyways.) - 'OTHER_CFLAGS' => '-DPB_FIELD_32BIT -DPB_NO_PACKED_STRUCTS=1' } s.prepare_command = <<-CMD diff --git a/Firestore/Example/ProtobufCpp.podspec b/Firestore/Example/ProtobufCpp.podspec index 8090b1e..eb90ca6 100644 --- a/Firestore/Example/ProtobufCpp.podspec +++ b/Firestore/Example/ProtobufCpp.podspec @@ -51,7 +51,10 @@ Pod::Spec.new do |s| # Set a CPP symbol so the code knows to use framework imports. s.pod_target_xcconfig = { - 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', + 'GCC_PREPROCESSOR_DEFINITIONS' => + '$(inherited) ' + + 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' + + 'HAVE_PTHREAD=1', 'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/ProtobufCpp/src"', # Cocoapods flattens header imports, leading to much anguish. The @@ -59,8 +62,6 @@ Pod::Spec.new do |s| # - https://github.com/CocoaPods/CocoaPods/issues/1437 'USE_HEADERMAP' => 'NO', 'ALWAYS_SEARCH_USER_PATHS' => 'NO', - - 'OTHER_CFLAGS' => '-DHAVE_PTHREAD' } s.requires_arc = false -- cgit v1.2.3 From 914542d7bf8cc199f33f0f81e105c1af04c3ddd7 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Fri, 15 Jun 2018 15:07:24 -0700 Subject: Remove exclusions for serializer_test.cc --- scripts/check_test_inclusion.py | 2 -- scripts/sync_project.rb | 3 --- 2 files changed, 5 deletions(-) diff --git a/scripts/check_test_inclusion.py b/scripts/check_test_inclusion.py index 7f5f354..7f6e43c 100755 --- a/scripts/check_test_inclusion.py +++ b/scripts/check_test_inclusion.py @@ -26,8 +26,6 @@ import sys # Tests that are known not to compile in Xcode and can't be added there. EXCLUDED = frozenset([ - # b/79496027 - "Firestore/core/test/firebase/firestore/remote/serializer_test.cc", ]) diff --git a/scripts/sync_project.rb b/scripts/sync_project.rb index f353f31..ba9f98b 100755 --- a/scripts/sync_project.rb +++ b/scripts/sync_project.rb @@ -50,9 +50,6 @@ def sync_firestore() 'CMakeLists.txt', 'InfoPlist.strings', '*.plist', - - # b/79496027 - 'Firestore/core/test/firebase/firestore/remote/serializer_test.cc', ] # Folder groups in the Xcode project that contain tests. -- cgit v1.2.3 From cd9125065d87ebee891444ef29b4a74de37b5b48 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Fri, 15 Jun 2018 15:21:11 -0700 Subject: pod update output from cocoapods 1.5.3 --- .../Example/Firestore.xcodeproj/project.pbxproj | 96 ---------------------- 1 file changed, 96 deletions(-) diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index a6fb85d..f05d26b 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -1177,7 +1177,6 @@ 54C9EDEE2040E16300A969CD /* Frameworks */, 54C9EDEF2040E16300A969CD /* Resources */, EA424838F4A5DD7B337F57AB /* [CP] Embed Pods Frameworks */, - 4610379B4CEF81E5E5525792 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1198,7 +1197,6 @@ 6003F587195388D20070C39A /* Frameworks */, 6003F588195388D20070C39A /* Resources */, 1EE692C7509A98D7EB03CA51 /* [CP] Embed Pods Frameworks */, - 761F9C177D75EA79C6C89187 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1218,7 +1216,6 @@ 6003F5AB195388D20070C39A /* Frameworks */, 6003F5AC195388D20070C39A /* Resources */, 329C25E418360CEF62F6CB2B /* [CP] Embed Pods Frameworks */, - A25540FE24FB06DA9D9FA8CA /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1239,7 +1236,6 @@ 6EDD3B4520BF247500C33877 /* Frameworks */, 6EDD3B4A20BF247500C33877 /* Resources */, 6EDD3B5720BF247500C33877 /* [CP] Embed Pods Frameworks */, - E3B8CDD068DA992B3A113704 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1260,7 +1256,6 @@ DE03B2D31F2149D600A30B9C /* Frameworks */, DE03B2D81F2149D600A30B9C /* Resources */, B7923D95031DB0DA112AAE9B /* [CP] Embed Pods Frameworks */, - E7A967D34B382BF27EF0E619 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1281,7 +1276,6 @@ DE0761E11F2FE611003233AF /* Frameworks */, DE0761E21F2FE611003233AF /* Resources */, 04404E0DCBB886A40E3C7175 /* [CP] Embed Pods Frameworks */, - A73495183E594AE55AFE86B6 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -1513,21 +1507,6 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Tests_iOS/Pods-Firestore_Tests_iOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 4610379B4CEF81E5E5525792 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 5504F81EEBBEF943CA61D32C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1582,21 +1561,6 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 761F9C177D75EA79C6C89187 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 83F2AB95D08093BB076EE521 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1633,36 +1597,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - A25540FE24FB06DA9D9FA8CA /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Tests_iOS/Pods-Firestore_Tests_iOS-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - A73495183E594AE55AFE86B6 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_Example_iOS-SwiftBuildTest/Pods-Firestore_Example_iOS-SwiftBuildTest-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; A827A009A65B69DC1B80EAD4 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1717,36 +1651,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - E3B8CDD068DA992B3A113704 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - E7A967D34B382BF27EF0E619 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_IntegrationTests_iOS/Pods-Firestore_IntegrationTests_iOS-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; EA424838F4A5DD7B337F57AB /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; -- cgit v1.2.3 From 2b4a9acfc4cdb3aa4c20be178dfa2ac87b72a63c Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Fri, 15 Jun 2018 16:07:18 -0700 Subject: Disable warnings in the protobuf-C++ code --- Firestore/Example/ProtobufCpp.podspec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Firestore/Example/ProtobufCpp.podspec b/Firestore/Example/ProtobufCpp.podspec index eb90ca6..c809c06 100644 --- a/Firestore/Example/ProtobufCpp.podspec +++ b/Firestore/Example/ProtobufCpp.podspec @@ -64,6 +64,11 @@ Pod::Spec.new do |s| 'ALWAYS_SEARCH_USER_PATHS' => 'NO', } + # Disable warnings that upstream does not concern itself with + s.compiler_flags = '$(inherited) ' + + '-Wno-comma ' + + '-Wno-shorten-64-to-32' + s.requires_arc = false s.library = 'c++' end -- cgit v1.2.3 From 5e7566920f83c5003fc6a284a9f42ded8879a6a1 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Fri, 15 Jun 2018 16:07:41 -0700 Subject: Fix retain self warnings that crept in --- Firestore/Source/Remote/FSTDatastore.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firestore/Source/Remote/FSTDatastore.mm b/Firestore/Source/Remote/FSTDatastore.mm index fdbeea3..33d29e9 100644 --- a/Firestore/Source/Remote/FSTDatastore.mm +++ b/Firestore/Source/Remote/FSTDatastore.mm @@ -240,7 +240,7 @@ typedef GRPCProtoCall * (^RPCFactory)(void); error = [FSTDatastore firestoreErrorForError:error]; [self.workerDispatchQueue dispatchAsync:^{ if (error != nil && error.code == FIRFirestoreErrorCodeUnauthenticated) { - _credentials->InvalidateToken(); + self->_credentials->InvalidateToken(); } LOG_DEBUG("RPC CommitRequest completed. Error: %s", error); [FSTDatastore logHeadersForRPC:rpc RPCName:@"CommitRequest"]; @@ -277,7 +277,7 @@ typedef GRPCProtoCall * (^RPCFactory)(void); if (error) { LOG_DEBUG("RPC BatchGetDocuments completed. Error: %s", error); if (error.code == FIRFirestoreErrorCodeUnauthenticated) { - _credentials->InvalidateToken(); + self->_credentials->InvalidateToken(); } [FSTDatastore logHeadersForRPC:rpc RPCName:@"BatchGetDocuments"]; completion(nil, error); -- cgit v1.2.3 From 9e5c36b022b999b36f9a97d7eb44359f7fb2ac59 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Fri, 15 Jun 2018 16:08:56 -0700 Subject: Remove PB_FIELD_16BIT --- FirebaseFirestore.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index 892b136..9158be7 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -62,7 +62,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, # The nanopb pod sets these defs, so we must too. (We *do* require 16bit # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT # anyways.) - 'PB_FIELD_16BIT=1 PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1', + 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1', 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}" ' + '"${PODS_TARGET_SRCROOT}/Firestore/third_party/abseil-cpp" ' + -- cgit v1.2.3