Releases: vapor/vapor
4.100.2 - asyncBoot will no longer try booting server again if it is already booted
What's Changed
asyncBoot will no longer try booting server again if it is already booted by @RussBaz in #3195
The synchronous
boot
function skips running the lifecycle handlers if the server is already booted. However, the async version ignored this check. I have added a small fix to add this check again.
This patch was released by @0xTim
Full Changelog: 4.100.1...4.100.2
4.100.1 - Update URLEncodedFormEncoder encoding rules
What's Changed
Update URLEncodedFormEncoder encoding rules by @ptoffy in #3192
Solves #3173
References https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set to set the encoding rulesThe application/x-www-form-urlencoded percent-encode set contains all code points, except the ASCII alphanumeric, U+002A (*), U+002D (-), U+002E (.), and U+005F (_).
This patch was released by @0xTim
Full Changelog: 4.100.0...4.100.1
4.100.0 - Add Async Lifecycle Handlers
What's Changed
Add Async Lifecycle Handlers by @0xTim in #3193
Adds new protocol functions to
LifecycleHandler
s to support async contexts. This is important because packages like Redis use this to know when to shutdown their connection pool. In the shutdown function, these call.wait()
which can cause application crashes if called when trying to use NIO’s event loop concurrency executor.This provides async alternatives to allow packages to provide full async calls through their stack to avoid these crashes
This patch was released by @0xTim
Full Changelog: 4.99.3...4.100.0
4.99.3 - Async Serve Command
What's Changed
Async Serve Command by @0xTim in #3190
Migrate
ServeCommand
to anAsyncCommand
to enable proper custom executor support and remove any calls towait()
This patch was released by @0xTim
Full Changelog: 4.99.2...4.99.3
4.99.2 - Support compiling against Musl
What's Changed
Support compiling against Musl by @simonjbeaumont in #3188
Vapor already makes some provision for compiling against Musl in the RFC1123 implementation, where
Glibc
is not assumed and is imported conditionally alongside a conditional import ofMusl
. However, there are a couple of other places whereGlibc
is still assumed when compiling for Linux.This patch replaces these imports with the same
#if canImport(...)
pattern.
This patch was released by @0xTim
Full Changelog: 4.99.1...4.99.2
4.99.1 - Fix availability message
What's Changed
Fix availability message by @valeriyvan in #3191
This patch was released by @0xTim
Full Changelog: 4.99.0...4.99.1
4.99.0 - Add async alternative for Application.shutdown
What's Changed
Add async alternative for Application.shutdown by @0xTim in #3189
Adds an async alternative for
Application.shutdown()
and annotatesshutdown()
withnoasync
This patch was released by @0xTim
Full Changelog: 4.98.0...4.99.0
4.98.0 - Mark all functions that use `wait` as `noasync`
What's Changed
Mark all functions that use wait
as noasync
by @0xTim in #3168
⚠️ WARNING: If you have strict concurrency checking enabled you should migrate to the asyncApplication.make()
NIO’s
EventLoopFuture.wait()
is marked asnoasync
because is can cause issues when used in a concurrency context. All places where we call.wait()
should also be marked asnoasync
to avoid this issue.This adds
async
alternatives for those functions and addsnoasync
annotations where appropriate.Also adds an
async
Application.make
to replace the old initialiser that is nownoasync
This patch was released by @0xTim
Full Changelog: 4.97.1...4.98.0
4.97.1 - Log source file and line info for errors in ErrorMiddleware when possible
What's Changed
Log source file and line info for errors in ErrorMiddleware when possible by @gwynne in #3187
Ever since the last changes to
ErrorMiddleware
(by me, naturally), the error logging fails to correctly report file/line/function information even when the error has that data available. We now correctly pass these along to the logging machinery. The error responses sent to clients are unchanged.Additional changes:
- Restore recognition of the
DebuggableError
protocol (reason and source location information for such errors are now used again).- Handle generating error responses slightly more efficiently.
- Include the original error message in the fallback text if encoding an error to JSON fails.
- Improve the correctness of the
reason
messages used forDecodingError
s.
This patch was released by @gwynne
Full Changelog: 4.97.0...4.97.1
4.97.0 - Provide AsyncFileStreaming API
What's Changed
Provide AsyncFileStreaming API by @0xTim in #3184
Builds on the work of #2998, #3170 and #3167 to provide a full async streaming API that can be used in Swift Concurrency environments:
- Provides a new
asyncStreamFile(at:chunkSize:mediaType:advancedETagComparison:onCompleted:)
that takes advantage of the full async response streaming- Fixes a number of bugs with the async Response body streaming
FileMiddleware
is now anAsyncMiddleware
- Replaces usages of
FileManager
withNIOFileSystem
apart from in one deprecated API that can’t be async- Correctly marks
XCTVapor
functions asnoasync
where they use.wait()
and provides proper async alternatives
This patch was released by @0xTim
Full Changelog: 4.96.0...4.97.0