Allow Yoga Pod to be built on any platform #821
Reference in New Issue
Block a user
No description provided.
Delete Branch "master"
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?
Currently the CocoaPod for Yoga explicitly states platform requirements.
Since the Yoga implementation doesn't depend on any platform features, it would be safe to build it on any platform.
That can be configured by omitting the
platform
/platforms
key:Among others, that would allow to use the pod in macOS projects
@priteshrnandgaonkar could you have a look at this?
It's about removing a single line that would enable building the Yoga pod on all platforms.
(I saw that you authored commit
c52c7cdd1e
. Previously, it was configured forosx
, now forios
andtvos
, but it would work for all of them)@priteshrnandgaonkar has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@PabloSichert Did you try
pod lib lint
? It does not validate for OSX.When I run
pod lib lint
onmaster
I get an error, so I don't think it has been introduced in this PR (and also not sure if you meant it was).What does the output say?
If I checkout
1.10.0
,pod lib lint --verbose Yoga.podspec
succeeds.On
master
I get:pod lib lint --verbose Yoga.podspec
outputGenerating Pods project
Yoga
iOS 8.0../../../../private/var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/Pods/Target Support Files/Yoga/Yoga.modulemap
../../../../private/var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/Pods/Target Support Files/Yoga/Yoga-umbrella.h
../../../../private/var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/Pods/Target Support Files/Yoga/Info.plist
Pods-App
iOS 8.0../../../../private/var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/Pods/Target Support Files/Pods-App/Info.plist
../../../../private/var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/Pods/Target Support Files/Pods-App/Pods-App.modulemap
../../../../private/var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/Pods/Target Support Files/Pods-App/Pods-App-umbrella.h
../../../../private/var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/Pods/Pods.xcodeproj
../../../../var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/Podfile.lock
../../../../private/var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/Pods/Manifest.lock
Integrating client project
[!] Please close any current Xcode sessions and use
App.xcworkspace
for this project from now on.Integrating target
Pods-App
(../../../../var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/App.xcodeproj
project)Adding Build Phase '[CP] Embed Pods Frameworks' to project.
Adding Build Phase '[CP] Check Pods Manifest.lock' to project.
-> Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
Building with
xcodebuild
.$ /usr/bin/xcodebuild clean build -workspace /var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/App.xcworkspace -scheme App -configuration Release CODE_SIGN_IDENTITY=- -sdk iphonesimulator -destination id=B82F4BE6-C48D-4515-8E19-1551054F3875
Build settings from command line:
CODE_SIGN_IDENTITY = -
SDKROOT = iphonesimulator12.1
/** TRUNCATED **/
/main.o
While building module 'yoga' imported from
/var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/App/main.m:3:
In file included from :1:
In file included from /Users/pablo/Library/Developer/Xcode/DerivedData/App-aluerrkmdyghggaqejkckrodpske/Build/Products/Release-appletvsimulator/Yoga/yoga.framework/Headers/Yoga-umbrella.h:15:
/Users/pablo/Library/Developer/Xcode/DerivedData/App-aluerrkmdyghggaqejkckrodpske/Build/Products/Release-appletvsimulator/Yoga/yoga.framework/Headers/Yoga.h:22:
10:
fatal error:
'YGValue.h' file not found
#include "YGValue.h"
^~~~~~~~~~~
1 error
generated.
/var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/App/main.m
:3:9
: fatal error: could not build module 'yoga'
@import yoga;
~~~~~~~^~~~
2 errors generated.
Testing with
xcodebuild
.-> Yoga (1.9.0)
- ERROR | xcodebuild: Returned an unsuccessful exit code.
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Planning build
- NOTE | xcodebuild: note: Constructing build description
- NOTE | xcodebuild: warning: Skipping code signing because the target does not have an Info.plist file. (in target 'App')
- NOTE | [iOS] xcodebuild: 10: fatal error:
- NOTE | [iOS] xcodebuild: :9: fatal error: could not build module 'yoga'
- NOTE | [iOS] xcodebuild: /Users/pablo/Library/Developer/Xcode/DerivedData/App-aluerrkmdyghggaqejkckrodpske/Build/Products/Release-iphonesimulator/Yoga/yoga.framework/Headers/Yoga.h:22:10: fatal error: 'YGValue.h' file not found
- NOTE | [iOS] xcodebuild: /var/folders/31/269zg3dn5hg6nrzd1dh2ddhm0000gn/T/CocoaPods-Lint-20181207-5004-3e8kok-Yoga/App/main.m:3:9: fatal error: could not build module 'yoga'
- NOTE | [tvOS] xcodebuild: fatal error:
- NOTE | [tvOS] xcodebuild: : fatal error: could not build module 'yoga'
[!] Yoga did not pass validation, due to 1 error.
You can use the
--no-clean
option to inspect any issue./usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/command/lib/lint.rb:85:in
'block in run' /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/command/lib/lint.rb:54:in
each'/usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/command/lib/lint.rb:54:in
run' /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in
run'/usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in
run' /usr/local/Cellar/cocoapods/1.5.3/libexec/gems/cocoapods-1.5.3/bin/pod:55:in
<top (required)>'/usr/local/Cellar/cocoapods/1.5.3/libexec/bin/pod:22:in
load' /usr/local/Cellar/cocoapods/1.5.3/libexec/bin/pod:22:in
Quick guess,
d19da9e528
could be relatedIf
YGValue
is added tospec.public_header_files
inYoga.podspec
, it seems to workYou're right - aside from that there seem to be other errors when trying to build for macOS.
I'm looking into it
Ok, I got it to work now.
EXPANDED_CODE_SIGN_IDENTITY: unbound variable
error when building theosx
target with CocoaPods1.5.x
. Upgrading to1.6.x
(beta, unfortunately) seemed to fix it. See https://github.com/CocoaPods/CocoaPods/issues/7708YGValue
to public headersosx
is10.6
, but apparently10.7
is needed for-stdlib=libc++
. Took the other values from https://guides.cocoapods.org/syntax/podfile.html#platformWould be nice if you could have a look again.
Thanks for your time so far, @priteshrnandgaonkar
@davidaurelio has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Pull request closed