Carthage Support #305
Reference in New Issue
Block a user
No description provided.
Delete Branch "carthage-support"
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 is a pull request to support the Carthage dependency manager for Objective-C and Swift development. Unfortunately, doing this is causing a few issues:
The buck build is now broken: I have the impression we can't
#import <yoga/Yoga.h>
from a public header of the framework because the importing module does not know theyoga
module. This was the case inUIView+YogaKit.h
. Fixing this requires adding the C headers as standard headers of the framework and#import <YogaKit/Yoga.h>
instead. Unfortunately, this has broken the buck build. I don't know enough about buck to fix this. Any ideas?The tests fail in Xcode: Weirdly enough, two tests which run fine when run with
buck test //YogaKit:YogaKitTests --config cxx.default_platform=iphonesimulator-x86_64 --config cxx.cflags=-DTRAVIS_CI
fail when run inside an Xcode test target. Those aretestSizeThatFitsSmoke
andtestFrameAndOriginPlacement
. There's a test target in the Xcode projet of this Pull Request to play around with. Any ideas?Yeah, we were running into a similar problem internally. I'm going to take another look as soon as I have time, thanks for the PR!
@hartbit Remember that in order for the project to work with Carthage you need to make the framework scheme shared.
@guidomb Yep, I saw I had forgotten that. But haven't fixed this yet because of the other roadblocks. And by the time they are cleared, I think I might as well do a PR to support Cocoapods at the same time. But that requires getting a good idea how to handle semver for the project.
@hartbit @dshahidehpour Yeah, what do you guys think is the best approach moving forward? I am happy to help, I can add CocoaPods support but I think it would be better for now to wait, as @hartbit said, for a semver policy and ideally for #289 to be merged. Regarding buck I don't have any experience with it.
@hartbit I was trying to test the Carthage build. I've created a single view blank iOS project, linked YogaKit.framework (which I've built using
carthage build --no-skip-current
after making YogaKit scheme shared) but when I try to use I get an error.I've tried importing it from a Swift file using
import YogaKit
or from a bridging header using#import<YogaKit/YogaKit.h>
neither is working. The first one fails withNo such module 'YogaKit'
and the second one withYogaKit/YogaKit.h file not found
. Could this be related to the issue you pointed out in this PR's description about the buck build being broken?@guidomb I've updated the PR with the shared framework and its working for me. Did you setup the test project as detailed in Carthage's README?
What is the status of this? 1. should be able to be fixed using header maps in xcode i think?
@hartbit Yes it worked. I must have done something wrong. I also added support for CocoaPods in #309 but for some reason I couldn't pick your fork as the PR's target.
Closing so it can be implemented in #309 instead.
Pull request closed