Releases: apple/swift-nio
SwiftNIO 2.68.0
SemVer Minor
- NIOSendableBox: allow off-loop initialisation iff Value is Sendable (#2753)
SemVer Patch
- Throw an appropriate error from the writer when the channel closed (#2744)
Other Changes
- Convert the NIOFileSystem example code to a Snippet (#2746, #2750 patch credit to @tayloraswift)
- Fix link to NIOFileSystem from NIO index page (#2747)
SwiftNIO 2.67.0
SemVer Minor
- Add API for setting last accessed and last modified file times (#2735)
SemVer Patch
- 304 Not Modified Broken with Response Compression Enabled (#2737, patch credit to @dimitribouniol)
- Silence warning about missing include in macOS builds (#2741, patch credit to @gwynne)
Other Changes
- Update availability guard on tests (#2739)
SwiftNIO 2.66.0
SemVer Minor
- Add
ByteBuffer
support toBufferedWriter
(#2707) - Add
withTemporaryDirectory
(#2708) - Replace
R
withReturnType
(#2709) - Add a version of 'write' for
ByteBuffer
toWritableFileHandleProtocol
(#2730)
SemVer Patch
- Remove surplus
Sendable
requirements from FileSystem with methods (#2706) - concurrency takeover safe for 6.0 (#2710)
- Release file handles back to caller on failure to take ownership (#2715)
- clean up @retroactive conformances (#2719)
- Remove storage indirection for FileSystemError (#2726)
- Improve rename error (#2731)
- Add a fallback path if renameat2 fails (#2733)
Other Changes
- Fix race in TCPThroughputBenchmark (#2724, patch credit to @ser-0xff)
- Exclude unused privacy manifests. (#2716)
- No longer need test discovery command line. (#2717)
- Update PosixSingletons+ConcurrencyTakeOver.swift (#2721)
- Add slack to rst allocation tests (#2722)
- testSimpleMPTCP should not fail for ENOPROTOOPT (#2725)
SwiftNIO 2.65.0
Important changes to the NIOFileSystem
module
The NIOFileSystem
module has been renamed _NIOFileSystem
to make it more
obvious that it isn't yet stable API.
The existing NIOFileSystem
module currently re-exports _NIOFileSystem
and will
be removed in the next minor release. You should update your imports accordingly
to avoid being broken by the next release.
SemVer Minor
- Add
NIOBSDSocket.Option
for SO_BROADCAST (#2678) - Add delegate for collecting
EventLoop
tick metrics (#2608) - Raise minimum Swift version to 5.8 (#2675)
- Expose
NIOThreadPool.numberOfThreads
publicly. (#2676) - Prevent
BufferedWriter
from producing empty files (#2677) - Change
BufferedReader.read(while:)
signature (#2688) - Added file and line to NIOAsyncWriterError description (#2693)
- Add a helper for setting or cascading optional promises (#2697)
- Underscore the
NIOFileSystem
module (#2683, #2689)
SemVer Patch
- Add cancellation to
NIOThreadPool's
asyncrunIfActive
(#2679) - Handle 'atomically' created files more gracefully when detached (#2682)
- Remove
DispatchGroup
and replace with condvar (#2687) - Use
NIOThreadPool
inNIOFileSystem
(#2692) - Add privacy manifest (#2695)
- Retain a ref to
NIOAsyncWriter
until channel active (#2703)
Other Changes
SwiftNIO 2.64.0
Strict Concurrency Checks
The SwiftNIO team are currently in the process of making SwiftNIO warning free
under strict concurrency checking.
If you experience new Sendable
related warnings that you can't work around
then please file an issue.
SemVer Minor
- Track
execute()
andenqueue()
tasks separately from scheduled tasks. (#2645) - Conform
NIOIPProtocol
toSendable
(#2655) - Add some more
Sendable
annotations toNIOCore
(#2656) - Migrate to
syncOperations
in more places (#2661)
SemVer Patch
- Conditionally define
RENAME_*
macros (#2643, patch credit to @Austinpayne) - Build the new FileSystem module for Android (#2660, patch credit to @finagolfin)
- Only compile FileSystem on some platforms (#2636)
- Remove
@unchecked Sendable
conformance fromChannelOptions.Storage
(#2638) - Pass initial offset to BufferedReader.init (#2642)
- Don't drop bytes from the buffered reader when reading short (#2646)
- Introduce
assumeIsolated()
methods onEventLoop
,EventLoopPromise
andEventLoopFuture
(#2657) - Fix CoW performance bug in
NIOThreadPool
work queue (#2669)
Other Changes
SwiftNIO 2.63.0
This release includes a new module, NIOFileSystem
, for asynchronously interacting with the filesystem. The module isn't yet considered public API and is therefore available via the _NIOFileSystem
product. We plan to stabilise the API soon and welcome feedback in the meantime. You can learn more about NIOFileSystem
by reading the documentation.
SemVer Minor
- Add
async
API forNonBlockingFileIO
(#2576, patch credit to @adam-fowler) - Allow setting
MTELG.singleton
as Swift Concurrency executor (#2564)
SemVer Patch
- Changes to support building with Musl (#2595 and #2628, patch credit to @al45tair)
- Build for Android with NDK 26, by accounting for the new nullability annotations (#2600, patch credit to @finagolfin)
- Fix warnings caused by not defining the feature macros. (#2606, patch credit to @al45tair)
- [arch] Add arm64_32 to the 32-bit platform check (#2625, patch credit to @hyerra)
- Remove precondition on result of
IOCTL_VM_SOCKETS_GET_LOCAL_CID
(#2588) - Add missing availability guards in tests (#2596)
- Add
NIOAsyncWriterSinkDelegate._didSuspend
hook for testing (#2597) - Suppress the performance checker warning by being sneaky (#2620)
- Avoid
confstr
on Android (#2627)
Other Changes
- Update APNSwift Repository Link in README.md (#2602, patch credit to @Ryu0118)
- Add tests to validate the behaviour when requests/response content-length headers are wrong in HTTP1 (#2601)
- Fix test availability annotations (#2607)
- Fix warnings when building tests on Swift 5.9.2 Linux (#2610)
- Set
SWIFT_VERSION
environment variable to resolve to the correct benchmarks thresholds path (#2613) - Add cxx interop build pipeline (#2614)
- Fix the broken performance test binary (#2619)
- Fix broken tests (#2621)
- Fix
NIOAsyncChannel
allocation benchmarks (#2622) - Add additional guards in tests for mocking (#2624)
- Avoid overflow in tests where Int is 32-bit (#2626)
SwiftNIO 2.62.0
SwiftNIO 2.61.1
SemVer Patch
- use feature-specific guard for
@retroactive
(#2581)
SwiftNIO 2.61.0
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
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
andWebSocketServerUpgrader
(#2517) - Introduce new typed
HTTPClientUpgrader
andWebSocketClientUpgrader
(#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
ExecutorJob
s onEventLoop
s (#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 forLock
(#2556) - Remove continuation resumption inside locks (#2558)
- NonBlockingFileIO: tolerate chunk handlers from other
EventLoop
s (#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
useDispatchTime
(#2545)- Fix flaky
testRemovesAllHTTPRelatedHandlersAfterUpgrade
test (#2552) waitForUpgraderToBeRemoved
availability guard (#2559)