Breaking Changes
- Minimum Swift version is now 6.1 (
swift-tools-version:6.1);async-http-clientminimum is now1.34.0. - The per-call
eventLoopGroup:parameter on every request method (get,find,update, …) is now a deprecated no-op. It still compiles, but the value is ignored — theHTTPClientis fixed once at init. This reverses the per-callEventLoopGroupsupport expanded in 2.4.0.
Migration
- To run requests on a specific
EventLoopGroup(e.g. Vapor'sapp.eventLoopGroup), pass it once to the initializer instead of per call:
CouchDBClient(config: config, eventLoopGroup: app.eventLoopGroup) - If you don't need a custom group, drop the
eventLoopGroup:arguments — the client uses the long-livedHTTPClient.sharedby default.
Highlights
CouchDBClientnow uses a single long-livedHTTPClient, chosen once at init, instead of creating and tearing one down per request. This removes a new connection pool + TLS handshake on every call and restores connection keep-alive.- The client is selected as: a caller-provided
httpClient→ a client bound to a providedeventLoopGroup→HTTPClient.shared(default). shutdown()now performs an async shutdown instead of a blockingsyncShutdown()on the main thread, and is a no-op when using the shared client.
API and Behavior Improvements
- New optional
eventLoopGroupparameter oninit(source-compatible). - Compilation is warning-free; tests cover the new init-time
eventLoopGrouppath (46 tests).
Documentation
- Updated the Vapor tutorial to use the default client (no per-call
eventLoopGroup). - Fixed the DocC reference for
init(config:httpClient:eventLoopGroup:).
Full Changelog: 2.4.0...3.0.0