Skip to content

Commit

Permalink
Drop support for Swift 5.8 (#470)
Browse files Browse the repository at this point in the history
Motivation:

Only the last 3 versions of Swift are supported.

Modifications:

Update the Swift tools version in Package.swift.
Remove code which can now never be compiled.
Remove legacy docker configuration.

Result:

Only Swift 5.9+ supported.
  • Loading branch information
PeterAdams-A authored Oct 23, 2024
1 parent bc93af2 commit 31c8609
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 86 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.8
// swift-tools-version:5.9
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
Expand Down
16 changes: 0 additions & 16 deletions Sources/NIOHTTP2/HTTP2CommonInboundStreamMultiplexer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -550,19 +550,3 @@ extension NIOHTTP2AsyncSequence.AsyncIterator: Sendable {}

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
extension NIOHTTP2AsyncSequence: Sendable where Output: Sendable {}

#if compiler(<5.9)
// this should be available in the std lib from 5.9 onwards
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
extension AsyncThrowingStream {
static func makeStream(
of elementType: Element.Type = Element.self,
throwing failureType: Failure.Type = Failure.self,
bufferingPolicy limit: Continuation.BufferingPolicy = .unbounded
) -> (stream: AsyncThrowingStream<Element, Failure>, continuation: AsyncThrowingStream<Element, Failure>.Continuation) where Failure == Error {
var continuation: AsyncThrowingStream<Element, Failure>.Continuation!
let stream = AsyncThrowingStream<Element, Failure>(bufferingPolicy: limit) { continuation = $0 }
return (stream: stream, continuation: continuation!)
}
}
#endif
14 changes: 0 additions & 14 deletions Tests/NIOHTTP2Tests/ConfiguringPipelineAsyncMultiplexerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -579,17 +579,3 @@ final class ConfiguringPipelineAsyncMultiplexerTests: XCTestCase {
}
}
}

#if compiler(<5.9)
// this should be available in the std lib from 5.9 onwards
extension AsyncStream {
internal static func makeStream(
of elementType: Element.Type = Element.self,
bufferingPolicy limit: Continuation.BufferingPolicy = .unbounded
) -> (stream: AsyncStream<Element>, continuation: AsyncStream<Element>.Continuation) {
var continuation: AsyncStream<Element>.Continuation!
let stream = AsyncStream<Element>(bufferingPolicy: limit) { continuation = $0 }
return (stream: stream, continuation: continuation!)
}
}
#endif
55 changes: 0 additions & 55 deletions docker/docker-compose.2204.58.yaml

This file was deleted.

0 comments on commit 31c8609

Please sign in to comment.