Skip to content
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

Swift 6 Compatibility #149

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
swift: ["5.7", "5.8", "5.9", "5.10"]
swift: ["5.7", "5.8", "5.9", "5.10", "6.0"]
steps:
- uses: swift-actions/setup-swift@v2
with:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
.swiftpm/

### CI Artifacts ###
/.test-coverage
/.test-coverage

# VS Code
.vscode/

2 changes: 1 addition & 1 deletion Sources/GraphQL/Map/Map.swift
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ public extension Map {
}
}

extension String: CodingKey {
extension String: @retroactive CodingKey {
public var stringValue: String {
return self
}
Expand Down
16 changes: 8 additions & 8 deletions Tests/GraphQLTests/SubscriptionTests/SubscriptionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ import XCTest
]]
)
)
wait(for: [expectation], timeout: timeoutDuration)
await fulfillment(of: [expectation], timeout: timeoutDuration)
XCTAssertEqual(results, expected)

// Low priority email shouldn't trigger an event
Expand All @@ -668,7 +668,7 @@ import XCTest
unread: true,
priority: 2
))
wait(for: [expectation], timeout: timeoutDuration)
await fulfillment(of: [expectation], timeout: timeoutDuration)
XCTAssertEqual(results, expected)

// Higher priority one should trigger again
Expand All @@ -694,7 +694,7 @@ import XCTest
]]
)
)
wait(for: [expectation], timeout: timeoutDuration)
await fulfillment(of: [expectation], timeout: timeoutDuration)
XCTAssertEqual(results, expected)

// So that the Task won't immediately be cancelled since the ConcurrentEventStream is
Expand Down Expand Up @@ -756,7 +756,7 @@ import XCTest
]]
)
)
wait(for: [expectation], timeout: timeoutDuration)
await fulfillment(of: [expectation], timeout: timeoutDuration)
XCTAssertEqual(results, expected)

db.stop()
Expand All @@ -772,7 +772,7 @@ import XCTest
))

// Ensure that the current result was the one before the db was stopped
wait(for: [expectation], timeout: timeoutDuration)
await fulfillment(of: [expectation], timeout: timeoutDuration)
XCTAssertEqual(results, expected)

// So that the Task won't immediately be cancelled since the ConcurrentEventStream is
Expand Down Expand Up @@ -919,7 +919,7 @@ import XCTest
]]
)
)
wait(for: [expectation], timeout: timeoutDuration)
await fulfillment(of: [expectation], timeout: timeoutDuration)
XCTAssertEqual(results, expected)

expectation = XCTestExpectation()
Expand All @@ -938,7 +938,7 @@ import XCTest
]
)
)
wait(for: [expectation], timeout: timeoutDuration)
await fulfillment(of: [expectation], timeout: timeoutDuration)
XCTAssertEqual(results, expected)

expectation = XCTestExpectation()
Expand All @@ -959,7 +959,7 @@ import XCTest
]]
)
)
wait(for: [expectation], timeout: timeoutDuration)
await fulfillment(of: [expectation], timeout: timeoutDuration)
XCTAssertEqual(results, expected)

// So that the Task won't immediately be cancelled since the ConcurrentEventStream is
Expand Down
Loading