firebase-ios-sdk
firebase-ios-sdk copied to clipboard
Make Package.Swift Explicit
#13998 issue
Description
This pull request addresses an issue with the FirebasePerformance library in Firebase project. Currently, the Target FirebasePerformance is not explicitly declared as a product target of "FirebasePerformance" library in the Package.swift file. As a result, tools designed to detect implicit dependencies are marking the import FirebasePerformance statement as an implicit dependency across projects that utilize the FirebasePerformance library.
Proposed Change
To resolve this issue, I propose explicitly adding FirebasePerformance to FirebasePerformance library targets in the Package.swift file. This modification will ensure that there are no implicit dependencies related to FirebasePerformance, thereby enhancing clarity and maintaining strict dependency management.
Benefits
- Reduces potential for dependency-related issues in the future.
- Simplifies maintenance and improves clarity of dependency declarations.
- Ensures compliance with best practices for Swift package management.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Thanks for the PR, @rofle100lvl. The reason for the indirection here is to work around potential build issues on non-iOS platforms. FirebasePerformanceTarget acts as a wrapper target that keeps the FirebasePerformance target from building for unsupported platforms. https://github.com/firebase/firebase-ios-sdk/blob/0a492326659c61bb2f905b674959d22f4cc6837d/Package.swift#L869-L874
Thanks for the PR, @rofle100lvl. The reason for the indirection here is to work around potential build issues on non-iOS platforms. FirebasePerformanceTarget acts as a wrapper target that keeps the FirebasePerformance target from building for unsupported platforms.
+1 to Nick's comments. Unfortunately we can't accept the PR as is since it will break our Package builds for macOS and watchOS, which aren't supported by Firebase Performance. We're using this wrapper target approach for a few SDKs since library products in Swift Package Manager don't have any options for conditional inclusion, unlike targets.
I'll kick off the CI since I expect we have a workflow that will demonstrate the issue.
Thanks for the PR. We'll need to take some time to reevaluate how we're managing multi-Apple platform support before moving forward with it.