Skip to content

Releases: vapor/vapor

4.100.2 - asyncBoot will no longer try booting server again if it is already booted

21 May 20:19
2c185b7
Compare
Choose a tag to compare

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

20 May 16:06
50c6196
Compare
Choose a tag to compare

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 rules

The 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

15 May 11:56
90da64a
Compare
Choose a tag to compare

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: 4.99.3...4.100.0

4.99.3 - Async Serve Command

13 May 15:07
5bc1dfa
Compare
Choose a tag to compare

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: 4.99.2...4.99.3

4.99.2 - Support compiling against Musl

12 May 22:54
d9fa0d3
Compare
Choose a tag to compare

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: 4.99.1...4.99.2

4.99.1 - Fix availability message

12 May 19:15
8353aed
Compare
Choose a tag to compare

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

10 May 11:59
840d87c
Compare
Choose a tag to compare

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: 4.98.0...4.99.0

4.98.0 - Mark all functions that use `wait` as `noasync`

10 May 09:52
d411635
Compare
Choose a tag to compare

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: 4.97.1...4.98.0

4.97.1 - Log source file and line info for errors in ErrorMiddleware when possible

10 May 02:35
e69a55b
Compare
Choose a tag to compare

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: 4.97.0...4.97.1

4.97.0 - Provide AsyncFileStreaming API

07 May 23:57
cdbbd04
Compare
Choose a tag to compare

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: 4.96.0...4.97.0