Skip to content

Conversation

@mortenbekditlevsen
Copy link
Contributor

As discussed in issue #8528 I am starting this work by moving Database.Encoder and Database.Decoder to a shared framework, FirebaseSharedSwift (should it be FirebaseSwiftShared? something else?) and rebranding as StructureEncoder and StructureDecoder while adding typealiases to keep API compatibility.

@paulb777
Copy link
Member

Please fix the swiftformat issues.

I created a codable-refactor branch as an alternative to master to enable incremental PRs for this project.

@mortenbekditlevsen mortenbekditlevsen changed the base branch from master to codable-refactor October 27, 2021 06:22
@mortenbekditlevsen
Copy link
Contributor Author

Thanks @paulb777 ,
It appears that third_party directories are excluded from formatting, so running style.sh didn't actually produce any changes.

@@ -0,0 +1,23 @@
/*
* Copyright 2020 Google LLC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2021

]
),
.testTarget(
name: "FirebaseSharedSwiftTests",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…s I can't find Xcodes location for my shared scheme when using a custom workspace with the firebase-ios-sdk added as a local package.
@paulb777
Copy link
Member

I'm going to merge this PR to the codable-refactor branch to make the Functions Codable PR more manageable and to set up CI and CocoaPods for FirebaseSharedSwift

@paulb777 paulb777 merged commit b900e9c into firebase:codable-refactor Oct 29, 2021
using encoder: Database.Encoder = .init()) -> [String: Any] {
do {
let enc = try encoder.encode(subject)
XCTAssertEqual(enc as? NSDictionary, expected as NSDictionary, file: file, line: line)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why an NSDictionary versus a Dictionary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to leverage the obj-c definition of equatability from NSDictionary since [String: Any] is not equatable.

@firebase firebase locked and limited conversation to collaborators Nov 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants