Skip to content
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

Add module stability by enabling library evolution support #1117

Closed

Conversation

yo2bh
Copy link

@yo2bh yo2bh commented Dec 19, 2019

Enabled the BUILD_LIBRARY_FOR_DISTRIBUTION flag introduced in Xcode 11 for supporting framework distribution for creating the XCFramework.

@mxcl
Copy link
Owner

mxcl commented Jan 7, 2020

Seems to break Swift 4.1.52 compilation for some reason. See Travis.

https://travis-ci.org/mxcl/PromiseKit/jobs/627150231

@RomanPodymov
Copy link
Collaborator

Seems to break Swift 4.1.52 compilation for some reason. See Travis.

https://travis-ci.org/mxcl/PromiseKit/jobs/627150231

I think I had the same problem in #1121. Probably we should restart the checks.

@mxcl
Copy link
Owner

mxcl commented Jan 16, 2020

I restarted it twice already, but I’ll try again.

@mxcl
Copy link
Owner

mxcl commented Jan 16, 2020

Tried 4 times now, seems consistent.

@mxcl
Copy link
Owner

mxcl commented Jan 18, 2020

Notably this is the only build that is Xcode 11 and uses xcodebuild to build it, so basically, seems like this flag fails.

@yo2bh
Copy link
Author

yo2bh commented Jan 27, 2020

@mxcl Is there any way to resolve this issue which we're facing in Travis CI?

@mxcl
Copy link
Owner

mxcl commented Jan 27, 2020

I am unfamiliar with the BUILD_LIBRARY_FOR_DISTRIBUTION flag, so don’t know. Certainly not being able to build against a platform we support will prevent us merging this.

@yo2bh
Copy link
Author

yo2bh commented Mar 11, 2020

@mxcl - This flag is used to enabling library evolution support.
i.e Swift Library Evolution makes it so that you can link an application against one version of a Swift library, then upgrade the library to a newer version without rebuilding the application.

and

one more thing to create XCFramework, BUILD_LIBRARY_FOR_DISTRIBUTION flag must be set in a build setting.

We can set this flag in Podspec as well but I did not find the.podspec file in the repo.
As /PromiseKit.podspec is in .gitignore path, can you please commit this file so that I'll make changes in .podspec accordingly.

@mxcl - Can you please help me out for this.

@yo2bh yo2bh changed the title Enabled the BUILD_LIBRARY_FOR_DISTRIBUTION flag Add module stability by enabling library evolution support Mar 11, 2020
@mxcl
Copy link
Owner

mxcl commented Mar 14, 2020

Yeah I read about this recently at the Swift blog.

I don’t really know what to say, if it won’t build against a platform we support I cannot merge it into v6.

@RomanPodymov
Copy link
Collaborator

Look what I found at Library Evolution in Swift:

Library evolution support should only be used when a framework is going to be built and updated separately from its clients.

PromiseKit is an open source project, so it does not make sense to build it with BUILD_LIBRARY_FOR_DISTRIBUTION = YES.

@yo2bh
Copy link
Author

yo2bh commented Mar 23, 2020

@RomanPodymov & @mxcl -

What should we do if we have to going build separately to the client? Is there any way to do this?

@mxcl
Copy link
Owner

mxcl commented May 23, 2020

What should we do if we have to going build separately to the client? Is there any way to do this?

Modify the xcodeproj with a script.

@RomanPodymov
Copy link
Collaborator

Hello @yo2bh
You can use https://github.com/CocoaPods/Xcodeproj and set BUILD_LIBRARY_FOR_DISTRIBUTION = YES for any project. But for PromiseKit let's keep BUILD_LIBRARY_FOR_DISTRIBUTION = NO like in other open source projects.

@mxcl mxcl closed this Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants