-
Notifications
You must be signed in to change notification settings - Fork 3
Upgrade project to Swift 6 #386
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
Conversation
dc1d18b to
dbfb28c
Compare
|
|
||
| #if !os(Linux) | ||
| // Skip on Linux, because `XCTExpectFailure` is unavailable on Linux | ||
| func testTimeout() async throws { |
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.
This test was in the project twice, so I removed it here
| private let missingStub: Result<WpNetworkResponse, Error>? | ||
|
|
||
| var missingStub: Result<WpNetworkResponse, Error>? | ||
| init(stubs: [Stub] = [], missingStub: Result<WpNetworkResponse, Error>? = nil) { |
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.
Because SafeRequestExecutor needs to be Sendable, we need our stubs to be too.
The easiest way to do that is to just make them immutable, which doesn't change the code all that much
dbfb28c to
3b3d581
Compare
Now all tests can run on Linux!
Foundation is now the same across all platforms, so we can use `URLSession.data(for:) async throws` on Linux now
3b3d581 to
5bd7068
Compare
crazytonyli
left a comment
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.
🥳
Updates the project to Swift 6, which brings a few benefits:
Foundationis now the same across platforms.swift-testing, which makes our test suite a lot simpler