-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Support Static Libraries for Carthage #1940
Conversation
@freak4pc It looks like the . scripts/common.sh
PLAYGROUND_CONFIGURATIONS=(Release)
# make sure macOS builds
for scheme in "RxSwift"
do
for configuration in ${PLAYGROUND_CONFIGURATIONS[@]}
do
PAGES_PATH=${BUILD_DIRECTORY}/Build/Products/${configuration}/all-playground-pages.swift
rx ${scheme} ${configuration} "" build
cat Rx.playground/Sources/*.swift Rx.playground/Pages/**/*.swift > ${PAGES_PATH}
swiftc -v -D NOT_IN_PLAYGROUND -target x86_64-apple-macosx10.10 -F ${BUILD_DIRECTORY}/Build/Products/${configuration} -framework RxSwift ${PAGES_PATH}
./all-playground-pages
done
done I added the |
@freak4pc I think that besides making out tests pass we should figure out how to make playgrounds work with these static libraries. I think that we can add a dynamic framework called I'm thinking of putting it to RxExample because otherwise Carthage will build it. |
@kzaher Absolutely. Actually @mfcollins3's solution seems to work locally for me, which is awesome! I didn't think it would be that simple to fix. Let's wait to see if CI agrees with this :) |
@kzaher this seems good to go. I think maybe we should update the README to mention we support Static Libraries with Carthage 0.30.1 and up. |
I've updated the README. |
Hi @freak4pc , It looks to me like playgrounds are still broken. |
@kzaher Seems to be running just fine ... what am I missing ? |
@freak4pc The purpose of playground tests is not for the CI to pass, but to make sure that we didn't break playgrounds accidentally :) The fact that CI passes is great, but users aren't able to use them because playgrounds don't use the command that you are using. |
Ah, I missed that. I tried playing with this a bit in cea92be but couldn't get it to work with a wrapper dynamic framework. I won't have much time to dig into this in the following days, so if anyone can chime in and has any thoughts, that'd be great. |
For some reason I also couldn't get it to work with a dynamic framework, but that's the only plausible idea I have. |
I can't even get the example app to work. I think that if we get RxExample to work, playgrounds will probably work :)
@mfcollins3 Any ideas? This is extremely annoying. |
I was actually able to get the example project itself to work. Already heading out today so will try to share tomorrow. |
@kzaher I did a fresh clone of the repo and checked out the For RxPlaygrounds, I just added RxSwift, RxCocoa, and RxRelay to the linked libraries list on the General tab. Once I did that, they playgrounds worked. I saw that After that, it looks like you just need to update . scripts/common.sh
PLAYGROUND_CONFIGURATIONS=(Release)
# make sure macOS builds
for configuration in ${PLAYGROUND_CONFIGURATIONS[@]}
do
for scheme in "RxSwift"
do
rx ${scheme} ${configuration} "" build
done
rx RxPlaygrounds ${configuration} "" build
PAGES_PATH=${BUILD_DIRECTORY}/Build/Products/${configuration}/all-playground-pages.swift
cat Rx.playground/Sources/*.swift Rx.playground/Pages/**/*.swift > ${PAGES_PATH}
swiftc -v -D NOT_IN_PLAYGROUND -target x86_64-apple-macosx10.10 -F ${BUILD_DIRECTORY}/Build/Products/${configuration} -framework RxSwift ${PAGES_PATH}
./all-playground-pages
done I was trying to get I put these in a PR for the |
Following the discussion in #1799, this seems to work now. The only downside here is that the "validate-playground" script fails, and I'm not sure if there's an easy way to fix it here. Any suggestions welcomed.
cc/ @bobgodwinx @mfcollins3