Skip to content

4.84.1 - Add numerous missing `@preconcurrency` attributes

Compare
Choose a tag to compare
@penny-for-vapor penny-for-vapor released this 28 Sep 09:37
· 49 commits to main since this release
036d67e

What's Changed

Add numerous missing @preconcurrency attributes by @gwynne in #3074

It has become standard practice to add @Sendable to @escaping closures passed as method parameters to improve Concurrency correctness. However, when this is done for pre-existing public methods that are not async, the result is source incompatibility for some users, as mutable values captured by such closures will cause unexpected build errors. The correct way to suppress this behavior is to mark such methods with the @preconcurrency attribute, signaling to the compiler that users may not yet expect the additional restrictions of @Sendable to apply without sacrificing correctness for Concurrency-ready code. Unfortunately, Vapor recently added @Sendable annotations to many of its APIs without also adding the @preconcurrency annotation; this update addresses that oversight.

This patch was released by @gwynne

Full Changelog: 4.84.0...4.84.1