Skip to content

Fix broken URLSession on Linux platform#60

Merged
ianpartridge merged 2 commits intoKitura:masterfrom
segabor:master
Jun 25, 2019
Merged

Fix broken URLSession on Linux platform#60
ianpartridge merged 2 commits intoKitura:masterfrom
segabor:master

Conversation

@segabor
Copy link
Copy Markdown
Contributor

@segabor segabor commented Jun 25, 2019

Description

Configuration module no longer builds on Linux since URLSession type is extracted from Foundation framework to a separate one FoundationNetworking

UPDATE Just realized this fix is required for Swift version <= 5.1. Current official release 5.0.1 does not support #canImport directive and there's no FoundationNetworking submodule yet.

Motivation and Context

I use Configuration in one of my pet project and recently noticed that build fails due to above issue.

How Has This Been Tested?

Ran automated tests.

Checklist:

  • I have submitted a CLA form
  • If applicable, I have updated the documentation accordingly.
  • If applicable, I have added tests to cover my changes.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 25, 2019

CLA assistant check
All committers have signed the CLA.

@ianpartridge
Copy link
Copy Markdown
Contributor

Thank you for the PR! Please can you sign the CLA ^^^^^^ ?

The format we've been going for with this is:

#if swift(>=4.1)
  #if canImport(FoundationNetworking)
    import FoundationNetworking
  #endif
#endif

@ianpartridge ianpartridge self-assigned this Jun 25, 2019
@ianpartridge ianpartridge added this to the 2019.13 milestone Jun 25, 2019
@segabor
Copy link
Copy Markdown
Contributor Author

segabor commented Jun 25, 2019

Ok, so this change requires Swift 5.1.

@ianpartridge
Copy link
Copy Markdown
Contributor

Yes this is a Swift 5.1 change. We need to keep backwards compatibility with older versions of Swift in this package though. Thanks.

@segabor
Copy link
Copy Markdown
Contributor Author

segabor commented Jun 25, 2019

Yes this is a Swift 5.1 change. We need to keep backwards compatibility with older versions of Swift in this package though. Thanks.

Thanks, I'm going to update the PR.

@segabor
Copy link
Copy Markdown
Contributor Author

segabor commented Jun 25, 2019

Thank you for the PR! Please can you sign the CLA ^^^^^^ ?
Can I do it by sending the signed CLA over email?

@ianpartridge
Copy link
Copy Markdown
Contributor

You should be able to do it by clicking on the link above.

image

@ianpartridge ianpartridge merged commit da98da1 into Kitura:master Jun 25, 2019
@ianpartridge
Copy link
Copy Markdown
Contributor

https://github.com/IBM-Swift/Configuration/releases/tag/3.0.4 :)

@segabor
Copy link
Copy Markdown
Contributor Author

segabor commented Jun 25, 2019

Awesome! Thanks!

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.

3 participants