chore(deps): update dependency vapor/vapor to v4.100.0
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| vapor/vapor | minor | 4.93.1 -> 4.100.0 |
Release Notes
vapor/vapor (vapor/vapor)
v4.100.0: - Add Async Lifecycle Handlers
What's Changed
Add Async Lifecycle Handlers by @0xTim in #3193
Adds new protocol functions to
LifecycleHandlers 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: https://github.com/vapor/vapor/compare/4.99.3...4.100.0
v4.99.3: - Async Serve Command
What's Changed
Async Serve Command by @0xTim in #3190
Migrate
ServeCommandto anAsyncCommandto enable proper custom executor support and remove any calls towait()
This patch was released by @0xTim
Full Changelog: https://github.com/vapor/vapor/compare/4.99.2...4.99.3
v4.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
Glibcis not assumed and is imported conditionally alongside a conditional import ofMusl. However, there are a couple of other places whereGlibcis 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: https://github.com/vapor/vapor/compare/4.99.1...4.99.2
v4.99.1: - Fix availability message
What's Changed
Fix availability message by @valeriyvan in #3191
This patch was released by @0xTim
Full Changelog: https://github.com/vapor/vapor/compare/4.99.0...4.99.1
v4.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: https://github.com/vapor/vapor/compare/4.98.0...4.99.0
v4.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 async
Application.make()NIO’s
EventLoopFuture.wait()is marked asnoasyncbecause is can cause issues when used in a concurrency context. All places where we call.wait()should also be marked asnoasyncto avoid this issue.This adds
asyncalternatives for those functions and addsnoasyncannotations where appropriate.Also adds an
asyncApplication.maketo replace the old initialiser that is nownoasync
This patch was released by @0xTim
Full Changelog: https://github.com/vapor/vapor/compare/4.97.1...4.98.0
v4.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
DebuggableErrorprotocol (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
reasonmessages used forDecodingErrors.
This patch was released by @gwynne
Full Changelog: https://github.com/vapor/vapor/compare/4.97.0...4.97.1
v4.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
FileMiddlewareis now anAsyncMiddleware- Replaces usages of
FileManagerwithNIOFileSystemapart from in one deprecated API that can’t be async- Correctly marks
XCTVaporfunctions asnoasyncwhere they use.wait()and provides proper async alternatives
This patch was released by @0xTim
Full Changelog: https://github.com/vapor/vapor/compare/4.96.0...4.97.0
v4.96.0: - Make # of connections accepted per event loop cycle configurable, and raise the default
What's Changed
Make # of connections accepted per event loop cycle configurable, and raise the default by @gwynne in #3186
As per @weissi’s suggestion in this forums post, we raise the default maximum number of connections accepted per cycle of the server’s event loop from 4 to 256, and the value is now user-configurable.
There are no new tests for this because I’m not sure if there’s a way to measure the effect of changing this value that doesn’t involve nondeterministic timing measurements.
Also takes the opportunity/excuse to add the missing
customCertificateVerifyCallbackparameter to the initializers ofHTTPServer.Configuration.
Reviewers
Thanks to the reviewers for their help:
This patch was released by @gwynne
Full Changelog: https://github.com/vapor/vapor/compare/4.95.0...4.96.0
v4.95.0: - Add support for asynchronous body stream writing
What's Changed
Add support for asynchronous body stream writing by @Joannis in #2998
- Fixes #2930 - a crash when users try to write a body from within a task towards the ELF APIs.
- Introduces a new API for writing chunked HTTP response bodies
- Adds a helper that automatically manages failing and closing streams
This patch was released by @0xTim
Full Changelog: https://github.com/vapor/vapor/compare/4.94.1...4.95.0
v4.94.1: - Patch configuration and log actual port on startup
What's Changed
Patch configuration and log actual port on startup by @bisgardo in #3160
Before this change, the application
let app = Application(.testing) defer { app.shutdown() } try app.server.start(hostname: nil, port: 0) defer { app.server.shutdown() }would log the following message before starting the server:
[Vapor] Server starting on http://127.0.0.1:0After this change it instead logs a message like the following after starting the server:
[Vapor] Server starting on http://127.0.0.1:57935The input configuration is also patched such that
app.http.server.configuration.portwill hold the actual port after startup. Currently if it has value 0 it will keep that value (onlyapp.http.server.shared.localAddress?.portwill have the correct one).Fixes #3159.
Reviewers
Thanks to the reviewers for their help:
This patch was released by @0xTim
Full Changelog: https://github.com/vapor/vapor/compare/4.94.0...4.94.1
v4.94.0: - Migrate to Async NIOFileIO APIs
What's Changed
Migrate to Async NIOFileIO APIs by @0xTim in #3167
This migrates
collectFile(at:)andwriteFile(_:at:)to use NIO’s async NIOFileIO APIs introduced in https://github.com/apple/swift-nio/releases/tag/2.63.0Also adds a new API for streaming files using a
AsyncSequencebased on the newNIOFileSystem.This work is required to move the
DotEnvsupport over to an async API to avoid callingwait()s in an async context which can cause issues
Reviewers
Thanks to the reviewers for their help:
This patch was released by @0xTim
Full Changelog: https://github.com/vapor/vapor/compare/4.93.2...4.94.0
v4.93.2: - Removed streamFile deprecation + deactivated advancedETagComparison by default
What's Changed
Removed streamFile deprecation + deactivated advancedETagComparison by default by @linus-hologram in #3177
As discussed on Discord, this PR removes the deprecation and deactivates the lately introduced advanced ETag Comparison for the time being while the revised implementation is worked on.
New Contributor
- @linus-hologram made their first contribution in #3177 🎉
This patch was released by @0xTim
Full Changelog: https://github.com/vapor/vapor/compare/4.93.1...4.93.2
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Renovate Bot.