-
Notifications
You must be signed in to change notification settings - Fork 79
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
CCurl available only for Linux or macOS #304
base: master
Are you sure you want to change the base?
Conversation
CCurl dependencies append only for Linux or Mac
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.
@makleso6 Apologies for the delay in reviewing your PR. Other than my suggestion on the #if
syntax this change looks fine to me.
We'll want to document the KITURA_IOS
flag somewhere - could you add a mention of it to the README, perhaps a new heading called 'Optional compilation flags'?
@@ -14,10 +14,12 @@ | |||
* limitations under the License. | |||
*/ | |||
|
|||
|
|||
|
|||
#if os(Linux) || os(macOS) |
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.
I think I'd prefer us to test on the KITURA_IOS flag as it's then consistent with the conditions for the CCurl dependency in Package.swift, eg:
#if !KITURA_IOS
@@ -92,7 +92,7 @@ public class HTTP { | |||
public static func createServer() -> HTTPServer { | |||
return HTTPServer() | |||
} | |||
|
|||
#if os(Linux) || os(macOS) |
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.
Same comment as above
@djones6 I'll try it |
@djones6 D you think that the removal ClientRequest in !KITURA_IOS good practice? |
The Kitura and Kitura-net tests are heavily dependent on You could potentially look at using Kitura-NIO instead: Kitura-NIO uses Swift-NIO and doesn't depend on Curl. To use it, set |
|
CCurl available only for Linux or macOS. I Use Kitura on iOS platform, so I move CCurl in other scope
Description
Create flag KITURA_IOS
for Linux or macOS ClientRequest available(no need use CCurl on iOS )
for Linux or macOS HTTP methods available(no need use CCurl on iOS )
Motivation and Context
Use Kitura WebServer on iOS platform without magic
How Has This Been Tested?
I think tests no needed
Checklist: