-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Consider module stability when building frameworks #2902
Consider module stability when building frameworks #2902
Conversation
I branched off of |
When compiling with BUILD_LIBRARY_FOR_DISTRIBUTION setting, .swiftinterface files are created within the swiftmodule:
maybe presence of such files must be checked in your |
I would think that the presence of those files should be checked in the |
IIUC module stability is only effective when |
Ahh OK I understand now. Sorry I was a bit dense there. I'll look into that. |
I've added some logic to check for the existence of a |
@DavidBrunow build Alamofire |
Alamofire hasn't yet support for it : Alamofire/Alamofire#2990 I setted |
@kenji21 I might be thinking about this wrong, but wouldn't there need to be a new release on that framework for me to test this functionality? |
@DavidBrunow I would checkout Almofire (or what @kenji21 has posted), change the project and produce the artifact. The create a |
Just pushed a 1.6.0 tag with binary framework generated by the |
Thanks to you both -- I'll test both scenarios. |
It looks like that binary was built with Swift 4.2.1. |
Sorry, I was re-archiving an in-house app... just updated the zip with one compiled using:
|
You can also try
Actually, I'm not sure if Just in case:
Where {
"3.14.0": "https://storage.googleapis.com/firebase-preview-drop/ios/crashlytics/com.crashlytics.ios-manual.zip"
} |
I was able to successfully test this change using the SwiftiumKit release in Xcode 11.1. I did not see any issues with the Firebase binaries in any version of Xcode with the change removed so I don't think that is a good test scenario. I was not able to get the Crashlytics example to work -- I got this error: *** Downloading binary-only framework Crashlytics at "file:///Users/davidbrunow/Development/SmallSampleProject/Crashlytics.json"
2019-11-07 10:20:35.903677-0600 carthage[30281:4932184] Task <EC8F7C5F-BF40-4187-AB44-04F8E0CE3687>.<3> finished with error [-1100] Error Domain=NSURLErrorDomain Code=-1100 "The requested URL was not found on this server." UserInfo={NSUnderlyingError=0x101021de0 {Error Domain=kCFErrorDomainCFNetwork Code=-1100 "(null)"}, NSErrorFailingURLStringKey=file:///Users/davidbrunow/Development/SmallSampleProject/Crashlytics.json, NSErrorFailingURLKey=file:///Users/davidbrunow/Development/SmallSampleProject/Crashlytics.json, NSLocalizedDescription=The requested URL was not found on this server.}
Failed to read file or folder at /Users/davidbrunow/Development/SmallSampleProject/Crashlytics.json: Error Domain=Result.AnyError Code=1 "The requested URL was not found on this server." |
nice to read, did you try both with the binary framework built using Xcode 11.2.1 ? and with the flag |
Yes I tested with the binary framework built using Xcode 11.2.1 and I just tested with the |
I tested this branch locally and everything seems to work 👍 Thanks. |
Same here. Works like a charm. Thanks, @DavidBrunow ! Also noticed that our own framework didn't have the |
@ikesyo any idea when this may get merged and distributed in a release? 😊 |
Any updates on this? :) |
Thanks, @DavidBrunow. The patch works well. However, I find that version files needs to be checked against Swift 5.1 too. For Swift frameworks, version files save |
Thanks @DavidBrunow for your work here. Heads up that you will need to rebase on the latest |
Don't fail builds because the local Swift version doesn't match the framework Swift version if both are module stable
@DavidBrunow Thank you. I don't mean to rush, and I know I wouldn't be able to make these changes myself. :) I know that Swift versions weren't module stable previously, but I've always had multiple versions of Xcode on my computer and which one is selected is basically random. I don't understand why Carthage wants to prevent downloading based on which version of Xcode is selected; we'll get the same error when we try to build if it actually matters, and if it doesn't matter then that's great. Unfortunately this is for distribution to clients, so I have to support every version of Xcode (particularly since CI isn't always very flexible). If it were internal I'd just be telling people to download my preferred version of Xcode. |
I wasn't part of the folks that decided that Carthage shouldn't download frameworks if they are not compatible with the system's Swift version but the decision makes sense to me. I'd rather know sooner rather than later that a framework won't work for my environment and have that framework built for me if I cannot download a compatible version. |
Fix tests for new handling of module stability feature
@DavidBrunow Thank you for doing this! It's been a source of much headache in our team! I'd love to see this merged. |
I know everyone is trying really hard to make this happen, but is there any blockers to this getting merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Will there be a release soon that includes this? |
Actually, I've tried building Carthage from source with the latest master (c7d6b8dbe), and I still see this problem. When I clone https://github.com/mozilla-mobile/firefox-ios and build with
|
@michaeleisel When looking at the |
Good catch, that's probably it |
hey, any idea when a new version of carthage is going to be released? |
Cherry picks upstream changes from Carthage/Carthage#2902
Cherry picks upstream changes from Carthage/Carthage#2902
@rzulkoski @tmspzz do we have a plan to add this enhancement in a release soon? |
Cherry picks upstream changes from Carthage/Carthage#2902
Don't fail builds because the local Swift version doesn't match the framework Swift version if both are module stable