-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Code reorg to move all public headers under src/api #14371
base: cheryllin/firestoreSwiftCpp
Are you sure you want to change the base?
Conversation
504ee98
to
fe4ec87
Compare
d418e06
to
317ccfb
Compare
Generated by 🚫 Danger |
Apple API Diff ReportCommit: 0cfe3e5 [BUILD ERROR] FirebaseFirestore[BUILD ERROR] FirebaseFirestoreInternal |
317ccfb
to
f362d19
Compare
f362d19
to
adf74af
Compare
adf74af
to
88c4b69
Compare
88c4b69
to
aba1ca2
Compare
aba1ca2
to
a719dc7
Compare
a719dc7
to
5b61b67
Compare
5b61b67
to
357e877
Compare
357e877
to
59d881d
Compare
59d881d
to
967b626
Compare
967b626
to
d25aca4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is showing multiple build failures. Are you stuck on solving those?
The general direction looks fine - although I need to think harder about the new SPM structure - and that might be fresher for @ncooke3.
It might be easier to get CocoaPods working first and then address SPM.
@@ -35,6 +35,7 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling, | |||
s.pod_target_xcconfig = { | |||
# Enables C++ <-> Swift interop (by default it's only C) | |||
"SWIFT_OBJC_INTEROP_MODE" => "objcxx", | |||
'HEADER_SEARCH_PATHS' => '${PODS_TARGET_SRCROOT} "${PODS_TARGET_SRCROOT}/Firestore/core/src/api"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed when interfaceForSwift
did not need to be here before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure exactly why, I suspect it is because headers under interfaceForSwift
were using relative paths before. After the move, they are using absolute paths from SRCROOT. But we need the second search path here because the umbrella header still include FirebaseFirestoreCpp.h
without absolute path.
I am not stuck, but it will take some time to resolve all of them. I intend to merge to cheryl's branch first, just so she can start using the new structure, while i fix the rest of failures.
FWIW, cocoapods build is "working", in that it builds fine. There are 3 test failures i listed in the PR description. They might have something to do with the actual changes Cheryl is doing. |
#import "Firestore/core/src/api/pipeline.h" | ||
#import "Firestore/core/src/api/pipeline_result.h" | ||
#import "Firestore/core/src/api/pipeline_source.h" | ||
#import "Firestore/core/src/api/stage.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the main reasons for restructuring the iOS SDK is to enable Swift source files to access all C++ APIs. Are there any technical limitations or restrictions in moving the existing API headers, like document reference header, into this file?
.headerSearchPath("api"), // Ensure the header search path is correct | ||
.headerSearchPath("../../"), | ||
.headerSearchPath("Public/FirebaseFirestore/"), | ||
.headerSearchPath("../Protos/nanopb"), | ||
] | ||
) | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a todo here to remind me to change the binary building process?
This PR re-organize the code structure to better support Firestore's Swift/Cpp interop.
For SPM we will have 3 targets:
For cocoapods the structure stays unchanged, we will continue to two targets:
This PR also eliminates
interfaceForSwift
folder for Cpp code exposed to Swift, and use existingsrc/api
instead. There is also changes to allow using absolute path (from SDK repo root) as opposed to relative path.cocoapods integration tests failures: