Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: vapor/vapor

4.117.0 - Fix warnings in 6.2

12 Sep 14:32
773ea6a

Choose a tag to compare

What's Changed

Fix warnings in 6.2 by @0xTim in #3361

Fixes the warnings from the 6.2 RC

This patch was released by @0xTim

Full Changelog: 4.116.0...4.117.0

4.116.0 - Allow initializing Vapor.Application with a Logger

09 Sep 13:03
636fbe6

Choose a tag to compare

What's Changed

Allow initializing Vapor.Application with a Logger by @czechboy0 in #3359

When using a single Logger in the whole app, it’s useful to be able to initialize the Vapor app with one as well, rather than letting it create one internally.

This doesn’t change behavior for existing users, just adds a new variant of the Vapor.Application.make method that takes a Logger explicitly.

Added unit tests to cover both the default and the new option.

This patch was released by @0xTim

Full Changelog: 4.115.1...4.116.0

4.115.1 - Add Sendable annotations to the OTP types

14 Jul 13:47
3636f44

Choose a tag to compare

What's Changed

Add Sendable annotations to the OTP types by @0xTim in #3345

Add some missing Sendable annontations to the OTP types so @preconcurrency import is not required when using the types across isolation boundaries

Reviewers

Thanks to the reviewers for their help:

This patch was released by @0xTim

Full Changelog: 4.115.0...4.115.1

4.115.0 - Improve `VaporTesting`'s `withApp` method

15 May 13:45
4014016

Choose a tag to compare

What's Changed

Improve VaporTesting's withApp method by @fpseverino in #3332

This PR makes the withApp helper method work as advertised, allowing an optional configuration method for the Application to be passed.

Also, marks it with @discardableResult to avoid unnecessary warnings.

This patch was released by @gwynne

Full Changelog: 4.114.1...4.115.0

4.114.1 - Correct SessionData's Codable conformance

28 Mar 09:26
87b0edd

Choose a tag to compare

What's Changed

Correct SessionData's Codable conformance by @gwynne in #3317

The SessionData type (which is nothing but a very thin wrapper over a [String: String] dictionary anyway) had a Codable implementation that was technically incorrect. This corrects it. There should not be any effect whatsoever on behavior unless someone is using a very esoteric Encoder or Decoder to encode or decode it, but it’s still more correct this way.

Also took the opportunity to do a little code formatting cleanup and to replace the silly use of .reduce() in the ExpressibleByDictionaryLiteral initializer with use of the applicable (and somewhat faster) Dictionary initializer.

Reviewers

Thanks to the reviewers for their help:

This patch was released by @gwynne

Full Changelog: 4.114.0...4.114.1

4.114.0 - Added a cache policy for file middleware

18 Mar 16:35
f6459d6

Choose a tag to compare

What's Changed

Added a cache policy for file middleware by @dimitribouniol in #3314

Currently, if a vapor app uses FileMiddleware to deliver static resources, it would have no control over the cache policy used by the browser for those files. This adds a configurable cache policy interface with reasonable defaults to better control when and how often a browser re-requests files (for instance, disabling caches during development).

This patch was released by @0xTim

Full Changelog: 4.113.2...4.114.0

4.113.2 - Fix warning in service fix

12 Feb 12:14
a425e32

Choose a tag to compare

What's Changed

Fix warning in service fix by @0xTim in #3303

This patch was released by @0xTim

Full Changelog: 4.113.1...4.113.2

4.113.1 - Prevent stack overflow by using `NIOLock` instead of `NIOLockedValueBox` during service initialization

11 Feb 17:04
4f2dcf7

Choose a tag to compare

What's Changed

Prevent stack overflow by using NIOLock instead of NIOLockedValueBox during service initialization by @MrMage in #3302

At first glance, one could think that using a NIOLockedValueBox<(@Sendable (Application) -> ServiceType)?> for makeService would be sufficient here. However, for some reason, calling self.storage.makeService.withLockedValue({ $0 }) repeatedly in Service.service causes each subsequent call to the function stored inside the locked value to perform one (or several) more “trampoline” function calls, slowing down the execution and eventually leading to a stack overflow. This is why we use a NIOLock here instead; it seems to avoid the { $0 } issue above despite still accessing _makeService from within a closure ({ self._makeService }).

  • Replace NIOLockedValueBox with NIOLock to avoid adding trampoline function calls
  • Add detailed comment explaining the rationale behind the locking mechanism change
  • Simplify service initialization with direct fatalError instead of optional handling
  • Remove redundant nil checks in service getter
This patch was released by @0xTim

Full Changelog: 4.113.0...4.113.1

4.113.0 - Fix warnings from NIO 2.79.0

10 Feb 23:58
91efabd

Choose a tag to compare

What's Changed

Fix warnings from NIO 2.79.0 by @0xTim in #3285

Fixes a number of Sendable warnings introduced by https://github.com/apple/swift-nio/releases/tag/2.79.0

This also deprecates the main Application.init() API that was blocking on an event loop that has been marked as noasync for a while. Vapor users should migrate to the async APIs.

This patch was released by @0xTim

Full Changelog: 4.112.2...4.113.0

4.112.2 - Android support

10 Feb 23:45
fc2d0c6

Choose a tag to compare

What's Changed

Android support by @marcprux in #3282

This PR adds experimental support for building and testing on Android. It simply involves adding some conditional imports.

Building is contingent on apple/swift-distributed-tracing#163, apple/swift-http-structured-headers#57, swift-server/async-http-client#799, and apple/swift-nio-extras#244, but if you use local snapshots of those packages, you can build with the Android SDK using:

~/Library/Developer/Toolchains/swift-6.0.3-RELEASE.xctoolchain/usr/bin/swift build --swift-sdk aarch64-unknown-linux-android24 --build-tests
This patch was released by @0xTim

Full Changelog: 4.112.1...4.112.2