Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[Firestore] Consolidate Firestore and FirestoreSwift (#11806)" #11939

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

ncooke3
Copy link
Member

@ncooke3 ncooke3 commented Oct 13, 2023

This reverts commit a7e3720.

This rollback should fix the issue discussed in #11936 (comment).

@ncooke3 ncooke3 enabled auto-merge (squash) October 13, 2023 21:12
@github-actions
Copy link
Contributor

Apple API Diff Report

Commit: 0ca069d
Last updated: Fri Oct 13 14:14 PDT 2023
View workflow logs & download artifacts


FirebaseFirestoreSwift

[ADDED] Extensions
Swift:
+    public extension CollectionReference
+      @discardableResult func addDocument ( data : [ String : Any ]) async throws -> DocumentReference
+      @discardableResult func addDocument < T : Encodable > ( from value : T , encoder : Firestore . Encoder = Firestore . Encoder (), completion : (( Error ?) -> Void )? = nil ) throws -> DocumentReference
+    extension Date : ServerTimestampWrappable
+      public static func wrap ( _ timestamp : Timestamp ) throws -> Date
+      public static func unwrap ( _ value : ` Self ` ) throws -> Timestamp
+    extension DocumentReference : DocumentIDWrappable
+      public static func wrap ( _ documentReference : DocumentReference ) throws -> Self
+      func getDocument < T : Decodable > ( as type : T . Type , with serverTimestampBehavior : ServerTimestampBehavior = . none , decoder : Firestore . Decoder = . init (), completion : @escaping ( Result < T , Error > ) -> Void )
+      @available(iOS 13, tvOS 13, macOS 10.15, watchOS 7, *) func getDocument < T : Decodable > ( as type : T . Type , with serverTimestampBehavior : ServerTimestampBehavior = . none , decoder : Firestore . Decoder = . init ()) async throws -> T
+      func setData < T : Encodable > ( from value : T , encoder : Firestore . Encoder = Firestore . Encoder (), completion : (( Error ?) -> Void )? = nil ) throws
+      func setData < T : Encodable > ( from value : T , merge : Bool , encoder : Firestore . Encoder = Firestore . Encoder (), completion : (( Error ?) -> Void )? = nil ) throws
+      func setData < T : Encodable > ( from value : T , mergeFields : [ Any ], encoder : Firestore . Encoder = Firestore . Encoder (), completion : (( Error ?) -> Void )? = nil ) throws
+    public extension DocumentSnapshot
+      func data < T : Decodable > ( as type : T . Type , with serverTimestampBehavior : ServerTimestampBehavior = . none , decoder : Firestore . Decoder = . init ()) throws -> T
+    extension FieldValue : Encodable
+      public func encode ( to encoder : Encoder ) throws
+      public extension FirebaseDataDecoder . DateDecodingStrategy
+      static var timestamp : FirebaseDataDecoder . DateDecodingStrategy { get }
+      public extension FirebaseDataEncoder . DateEncodingStrategy
+      static var timestamp : FirebaseDataEncoder . DateEncodingStrategy { get }
+    public extension Firestore
+      func loadBundle ( _ bundleStream : InputStream ) async throws -> LoadBundleTaskProgress
+      func runTransaction ( _ updateBlock : @escaping ( Transaction , NSErrorPointer ) -> Any ?) async throws -> Any ?
+      class Encoder
+      class Decoder
+      public var dateEncodingStrategy : FirebaseDataEncoder . DateEncodingStrategy
+      public var dataEncodingStrategy : FirebaseDataEncoder . DataEncodingStrategy
+      public var nonConformingFloatEncodingStrategy : FirebaseDataEncoder . NonConformingFloatEncodingStrategy
+      public var keyEncodingStrategy : FirebaseDataEncoder . KeyEncodingStrategy
+      public var userInfo : [ CodingUserInfoKey : Any ]
+      public func encode < T > ( _ value : T ) throws -> [ String : Any ] where T : Encodable
+      public init ()
+      public var dateDecodingStrategy : FirebaseDataDecoder . DateDecodingStrategy
+      public var dataDecodingStrategy : FirebaseDataDecoder . DataDecodingStrategy
+      public var nonConformingFloatDecodingStrategy : FirebaseDataDecoder . NonConformingFloatDecodingStrategy
+      public var keyDecodingStrategy : FirebaseDataDecoder . KeyDecodingStrategy
+      public var userInfo : [ CodingUserInfoKey : Any ]
+      public func decode < T > ( _ t : T . Type , from data : Any ) throws -> T where T : Decodable
+      public func decode < T : Decodable > ( _ t : T . Type , from data : Any , in reference : DocumentReference ?) throws -> T
+      public init ()
+    extension String : DocumentIDWrappable
+      public static func wrap ( _ documentReference : DocumentReference ) throws -> String
+    extension Timestamp : ServerTimestampWrappable
+      public static func wrap ( _ timestamp : Timestamp ) throws -> Self
+      public static func unwrap ( _ value : Timestamp ) throws -> Timestamp
+    public extension Transaction
+      @discardableResult func setData < T : Encodable > ( from value : T , forDocument doc : DocumentReference , encoder : Firestore . Encoder = Firestore . Encoder ()) throws -> Transaction
+      @discardableResult func setData < T : Encodable > ( from value : T , forDocument doc : DocumentReference , merge : Bool , encoder : Firestore . Encoder = Firestore . Encoder ()) throws -> Transaction
+      @discardableResult func setData < T : Encodable > ( from value : T , forDocument doc : DocumentReference , mergeFields : [ Any ], encoder : Firestore . Encoder = Firestore . Encoder ()) throws -> Transaction
+    public extension WriteBatch
+      @discardableResult func setData < T : Encodable > ( from value : T , forDocument doc : DocumentReference , encoder : Firestore . Encoder = Firestore . Encoder ()) throws -> WriteBatch
+      @discardableResult func setData < T : Encodable > ( from value : T , forDocument doc : DocumentReference , merge : Bool , encoder : Firestore . Encoder = Firestore . Encoder ()) throws -> WriteBatch
+      @discardableResult func setData < T : Encodable > ( from value : T , forDocument doc : DocumentReference , mergeFields : [ Any ], encoder : Firestore . Encoder = Firestore . Encoder ()) throws -> WriteBatch
[ADDED] Enumerations
Swift:
+    public enum DecodingFailureStrategy
+      case ignore
+      case raise
+    public enum FirestoreDecodingError : Error
+      case decodingIsNotSupported ( String )
+      case fieldNameConflict ( String )
+    public enum FirestoreEncodingError : Error
+      case encodingIsNotSupported ( String )
+    public enum QueryPredicate
+      case isEqualTo ( _ : String , _ : Any )
+      case isIn ( _ : String , _ : [ Any ])
+      case isNotIn ( _ : String , _ : [ Any ])
+      case arrayContains ( _ : String , _ : Any )
+      case arrayContainsAny ( _ : String , _ : [ Any ])
+      case isLessThan ( _ : String , _ : Any )
+      case isGreaterThan ( _ : String , _ : Any )
+      case isLessThanOrEqualTo ( _ : String , _ : Any )
+      case isGreaterThanOrEqualTo ( _ : String , _ : Any )
+      case orderBy ( _ : String , _ : Bool )
+      case limitTo ( _ : Int )
+      case limitToLast ( _ : Int )
+      public static func whereField ( _ field : String , isEqualTo value : Any ) -> QueryPredicate
+      public static func whereField ( _ field : String , isIn values : [ Any ]) -> QueryPredicate
+      public static func whereField ( _ field : String , isNotIn values : [ Any ]) -> QueryPredicate
+      public static func whereField ( _ field : String , arrayContains value : Any ) -> QueryPredicate
+      public static func whereField ( _ field : String , arrayContainsAny values : [ Any ]) -> QueryPredicate
+      public static func whereField ( _ field : String , isLessThan value : Any ) -> QueryPredicate
+      public static func whereField ( _ field : String , isGreaterThan value : Any ) -> QueryPredicate
+      public static func whereField ( _ field : String , isLessThanOrEqualTo value : Any ) -> QueryPredicate
+      public static func whereField ( _ field : String , isGreaterThanOrEqualTo value : Any ) -> QueryPredicate
+      public static func order ( by field : String , descending value : Bool = false ) -> QueryPredicate
+      public static func limit ( to value : Int ) -> QueryPredicate
+      public static func limit ( toLast value : Int ) -> QueryPredicate
+      public static func ` where ` ( _ name : String , isEqualTo value : Any ) -> QueryPredicate
+      public static func ` where ` ( _ name : String , isIn values : [ Any ]) -> QueryPredicate
+      public static func ` where ` ( _ name : String , isNotIn values : [ Any ]) -> QueryPredicate
+      public static func ` where ` ( field name : String , arrayContains value : Any ) -> QueryPredicate
+      public static func ` where ` ( _ name : String , arrayContainsAny values : [ Any ]) -> QueryPredicate
+      public static func ` where ` ( _ name : String , isLessThan value : Any ) -> QueryPredicate
+      public static func ` where ` ( _ name : String , isGreaterThan value : Any ) -> QueryPredicate
+      public static func ` where ` ( _ name : String , isLessThanOrEqualTo value : Any ) -> QueryPredicate
+      public static func ` where ` ( _ name : String , isGreaterThanOrEqualTo value : Any ) -> QueryPredicate
[ADDED] Structures
Swift:
+    @propertyWrapper public struct DocumentID < Value : DocumentIDWrappable & Codable > : StructureCodingUncodedUnkeyed extension DocumentID : Codable extension DocumentID : Equatable where Value : Equatable extension DocumentID : Hashable where Value : Hashable
+      public init ( wrappedValue value : Value ?)
+      public var wrappedValue : Value ? { get set }
+      public init ( from decoder : Decoder ) throws
+      public func encode ( to encoder : Encoder ) throws
+    @propertyWrapper public struct ExplicitNull < Value > extension ExplicitNull : Equatable where Value : Equatable extension ExplicitNull : Hashable where Value : Hashable extension ExplicitNull : Encodable where Value : Encodable extension ExplicitNull : Decodable where Value : Decodable
+      public init ( wrappedValue value : Value ?)
+      public var wrappedValue : Value ? { get set }
+      public func encode ( to encoder : Encoder ) throws
+      public init ( from decoder : Decoder ) throws
+    @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) @propertyWrapper public struct FirestoreQuery < T > : DynamicProperty
+      public struct Configuration
+      public var wrappedValue : T { get }
+      public var projectedValue : Configuration { get nonmutating set }
+      public init < U : Decodable > ( collectionPath : String , predicates : [ QueryPredicate ] = [], decodingFailureStrategy : DecodingFailureStrategy = . raise , animation : Animation ? = nil ) where T == Result < [ U ], Error >
+      public var path : String
+      public var predicates : [ QueryPredicate ]
+      public var decodingFailureStrategy : DecodingFailureStrategy
+      public var error : Error ?
+      public var animation : Animation ?
+    @propertyWrapper public struct ServerTimestamp < Value > : Codable where Value : ServerTimestampWrappable & Codable extension ServerTimestamp : Equatable where Value : Equatable extension ServerTimestamp : Hashable where Value : Hashable
+      public init ( wrappedValue value : Value ?)
+      public var wrappedValue : Value ? { get set }
+      public init ( from decoder : Decoder ) throws
+      public func encode ( to encoder : Encoder ) throws
[ADDED] Protocols
Swift:
+    public protocol DocumentIDWrappable
+      static func wrap ( _ documentReference : DocumentReference ) throws -> Self
+    public protocol ServerTimestampWrappable
+      static func wrap ( _ timestamp : Timestamp ) throws -> Self
+      static func unwrap ( _ value : Self ) throws -> Timestamp

@google-oss-bot
Copy link

Coverage Report 1

Affected Products

  • FirebaseFirestore-iOS-FirebaseFirestore.framework

    Overall coverage changed from 86.49% (760d449) to 88.14% (0ca069d) by +1.64%.

    FilenameBase (760d449)Merge (0ca069d)Diff
    ordered_code.cc94.39%93.90%-0.49%
    task.cc94.78%93.91%-0.87%
    write_stream.cc94.37%91.55%-2.82%
  • FirebaseFirestore-iOS-FirebaseFirestoreSwift.framework

    Overall coverage changed from 0.00% (760d449) to 40.79% (0ca069d) by +40.79%.

    22 individual files with coverage change

    FilenameBase (760d449)Merge (0ca069d)Diff
    CodablePassThroughTypes.swift?100.00%?
    CollectionReference+AsyncAwait.swift?96.88%?
    CollectionReference+WriteEncodable.swift?100.00%?
    DocumentID.swift?86.44%?
    DocumentReference+Codable.swift?50.00%?
    DocumentReference+ReadDecodable.swift?0.00%?
    DocumentReference+WriteEncodable.swift?100.00%?
    DocumentSnapshot+ReadDecodable.swift?80.00%?
    EncoderDecoder.swift?100.00%?
    ExplicitNull.swift?90.48%?
    FieldValue+Encodable.swift?100.00%?
    Firestore+AsyncAwait.swift?97.75%?
    FirestoreQuery.swift?0.00%?
    FirestoreQueryObservable.swift?0.00%?
    GeoPoint+Codable.swift?100.00%?
    QueryPredicate.swift?0.00%?
    ServerTimestamp.swift?96.97%?
    Timestamp+Codable.swift?100.00%?
    TimestampDecodingStrategy.swift?100.00%?
    TimestampEncodingStrategy.swift?100.00%?
    Transaction+WriteEncodable.swift?100.00%?
    WriteBatch+WriteEncodable.swift?100.00%?

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/r0HPwk58BR.html

@ncooke3 ncooke3 merged commit 0c8d143 into master Oct 13, 2023
54 checks passed
@ncooke3 ncooke3 deleted the nc/fst-rollback branch October 13, 2023 22:01
@firebase firebase locked and limited conversation to collaborators Nov 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants