Bladeren bron

Force source builds for wuandy branch (#15427)

Morgan Chen 5 maanden geleden
bovenliggende
commit
a655bde217

+ 2 - 2
FirebaseMessaging/Sources/FIRMessagingRmqManager.m

@@ -501,7 +501,7 @@ NSString *_Nonnull FIRMessagingStringFromSQLiteResult(int result) {
 #ifdef SQLITE_OPEN_FILEPROTECTION_NONE
       flags |= SQLITE_OPEN_FILEPROTECTION_NONE;
 #endif
-      int result = sqlite3_open_v2([path UTF8String], &self -> _database, flags, NULL);
+      int result = sqlite3_open_v2([path UTF8String], &self->_database, flags, NULL);
       if (result != SQLITE_OK) {
         NSString *errorString = FIRMessagingStringFromSQLiteResult(result);
         NSString *errorMessage = [NSString
@@ -522,7 +522,7 @@ NSString *_Nonnull FIRMessagingStringFromSQLiteResult(int result) {
 #ifdef SQLITE_OPEN_FILEPROTECTION_NONE
       flags |= SQLITE_OPEN_FILEPROTECTION_NONE;
 #endif
-      int result = sqlite3_open_v2([path UTF8String], &self -> _database, flags, NULL);
+      int result = sqlite3_open_v2([path UTF8String], &self->_database, flags, NULL);
       if (result != SQLITE_OK) {
         NSString *errorString = FIRMessagingStringFromSQLiteResult(result);
         NSString *errorMessage =

+ 1 - 1
Firestore/core/src/api/pipeline_result_change.cc

@@ -1,5 +1,5 @@
 /*
- * Copyright 2025 Google
+ * Copyright 2025 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.

+ 1 - 1
Firestore/core/src/api/pipeline_result_change.h

@@ -1,5 +1,5 @@
 /*
- * Copyright 2025 Google
+ * Copyright 2025 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.

+ 1 - 1
Firestore/core/src/api/realtime_pipeline_snapshot.cc

@@ -1,5 +1,5 @@
 /*
- * Copyright 2025 Google
+ * Copyright 2025 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.

+ 9 - 4
Package.swift

@@ -20,6 +20,11 @@ import PackageDescription
 
 let firebaseVersion = "12.3.0"
 
+// For private preview, Firestore must be built from source.
+let shouldUseSourceFirestore = true
+// Remove the above and uncomment the line below before merging Firestore to main.
+// let shouldUseSourceFirestore = Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil
+
 let package = Package(
   name: "Firebase",
   platforms: [.iOS(.v15), .macCatalyst(.v15), .macOS(.v10_15), .tvOS(.v15), .watchOS(.v7)],
@@ -1400,7 +1405,7 @@ func abseilDependency() -> Package.Dependency {
 
   // If building Firestore from source, abseil will need to be built as source
   // as the headers in the binary version of abseil are unusable.
-  if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil {
+  if shouldUseSourceFirestore {
     packageInfo = (
       "https://github.com/firebase/abseil-cpp-SwiftPM.git",
       "0.20240722.0" ..< "0.20240723.0"
@@ -1420,7 +1425,7 @@ func grpcDependency() -> Package.Dependency {
 
   // If building Firestore from source, abseil will need to be built as source
   // as the headers in the binary version of abseil are unusable.
-  if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil {
+  if shouldUseSourceFirestore {
     packageInfo = ("https://github.com/grpc/grpc-ios.git", "1.69.0" ..< "1.70.0")
   } else {
     packageInfo = ("https://github.com/google/grpc-binary.git", "1.69.0" ..< "1.70.0")
@@ -1430,7 +1435,7 @@ func grpcDependency() -> Package.Dependency {
 }
 
 func firestoreWrapperTarget() -> Target {
-  if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil {
+  if shouldUseSourceFirestore {
     return .target(
       name: "FirebaseFirestoreTarget",
       dependencies: [.target(name: "FirebaseFirestore",
@@ -1449,7 +1454,7 @@ func firestoreWrapperTarget() -> Target {
 }
 
 func firestoreTargets() -> [Target] {
-  if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil {
+  if shouldUseSourceFirestore {
     return [
       .target(
         name: "FirebaseFirestoreInternalWrapper",