Skip to content
Merged
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
6 changes: 1 addition & 5 deletions TLSify/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
Expand All @@ -19,10 +19,6 @@ let strictConcurrencyDevelopment = false

let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
initialSettings.append(contentsOf: [
.enableUpcomingFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
Expand Down
6 changes: 1 addition & 5 deletions UniversalBootstrapDemo/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
Expand All @@ -19,10 +19,6 @@ let strictConcurrencyDevelopment = false

let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
initialSettings.append(contentsOf: [
.enableUpcomingFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
Expand Down
6 changes: 1 addition & 5 deletions backpressure-file-io-channel/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
Expand All @@ -19,10 +19,6 @@ let strictConcurrencyDevelopment = false

let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
initialSettings.append(contentsOf: [
.enableUpcomingFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ final class IntegrationTest: XCTestCase {
// And write a byte.
self.testToChannel.write(Data("X".utf8))

final class InjectReadHandler: ChannelInboundHandler {
final class InjectReadHandler: ChannelInboundHandler, Sendable {
typealias InboundIn = ByteBuffer

func handlerAdded(context: ChannelHandlerContext) {
Expand All @@ -88,7 +88,9 @@ final class IntegrationTest: XCTestCase {
// To make sure that EOF is seen, we'll inject a `read()` because otherwise there won't be reads because the
// HTTP server implements backpressure correctly... The read injection handler has to go at the very beginning
// of the pipeline so the HTTP server can't hold that `read()`.
XCTAssertNoThrow(try self.channel.pipeline.addHandler(InjectReadHandler(), position: .first).wait())
XCTAssertNoThrow(
try self.channel.pipeline.addHandler(InjectReadHandler(), position: .first).wait()
)
XCTAssertNoThrow(try self.channel.closeFuture.wait())
self.channel = nil // So tearDown doesn't close it again.

Expand Down Expand Up @@ -138,19 +140,21 @@ extension IntegrationTest {
var maybeChannel: Channel? = nil
XCTAssertNoThrow(
try maybeChannel = NIOPipeBootstrap(group: group)
.channelInitializer { channel in
.channelInitializer { [fileIO, tempDir] channel in
channel.pipeline.configureHTTPServerPipeline(withErrorHandling: false).flatMap {
channel.pipeline.addHandler(
SaveEverythingHTTPServer(
fileIO: self.fileIO,
uploadDirectory: self.tempDir
channel.eventLoop.makeCompletedFuture {
try channel.pipeline.syncOperations.addHandler(
SaveEverythingHTTPServer(
fileIO: fileIO,
uploadDirectory: tempDir
)
)
)
}
}
}
.withPipes(
inputDescriptor: dup(testToChannel.fileHandleForReading.fileDescriptor),
outputDescriptor: dup(channelToTest.fileHandleForWriting.fileDescriptor)
.takingOwnershipOfDescriptors(
input: dup(testToChannel.fileHandleForReading.fileDescriptor),
output: dup(channelToTest.fileHandleForWriting.fileDescriptor)
)
.wait()
)
Expand Down
6 changes: 1 addition & 5 deletions connect-proxy/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
Expand All @@ -19,10 +19,6 @@ let strictConcurrencyDevelopment = false

let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
initialSettings.append(contentsOf: [
.enableUpcomingFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
Expand Down
7 changes: 1 addition & 6 deletions http-responsiveness-server/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.9
// swift-tools-version: 6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
Expand All @@ -19,10 +19,6 @@ let strictConcurrencyDevelopment = false

let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
initialSettings.append(contentsOf: [
.enableUpcomingFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
Expand All @@ -49,7 +45,6 @@ let package = Package(
url: "https://github.com/apple/swift-nio-extras.git",
revision: "4804de1953c14ce71cfca47a03fb4581a6b3301c"
),
.package(url: "https://github.com/apple/swift-http-types.git", from: "1.1.0"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.4.0"),
.package(url: "https://github.com/swift-extras/swift-extras-json.git", from: "0.6.0"),
.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.23.0"),
Expand Down
6 changes: 1 addition & 5 deletions http2-client/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
Expand All @@ -19,10 +19,6 @@ let strictConcurrencyDevelopment = false

let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
initialSettings.append(contentsOf: [
.enableUpcomingFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
Expand Down
6 changes: 1 addition & 5 deletions http2-server/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
Expand All @@ -19,10 +19,6 @@ let strictConcurrencyDevelopment = false

let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
initialSettings.append(contentsOf: [
.enableUpcomingFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
Expand Down
4 changes: 0 additions & 4 deletions json-rpc/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ let strictConcurrencyDevelopment = false

let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
initialSettings.append(contentsOf: [
.enableUpcomingFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
Expand Down
6 changes: 3 additions & 3 deletions json-rpc/Tests/JsonRpcTests/JsonRpcTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ final class JSONRPCTests: XCTestCase {
let expectedResponse = RPCObject("ok")
for expectedParam in expectedParams {
// start server
let server = TCPServer(group: eventLoopGroup) { _, params, callback in
XCTAssertEqual(expectedParams, params, "expected params to match")
let server = TCPServer(group: eventLoopGroup) { _, param, callback in
XCTAssertEqual(expectedParam, param, "expected params to match")
callback(.success(expectedResponse))
}
_ = try! server.start(host: address.0, port: address.1).wait()
// connect client
let client = TCPClient(group: eventLoopGroup)
_ = try! client.connect(host: address.0, port: address.1).wait()
// perform the method call
let result = try! client.call(method: "test", params: expectedParams).wait()
let result = try! client.call(method: "test", params: expectedParam).wait()
switch result {
case .success(let response):
XCTAssertEqual(expectedResponse, response, "expected result ot match")
Expand Down
6 changes: 1 addition & 5 deletions nio-launchd/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
Expand All @@ -19,10 +19,6 @@ let strictConcurrencyDevelopment = false

let strictConcurrencySettings: [SwiftSetting] = {
var initialSettings: [SwiftSetting] = []
initialSettings.append(contentsOf: [
.enableUpcomingFeature("StrictConcurrency"),
.enableUpcomingFeature("InferSendableFromCaptures"),
])

if strictConcurrencyDevelopment {
// -warnings-as-errors here is a workaround so that IDE-based development can
Expand Down
Loading