Skip to content

Releases: apple/swift-nio

SwiftNIO 2.61.0

27 Oct 17:16
9497e44
Compare
Choose a tag to compare

SemVer Minor

  • Add async version of NIOThreadPool.runIfActive (#2566, patch credit to @adam-fowler)
  • 🚨Breaking change 🚨 Back out new typed HTTP protocol upgrader (#2579)
    • We had to back out the typed HTTP protocol upgrade APIs since they were causing a runtime crash for our users. This is allowed under SemVer rules even if it is a breaking change. Once the compiler bug has been fixed we will try to land the new APIs again.

SemVer Patch

  • Fix exclusive access violation in NIOAsyncChannelOutboundWriterHandler (#2580)

Other Changes

  • Fix concurrency doc APIs (#2575)

SwiftNIO 2.60.0

25 Oct 10:24
54c85cb
Compare
Choose a tag to compare

New async APIs (former AsyncChannel SPI)

With this release we are stabilizing the AsyncChannel SPI and promote it to API. The following changes have been made to finalize the new APIs.

General and performance changes

  • Improve performance of NIOAsyncChannel (#2539)
  • Remove SPI from NIOAsyncChannel and new bootstrap methods (#2548)
  • Add docs for the async NIO APIs (#2549)
  • Update the concurrency documentation (#2529)
  • Add NIOAsyncChannel benchmark (#2536)
  • Add support for async VSock bootstrap methods (#2561)

Typed HTTP upgrading

  • Introduce new typed HTTPServerUpgrader and WebSocketServerUpgrader (#2517)
  • Introduce new typed HTTPClientUpgrader and WebSocketClientUpgrader (#2526)

Breaking

The following were breaking changes to the SPI.

  • 🚨Remove ProtocolNegotiationHandler protocol (#2519)
  • 🚨Align back pressure naming (#2527)
  • 🚨Make NIOAsyncChannel a struct (#2528)
  • 🚨Remove NIOProtocolNegotiationResult (#2554)

SemVer Minor

  • Add jitter support to recurring tasks (#2542, patch credit to @LorenzoFritzsch)
  • Bump minimum Swift version to 5.7 (#2524)
  • Add customization point for scheduling ExecutorJobs on EventLoops (#2538)
  • Support disabling body aggregation in NIOHTTP1TestServer (#2563)
  • Add support for unidirectional NIOPipeBootstrap (#2560)

SemVer Patch

  • Fix failed c++ compile of CNIOAtomics.h (#2518, patch credit to @saintstack)
  • Fix CNIOSHA1.h to support C++ interoperability (#2523, patch credit to @yaglo)
  • Fix overflow in TimeAmount (#2543, patch credit to @LorenzoFritzsch)
  • Avoid terminating when a precondition is not met in HTTPServerPipelineHandler (#2550)
  • Fix Sendable warning in NIOPipeBoostrap (#2530)
  • Tolerate empty HTTP response body parts (#2531)
  • Call NIOAsyncWriterSinkDelegate outside of the lock (#2547)
  • Fix test availability for tests (#2533)
  • Fix Sendable conformance for Lock (#2556)
  • Remove continuation resumption inside locks (#2558)
  • NonBlockingFileIO: tolerate chunk handlers from other EventLoops (#2562)
  • Mark retroactive conformances appropriately. (#2569)

Other Changes

  • Fix missing whitespace in README.md (#2535)
  • Fix flakiness in testDelayedUpgradeBehaviour (#2557)
  • Add autogenerated files from VSCode to .gitignore (#2567, patch credit to @adam-fowler)
  • Mention file length in bytes in readFileSize explicitly (#2572)
  • Adopt package-benchmark (#2534)
  • Fix thread-safety issues in TCPThroughputBenchmark (#2537)
  • perf tests: reset ByteBuffer indices after every iteration (#2544)
  • measureRunTime use DispatchTime (#2545)
  • Fix flaky testRemovesAllHTTPRelatedHandlersAfterUpgrade test (#2552)
  • waitForUpgraderToBeRemoved availability guard (#2559)

SwiftNIO 2.59.0

20 Sep 12:11
3db5c4a
Compare
Choose a tag to compare

SemVer Minor

  • Added ByteBuffer.hexDump(format:) (#2475, patch credit to @natikgadzhi)
  • Make the initializers of NIOThreadPoolError public (#2503, patch credit to @omochi)
  • Make ByteBuffer Codable (#2509, patch credit to @natikgadzhi)
  • EventLoopFuture/Promise: only Sendable if Value is Sendable (#2496)
  • HTTP1: Support users opting-out of us setting framing headers. (#2508)
  • Support for custom protocols in DatagramBootstrap (#2516)

SemVer Patch

  • HTTP1: Simplify header separator and crlf (#2513, patch credit to @alex-taffe)
  • Update CNIOLLHTTP to latest nodejs/llhttp (#2512)

Other Changes

  • Docs: explain the basic safe usage of ByteBuffer (#2499, patch credit to @natikgadzhi)
  • Match casing of reference links to the casing of the actual referenced declaration/module (#2500, patch credit to @tayloraswift)
  • Update nightly allocation limits (#2502)

SwiftNIO 2.58.0

08 Aug 10:16
cf28163
Compare
Choose a tag to compare

SemVer Minor

  • Add support for using EventLoops as custom actor executor (#2388)
  • Add new EventLoop singletons (#2471)
  • Add bootstrap APIs for VSOCK sockets (#2479)

SemVer Patch

  • Fix huge compile time of setUUIDBytes (#2482, patch credit to @sidepelican)
  • Get Android building again after #2479 (#2490, patch credit to @finagolfin)
  • Make System.coreCount aware of cgroup2 (#2394)
  • Don't lose or delay writes before channelActive (#2486)

SPI(AsyncChannel) changes

  • Rename the waitForFinalResult() methods and provide an ELF convenience (#2483)
  • Add testing interfaces for the stream and writer of the NIOAsyncChannel (#2488)
  • Provide throwing finish method on test stream (#2493)
  • Fix leaked promise in NIOTypedApplicationProtocolNegotiationHandler (#2489)
  • Add async TCP echo example (#2463)
  • Avoid using deinit to fulfil the protocol negotiation promise (#2497)

Other Changes

SwiftNIO 2.57.0

24 Jul 10:01
a2e487b
Compare
Choose a tag to compare

SPI(AsyncChannel) changes

  • 🚨Breaking change: Reduce the amount of bootstrap async methods (#2474)
  • Make NIOAsyncChannel.Configuration conform to Sendable (#2466)

SemVer Patch

  • Skip TCP_NODELAY on sockets that NIO doesn't explicitly support (#2476)
  • Throw SocketAddressError (cf. fatalError) in SocketAddress.convert for unknown address family (#2477)

SwiftNIO 2.56.0

11 Jul 13:44
5f54289
Compare
Choose a tag to compare

SPI(AsyncChannel) changes

  • 🚨Breaking change: Add configuration for NIOAsyncChannel (#2464)
  • Async support for NIOPipeBootstrap (#2458)
  • Async support for NIORawSocketBootstrap (#2460)

Other Changes

  • Remove XCTAsyncTest usage (#2461)
  • Restructure Package.swift (#2462)

SwiftNIO 2.55.0

05 Jul 12:31
324bc65
Compare
Choose a tag to compare

SemVer Minor

  • Make NIO[Throwing]AsyncSequenceProducer.Source Sendable (#2459)

SemVer Patch

  • Add support for Musl libc (#2449)
  • Close Channel when input & output are closed (#2450)
  • Correct a few Musl additions from #2449 for Android, plus error if libc not found (#2451, patch credit to @finagolfin)
  • Use #if canImport(Darwin) where possible (#2446)

Other Changes

  • Update RediStack URL in README.md (#2445)
  • Allow opt-out of PII in CONTRIBUTORS.txt (#2453, patch credit to @therealbnut)
  • Update mailmap to unify Gwynne's email addresses (#2454, patch credit to @gwynne)
  • Fix several minor typos in comments found in various files (#2455, patch credit to @gwynne)
  • Fix last remaining test on Android (#2457, patch credit to @finagolfin)
  • Adopt the Swift CoC (#2440)
  • Updated allocation counters in 5.9 (#2456)

SPI(AsyncChannel) changes

  • Add NIOAsyncChannel based connect methods to ClientBootstrap (#2437)
  • Add NIOAsyncChannel based connect and bind methods to DatagramBootstrap (#2439)
  • 🚨Breaking change: Align ServerBootstrap bind methods with the initializer style (#2443)

SwiftNIO 2.54.0

31 May 14:42
6213ba7
Compare
Choose a tag to compare

SemVer Minor

  • EmbeddedChannel: getOption(ChannelOptions.allowRemoteHalfClosure) should not fatalError (#2429)

SemVer Patch

  • Pooled control message storage. (#2422, patch credit to @ser-0xff)
  • NIOPOSIX happy eyeballs now hops to the connection event loop when using a custom resolver to avoid data races (#2436)

Other Changes

  • Add tests for WebSocketMaskingKey.random() (#2433, patch credit to @gwynne)
  • Add narrative documentation for NIO's concurrency bridges (#2423)
  • Include relevant versions (kernel & Swift) in test output (#2425)
  • Update update-alloc-limits-... script (#2430)
  • Fix flaky test in NIOAsyncWriter (#2431)

SwiftNIO 2.53.0

09 May 13:36
2d8e6ca
Compare
Choose a tag to compare

SemVer Minor

  • addition of assertSuccess() and assertFailure() on EventLoopFuture (#2417, patch credit to @dkz2)

SemVer Patch

  • Tolerate sending data after close(mode: .output) (#2421)

SwiftNIO 2.52.0

04 May 12:59
546eaa2
Compare
Choose a tag to compare

SemVer Minor

  • Add CustomDebugStringConvertible conformance to ByteBuffer (#2418, patch credit to @gwynne)
  • Add unprocessedBytes property on NIOSingleStepByteToMessageProcessor (#2419)