Skip to content

fix: Remove Codable sessions for Swift 4.0#59

Merged
Andrew-Lees11 merged 6 commits intomasterfrom
noCodable4.0
Jan 29, 2019
Merged

fix: Remove Codable sessions for Swift 4.0#59
Andrew-Lees11 merged 6 commits intomasterfrom
noCodable4.0

Conversation

@Andrew-Lees11
Copy link
Copy Markdown
Contributor

This pull request removes the Codable Session feature for Swift 4.0. This is because the Swift 4.0 compiler doesn't go down the Any subscript path when a complex object is not codable. This can cause existing code to break which caused a test failure in credentials.

@Andrew-Lees11 Andrew-Lees11 requested a review from djones6 January 29, 2019 11:10
@Andrew-Lees11 Andrew-Lees11 changed the title patch: Remove Codable sessions for Swift 4.0 fix: Remove Codable sessions for Swift 4.0 Jan 29, 2019




Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we get rid of some of this trailing whitespace?

Copy link
Copy Markdown
Contributor

@djones6 djones6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, bar the errant whitespace

@testable import KituraSessionTests


#if swift(>=4.1)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be better (uncompiled):

var testcases = [testCase(TestSession.allTests), testCase(TestTypeSafeSession.allTests]
#if swift(>=4.1)
testcases.append(TestCodableSession.allTests)
#endif

XCTMain(testcases)

@Andrew-Lees11 Andrew-Lees11 merged commit 352aa43 into master Jan 29, 2019
@djones6 djones6 deleted the noCodable4.0 branch January 30, 2019 11:44
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