-
Notifications
You must be signed in to change notification settings - Fork 1.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
Move CommonCrypto and zlib dependencies mapping to custom module map #559
Conversation
commit 467334e Author: Sergey Lem <[email protected]> Date: Fri Sep 28 10:47:53 2018 +0100 Remove old file commit 631c256 Author: Sergey Lem <[email protected]> Date: Fri Sep 28 09:51:15 2018 +0100 Fix project settings commit d629a65 Merge: 6371914 7f12731 Author: Sergey Lem <[email protected]> Date: Wed Sep 26 14:58:20 2018 +0100 Merge branch 'master' of github.com:turbulem/Starscream # Conflicts: # Starscream.xcodeproj/project.pbxproj commit 6371914 Author: Sergey Lem <[email protected]> Date: Mon Sep 10 09:45:21 2018 +0100 Add NSString+SHA1 to test target commit 33846d1 Author: Sergey Lem <[email protected]> Date: Mon Sep 10 09:40:09 2018 +0100 Fix project inclusion and add missing linker flag commit 74e3c63 Author: Sergey Lem <[email protected]> Date: Wed Jul 25 10:47:16 2018 +0100 Pull master branch from daltoniam/Starscream commit 912e7da Author: Sergey Lem <[email protected]> Date: Thu Jun 28 11:30:51 2018 +0100 Fix return type for SHA1 digest and cast warning commit 70234bc Author: Sergey Lem <[email protected]> Date: Mon Jun 25 13:18:18 2018 +0100 Add custom wrapper for SHA1 and custom modulemap for framework including module maps for CommonCrypto and zlib commit 94f8d58 Author: Sergey Lem <[email protected]> Date: Thu Jun 14 18:52:14 2018 +0100 Move CommonCrypto and zlib dependencies mapping to private module map commit 7f12731 Author: Sergey Lem <[email protected]> Date: Mon Sep 10 09:45:21 2018 +0100 Add NSString+SHA1 to test target commit 8df9d1e Author: Sergey Lem <[email protected]> Date: Mon Sep 10 09:40:09 2018 +0100 Fix project inclusion and add missing linker flag commit bd0732e Merge: 138cfa7 70fd033 Author: Sergey Lem <[email protected]> Date: Wed Jul 25 10:48:22 2018 +0100 Merge branch 'master' # Conflicts: # Starscream.xcodeproj/project.pbxproj commit 138cfa7 Author: Sergey Lem <[email protected]> Date: Wed Jul 25 10:47:16 2018 +0100 Pull master branch from daltoniam/Starscream commit ca783db Author: Sergey Lem <[email protected]> Date: Thu Jun 28 11:30:51 2018 +0100 Fix return type for SHA1 digest and cast warning commit 8ca8df0 Author: Sergey Lem <[email protected]> Date: Mon Jun 25 13:18:18 2018 +0100 Add custom wrapper for SHA1 and custom modulemap for framework including module maps for CommonCrypto and zlib commit 98e1d62 Author: Sergey Lem <[email protected]> Date: Thu Jun 14 18:52:14 2018 +0100 Move CommonCrypto and zlib dependencies mapping to private module map
Can you look into why it doesn't build with Swift PM. I get this error:
just run
|
Sure, let me check |
Looks like proposed solution cannot be adopted by SPM. It doesn't seem to support explicit modules. I will investigate what can be done here. |
I would see for SPM if you could just use Swift 4.2's system targets. They look something like this https://github.com/nuclearace/SwiftDiscord/tree/vapor3/Sources/Sodium and https://github.com/nuclearace/SwiftDiscord/blob/vapor3/Package.swift#L43 |
@nuclearace Thank you, it looks very relevant. |
Maybe this is the option we can aim. You can still use older release for lover Swift version. |
@turbulem looks like you're right about CommonCrypto https://stackoverflow.com/a/50690346 |
In which version of Swift are these libraries included? I think need to explicitly set Swift 4.2 version in Package.swift and podspec file. .swift-version is going to be deprecated and isn't used anymore? I actually also came up with similar solution myself during weekend and I was running some tests. Not on Linux though. But for linux I think Swift NIO might be a better solution from Vapor. |
Starscream.podspec
Outdated
s.libraries = 'z' | ||
s.source_files = 'Sources/**/*.{h,m,swift}' | ||
s.module_map = 'Sources/modulemap/Starscream.modulemap' | ||
s.private_header_files = 'Sources/modulemap/**/*.h' |
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.
If we delete modulemap and header file then this is not needed anymore.
Test also with some sample project integrating this pod against https://websocket.org/echo.html
@fassko I updated my solution. It only works with new SDK, which might not be the best option. However it solves the problem and seem to work fine with Pods/Carthage/SPM. |
Details:
#520