Skip to content

Commit

Permalink
Add fix for Swift 5.6 (#537)
Browse files Browse the repository at this point in the history
* Add fix for Swift 5.6

* Update CI to use swift 5.6/5.7
  • Loading branch information
adam-fowler authored Jan 23, 2023
1 parent 44618ce commit 6513826
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: SPM tests
Expand All @@ -33,7 +33,7 @@ jobs:
-ignore-filename-regex="\/Tests\/" \
-instr-profile=.build/debug/codecov/default.profdata > info.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: info.lcov

Expand All @@ -54,15 +54,16 @@ jobs:
strategy:
matrix:
tag:
- swift:5.2
- swift:5.3
- swift:5.4
- swift:5.5
- swift:5.6
- swift:5.7
container:
image: ${{ matrix.tag }}
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Test
Expand All @@ -76,6 +77,6 @@ jobs:
-ignore-filename-regex="\/Tests\/" \
-instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: info.lcov
5 changes: 5 additions & 0 deletions Sources/SotoCore/HTTP/AWSHTTPClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ public protocol AWSHTTPClient {
/// Execute an HTTP request with a streamed response
func execute(request: AWSHTTPRequest, timeout: TimeAmount, on eventLoop: EventLoop, logger: Logger, stream: @escaping ResponseStream) -> EventLoopFuture<AWSHTTPResponse>

#if compiler(>=5.6) && compiler(<5.7)
/// This should be called before an HTTP Client can be de-initialised
func shutdown(queue: DispatchQueue, _ callback: @escaping @Sendable (Error?) -> Void)
#else
/// This should be called before an HTTP Client can be de-initialised
func shutdown(queue: DispatchQueue, _ callback: @escaping (Error?) -> Void)
#endif

/// Event loop group used by client
var eventLoopGroup: EventLoopGroup { get }
Expand Down

0 comments on commit 6513826

Please sign in to comment.