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

Fix Build Warnings for SPM with Xcode 12.5 Beta 2 #1661

Closed
wants to merge 1 commit into from

Conversation

joesus
Copy link
Contributor

@joesus joesus commented Feb 23, 2021

Summary:
Swift Package Manager (SPM) by convention will treat any files in the include directory of a target as public. Therefore they need to be present in the umbrella header. Typically this is the header with the target name, ex: FBSDKCoreKit.h.

For the target FBSDKCoreKit_Basics this means removing the internal header FBSDKUserDataStore+Internal.h since internal headers should not go in the include directory. Some internal methods are used by the meta indexer class but these were already declared in a private extension. Long term we will want to make these methods public but for now it makes sense to avoid adding them to the public interface.

For the target FBSDKCoreKit we have two types that are only compiled for tvOS. Since we already have them compilation-gated inline, it is not necessary to exclude them from compilation in the umbrella header. (It would be better to do this but it is not strictly necessary and this fixes the warning)

Differential Revision: D26609865

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D26609865

Summary:
Pull Request resolved: facebook#1661

Swift Package Manager (SPM) by convention will treat any files in the `include` directory of a target as public. Therefore they need to be present in the umbrella header. Typically this is the header with the target name, ex: `FBSDKCoreKit.h`.

For the target `FBSDKCoreKit_Basics` this means removing the internal header `FBSDKUserDataStore+Internal.h` since internal headers should not go in the `include` directory. Some internal methods are used by the meta indexer class but these were already declared in a private extension. Long term we will want to make these methods public but for now it makes sense to avoid adding them to the public interface.

For the target `FBSDKCoreKit` we have two types that are only compiled for tvOS. Since we already have them compilation-gated inline, it is not necessary to exclude them from compilation in the umbrella header. It would be better to do this but it is not strictly necessary and this fixes the warning. The part I really don't like about this fix is that it forces us to make those headers public in the Xcode project for targets that they really shouldn't be public for.

Differential Revision: D26609865

fbshipit-source-id: 6712ab9e5eb73beb7ae43164cb23b82323244740
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D26609865

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 46e385c.

@joesus joesus deleted the export-D26609865 branch April 28, 2021 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants