Feature podspec modules #793
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature-podspec-modules"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds support for using Yoga Swift dependents when Yoga is pulled as a static library.
What is the problem?
Currently swift projects trying to pull static libraries are unable to import the module. The reason for that is because the
DEFINES_MODULES
build setting is set toNO
. If a Swift Framework is trying topod spec lint --use-libraries
withYoga
as a dependency, the validation will fail. With theDEFINES_MODULE
enabled, the product will be treated as defining its own module. This enables automatic production of LLVM module map files when appropriate, and allows the product to be imported as a module.A workaround to this issue would be passing the
:modular_headers
flag to thePodfile
, but that would not fix thepod spec lint
validation for framework/library dependencies, it would just allow consuming applications to build and run.Example of an existing issue
An example of this issue would be SonarKit.
SonarKit
wasn't able to validate its podspec due toYogaKit
(Swift Framework) depending onYoga
and SonarKit validating with the--use-libraries
flag due to the c++ dependencies. We had to create a new version of Yoga 1.9 podspec and make sure to set theDEFINES_MODULE
flag of the pod target. After that, we were able topod spec lint
SonarKit.podspec
successfully.After merging a new
tag
should be created and the new podspec should be pushed to cocoapods master repository.Lets keep semantic versioning as
1.9.0
where the last digit would be for patched version. To get the latest pod people can refer~> 1.9
in their Podfile@priteshrnandgaonkar Done!
@priteshrnandgaonkar Let's make sure to generate a new 1.9.0 tag after merge
@priteshrnandgaonkar has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@priteshrnandgaonkar could we make sure we push the Yoga.podspec and then YogaKit.podspec to cocoapods master repo?
Pull request closed