rules_swift_package_manager icon indicating copy to clipboard operation
rules_swift_package_manager copied to clipboard

chore(deps): update dependency vapor/vapor to v4.100.0

Open cgrindel-self-hosted-renovate[bot] opened this issue 2 years ago • 0 comments

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

Compare Source

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

Compare Source

What's Changed

Async Serve Command by @​0xTim in #​3190

Migrate ServeCommand to an AsyncCommand to enable proper custom executor support and remove any calls to wait()

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

Compare Source

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 of Musl. However, there are a couple of other places where Glibc 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: https://github.com/vapor/vapor/compare/4.99.1...4.99.2

v4.99.1: - Fix availability message

Compare Source

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

Compare Source

What's Changed

Add async alternative for Application.shutdown by @​0xTim in #​3189

Adds an async alternative for Application.shutdown() and annotates shutdown() with noasync

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

Compare Source

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 as noasync because is can cause issues when used in a concurrency context. All places where we call .wait() should also be marked as noasync to avoid this issue.

This adds async alternatives for those functions and adds noasync annotations where appropriate.

Also adds an async Application.make to replace the old initialiser that is now noasync

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

Compare Source

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 for DecodingErrors.
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

Compare Source

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 an AsyncMiddleware
  • Replaces usages of FileManager with NIOFileSystem apart from in one deprecated API that can’t be async
  • Correctly marks XCTVapor functions as noasync where 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

Compare Source

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 customCertificateVerifyCallback parameter to the initializers of HTTPServer.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

Compare Source

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

Compare Source

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:0

After this change it instead logs a message like the following after starting the server:

[Vapor] Server starting on http://127.0.0.1:57935

The input configuration is also patched such that app.http.server.configuration.port will hold the actual port after startup. Currently if it has value 0 it will keep that value (only app.http.server.shared.localAddress?.port will 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

Compare Source

What's Changed

Migrate to Async NIOFileIO APIs by @​0xTim in #​3167

This migrates collectFile(at:) and writeFile(_:at:) to use NIO’s async NIOFileIO APIs introduced in https://github.com/apple/swift-nio/releases/tag/2.63.0

Also adds a new API for streaming files using a AsyncSequence based on the new NIOFileSystem.

This work is required to move the DotEnv support over to an async API to avoid calling wait()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

Compare Source

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

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.