Releases: apple/swift-nio
SwiftNIO 2.78.0
What's Changed
This release contains a number of features that have been added to enable the SwiftNIO ecosystem to adopt strict concurrency checking and the Swift 6 language mode more easily. In particular, this release migrates NIOCore and NIOEmbedded, two critical and widespread dependencies.
This release also contains new tools for making adoption easier, in particular the isolated views of EventLoop
, EventLoopPromise
, and EventLoopFuture
. For more details on how to use these types to make adoption of strict concurrency easier, please see our documentation on the relationship between EventLoop
s, EventLoopFuture
s, and Swift's concurrency model.
More work in this area is ongoing, and will be released in subsequent versions.
SemVer Minor
- Handle Sendability of RemovableChannelHandler by @Lukasa in #2953
- Clean up Sendability for ChannelInvoker by @Lukasa in #2955
- Complete NIOCore strict concurrency by @Lukasa in #2959
- Make NIOFileDescriptor/FileRegion/IOData Sendable & soft-deprecated by @weissi in #2598
- fix almost all Sendable warnings by @weissi in #2994
- deprecate NIOEventLoopGroupProvider.createNew by @weissi in #2480
- Add EventLoop.now API for getting the current time by @simonjbeaumont in #3015
- Add parallel removal of items by @mimischi in #3008
- Add isolated views to EventLoop, Promise, and Future by @Lukasa in #2969
- Get NIOEmbedded clean under strict concurrency by @Lukasa in #3030
SemVer Patch
- give common blocking functions a clear name by @weissi in #2984
- ByteBuffer: one fewer allocs to go to Data by @weissi in #1839
- Remove noasync from NIOFileHandle by @glbrntt in #3001
- Avoid converting array holding existentials by @Lukasa in #3006
- Use the new Android overlay in the tests and update some Bionic declarations by @finagolfin in #3009
- Revert
fastRebase
implementation by @clintonpi in #3014 - Deprecate not-actually-public Base64 APIs by @glbrntt in #3022
- Fix new warnings by @Lukasa in #3026
- Remove now unneeded fts_open bitcast for Android by @finagolfin in #3025
- fix bogus "unleakable promise leaked" error message (#2855) by @weissi in #3027
- Enable MemberImportVisibility check by @rnro in #3029
- Wait for
closeFuture
instead of close promise inNIOAsyncChannel
'sexecuteThenClose
by @gjcairo in #3032 - Import Android instead for NIOEmbedded by @finagolfin in #3033
- Support concurrency take over in 6.2 by @Lukasa in #3043
- GetaddrinfoResolver succeeds futures on eventLoop by @rnro in #3042
Other Changes
- fix warnings: syncShutdownGracefully not available in async contexts by @weissi in #2995
- Add Cxx interop swift settings to CI by @rnro in #2999
- Update documentation comments by @mimischi in #2998
- Cxx interop CI appends swiftSettings by @rnro in #3002
- fix remaining warnings & enable -warnings-as-errors in CI by @weissi in #3000
- Aligning semantic version label check name by @FranzBusch in #3007
- Introduce JSON matrix workflow by @rnro in #3013
- Matrix workflows refer to main branch by @rnro in #3016
- Re-usable workflows curl scripts by @rnro in #3017
- GHA: Separate matrix input handling by @rnro in #3018
- Remove outdated documentation by @rauhul in #3023
- rename top matrix workflow object 'swift'->'config' by @rnro in #3024
- Fix now-racy scheduled callback tests by @Lukasa in #3031
- Update release.yml and label action by @FranzBusch in #3035
- Fix flaky test testTasksScheduledDuringShutdownAreAutomaticallyCancel… by @FranzBusch in #3036
- Print alloc-limits-from-test-output usage when no args by @glbrntt in #3041
New Contributors
SwiftNIO 2.77.0
What's Changed
SemVer Minor
- Add new protocol for ChannelHandler to get buffered bytes in the channel handler by @johnnzhou in #2918
- Add WebSocketFrame.reservedBits OptionSet by @adam-fowler in #2971
- Add ByteBuffer methods getUTF8ValidatedString and readUTF8ValidatedString by @adam-fowler in #2973
- EventLoopFuture.waitSpinningRunLoop() by @weissi in #2985
SemVer Patch
- EmbeddedEventLoop/Channel: check correct thread by @weissi in #2951
- Fix
NIOAsyncSequenceProducer
watermark strategy. by @FranzBusch in #2952 - BaseSocketChannel flushNow IONotificationState changes by @rnro in #2954
- Fix leaking technique by @asdf-bro in #2963
- Use Swift 6.0 docs pipeline by @rnro in #2966
- Remove sendable checking from NIOLock and NIOLockedValueBox by @glbrntt in #2968
- Close channel during upgrade, if client closes input by @adam-fowler in #2756
- Use condition variable in NIOThreadPool by @glbrntt in #2964
- Better handle ECONNRESET on connected datagram sockets. by @Lukasa in #2979
- Only toggle production state when above/below watermark by @glbrntt in #2996
- Prevent crash in Happy Eyeballs Resolver by @Lukasa in #3003
Other Changes
- Fix broken swift format link by @ali-ahsan-ali in #2948
- Correct allocation test script by @PeterAdams-A in #2956
- Remove unused dockerfiles and allocation limit scripts by @PeterAdams-A in #2957
- Improve docs around running act for formatting by @glbrntt in #2965
- Fix SemVer major label check by @FranzBusch in #2970
- unify scheduled and main yamls by @rnro in #2972
- remove unused Swift 6 language mode workflow by @rnro in #2976
- Swift 6ify NIOHTTP1Server demo by @weissi in #2974
- Add netstat -s to nio-diagnose by @Lukasa in #2977
- tests: Remove asserts on the value of local Vsock CID by @simonjbeaumont in #2975
- Add back alloc limits script with JSON mode by @Lukasa in #2987
Full Changelog: 2.76.1...2.77.0
SwiftNIO 2.76.1
SwiftNIO 2.76.0
What's Changed
SemVer Minor
- Drop support for Swift 5.8 by @FranzBusch in #2924
- Fix
EventLoopFuture
andEventLoopPromise
under strict concurrency checking by @FranzBusch in #2654 - Provide APIs to read file into more data types by @clintonpi in #2923
SemVer Patch
- Adopt NIOThrowingAsyncSequenceProducer 2nd try by @rnro in #2917
- Add future wait benchmark to catch memory leaks by @rnro in #2931
- Fix Windows build break. by @jeffdav in #2935
- Fix withConnectedSocket in async mode by @Lukasa in #2937
- Fix Windows build for NIOCore. by @jeffdav in #2938
- NIOPosix on Darwin: inherit main thread QoS by @weissi in #2944
Other Changes
- [CI] Migrate to Swift 6.0 and drop 5.8 by @FranzBusch in #2920
- Disable semver label check locally by @rnro in #2928
- [CI] Fix python lint by @FranzBusch in #2925
- clean up 5.8 thresholds by @rnro in #2932
- [CI] Add Windows matrix build by @FranzBusch in #2929
- [CI] Small adjustments to the Windows actions by @FranzBusch in #2939
- [CI] Enable benchmarks & cxx Windows CI by @FranzBusch in #2940
- [CI] Fix the Windows 6.0 check name by @FranzBusch in #2941
New Contributors
Full Changelog: 2.75.0...2.76.0
SwiftNIO 2.75.0
What's Changed
SemVer Minor
- Add EventLoop APIs for simpler scheduling of callbacks by @simonjbeaumont in #2759
- Add convenience conformances to
ByteCount
by @clintonpi in #2909 - Add
removeHandler(context: ChannelHandlerContext)
to SynchronousOperations of ChannelPipeline by @supersonicbyte in #2912 - [NIOFileSystem] Provide an API to specify allowing unlimited sized reads by @clintonpi in #2914
SemVer Patch
- A DatagramChannelTest now waits for writes by @rnro in #2905
- Throw error when the max read amount is greater than
ByteBuffer
can tolerate by @clintonpi in #2911
Other Changes
- Make ByteBufferQUICBinaryEncodingStrategyTests compatible with 32-bit systems by @hamzahrmalik in #2904
- Fix broken link to swift-server performance documentation by @plemarquand in #2907
- [CI] Switch to reusable soundness by @FranzBusch in #2913
- [CI] Fix unit test yaml file by @FranzBusch in #2915
- [CI] Add back matrix CI script by @FranzBusch in #2916
- Re-add CXX compat check script by @PeterAdams-A in #2919
New Contributors
- @plemarquand made their first contribution in #2907
- @clintonpi made their first contribution in #2909
Full Changelog: 2.74.0...2.75.0
SwiftNIO 2.74.0
What's Changed
SemVer Minor
- Add ByteBuffer Hex init & write by @ali-ahsan-ali in #2837
- Add functions for reading and writing length-prefixed data with customizable encodings for the length by @hamzahrmalik in #2867
SemVer Patch
Full Changelog: 2.73.0...2.74.0
2.73.0
What's Changed
SemVer Minor
- Make
ByteBuffer
's description more useful by @supersonicbyte in #2864 - Expose
UDP_MAX_SEGMENTS
via System by @rnro in #2891 - Add new
ChannelOption
to get the amount of buffered outbound data in the Channel by @johnnzhou in #2849 - Add an
AcceptBackoffHandler
to the async server bootstraps by @FranzBusch in #2782
SemVer Patch
- Adding a nicer description for
WebSocketFrame
by @supersonicbyte in #2862 - Improving
description
and addingdebugDescription
toNIOAny
by @supersonicbyte in #2866 - Make FileChunk sendable by @ali-ahsan-ali in #2871
- Make
ByteBuffer.debugDescription
suitable for structural display by @dnadoba in #2495 - Add support for WASILibc by @MaxDesiatov in #2671
NIOSingleStepByteToMessageDecoder
reentrancy safety by @rnro in #2881- Adopt
NIOThrowingAsyncSequenceProducer
by @rnro in #2879 - Clamp buffer to maximum upon large write operation by @ali-ahsan-ali in #2745
- Revert "Adopt
NIOThrowingAsyncSequenceProducer
(#2879)" by @rnro in #2892 - Add concrete description for
EmbeddedEventLoop
by @aryan-25 in #2890 - Conditionally include linux/udp.h by @rnro in #2894
- Work around a type checking error when using the Static Linux SDK by @euanh in #2898
Other Changes
- [CI] Run tests on push to main by @FranzBusch in #2868
- [CI] License header support
.in
and.cmake
files by @FranzBusch in #2870 - Include nanoseconds in assertion of timestamp for NIOFileSystem tests by @gjcairo in #2869
- Correct the link of sswg-security at SECURITY.md by @lamtrinhdev in #2872
- Speculative fix for flakey AsyncTestingEventLoop test by @simonjbeaumont in #2873
- ci: Install shellcheck if not present in CI runner by @simonjbeaumont in #2882
- ci: Use ${GITHUB_BASE_REF} as treeish for checking API break by @simonjbeaumont in #2883
- ci: Refer to nested reusable workflows using remote variant by @simonjbeaumont in #2884
- [CI] Fix pull request label workflow by @FranzBusch in #2885
New Contributors
- @ali-ahsan-ali made their first contribution in #2871
- @aryan-25 made their first contribution in #2890
- @johnnzhou made their first contribution in #2849
- @euanh made their first contribution in #2898
Full Changelog: 2.72.0...2.73.0
2.72.0
What's Changed
SemVer Minor
- Add .compact format to ByteBuffer's hexdump method by @supersonicbyte in #2856
SemVer Patch
- Make
assumeIsolated
work with SerialExecutors that are backed by EventLoops by @fabianfett in #2865
New Contributors
- @supersonicbyte made their first contribution in #2856
Full Changelog: 2.71.0...2.72.0
2.71.0
What's Changed
SemVer Minor
- Adopt strict concurrency and Sendable in
NIOConcurrencyHelpers
by @Lukasa in #2832 - Adopt strict concurrency in
_NIODataStructures
by @Lukasa in #2835 - Provide documentation and context information for
NIOTooManyBytesError
by @cmcgee1024 in #2831
SemVer Patch
- Adopt strict concurrency in
_NIOBase64
by @Lukasa in #2838 - Remove symlinks from resources by @Lukasa in #2841
- Fix global concurrency hook integration test by @FranzBusch in #2857
Other Changes
- Update wording from
ubuntu
toUbuntu
at README.md by @lamtrinhdev in #2830 - Update the triggers for the Semantic Version label check by @FranzBusch in #2833
- Add
.editorconfig
file by @FranzBusch in #2829 - Fix test availability by @glbrntt in #2836
- Strict concurrency the early tests by @Lukasa in #2840
- Fix
NIOFileSystem
flaky tests by @gjcairo in #2842 - Improve
testTasksScheduledDuringShutdownAreAutomaticallyCancelled
by @glbrntt in #2843 - Align benchmark scaling and minimum samples by @FranzBusch in #2839
- Explain why
ThreadLocalVariable
isn't Sendable. by @Lukasa in #2845 - [CI] Don't persist git credentials in CI by @FranzBusch in #2847
- [CI] Mark the workspace as safe for the matrix job by @FranzBusch in #2848
- Pin DocC to below 1.4 by @Lukasa in #2854
- [CI] Make container images configurable in soundness and matrix jobs … by @FranzBusch in #2851
- Update release.yml by @FranzBusch in #2850
New Contributors
- @lamtrinhdev made their first contribution in #2830
- @cmcgee1024 made their first contribution in #2831
Full Changelog: 2.70.0...2.71.0
SwiftNIO 2.70.0
What's Changed
SemVer Minor
FileSystem.copyItem
can parallelise directory copy by @UncleMattHope in #2806ChannelOption
: Allow types to be accessed with leading dot syntax by @ayush1794 in #2816- Make
EventLoopPromise
conform to Equatable by @gjcairo in #2714 - Provide a default
CopyStrategy
overload for copyItem. by @UncleMattHope in #2818
SemVer Patch
- Better align shutdown semantics of testing event loops by @simonjbeaumont in #2800
- Clone files on Darwin rather than copying them by @rnro in #2823
Other Changes
- Fix compose file used in update-benchmark-thresholds script by @simonjbeaumont in #2808
- Remove advice to generate linux tests. by @PeterAdams-A in #2807
- Make
testInstantTCPConnectionResetThrowsError
more reliable by @hamzahrmalik in #2810 - [CI] Add
shellcheck
and fix up warnings by @FranzBusch in #2809 - [CI] Fix docs check by @FranzBusch in #2811
- [CI] Add Swift 6 language mode workflow by @FranzBusch in #2812
- Fix test compilation on non-macOS Darwin platforms by @simonjbeaumont in #2817
- Add
.index-build
to.gitignore
by @MaxDesiatov in #2819 - [CI] Add action and workflow to check for semver label by @FranzBusch in #2814
- Update repository docs for swift-version support and recent CI check changes by @UncleMattHope in #2815
- Fix failing build for test by @ayush1794 in #2824
- Fix typo in comment in
WebSocketErrorCodes.swift
by @valeriyvan in #2604 - [CI] Add a scheduled workflow for tests and benchmarks by @FranzBusch in #2822
- [CI] Fix label check by @FranzBusch in #2827
New Contributors
- @UncleMattHope made their first contribution in #2806
- @ayush1794 made their first contribution in #2816
- @valeriyvan made their first contribution in #2604
Full Changelog: 2.69.0...2.70.0