Skip to content

Swift 6 and Hummingbird Postgres #20

Closed
@thoven87

Description

@thoven87

I know Swift 6 isn't stable yet.

I noticed the following behavior with the latest version of Hummingbird Postgres

The following will produce warning and causes what looks like a memory leak:

WARNING message
Sending 'self'-isolated value of type '[PostgresMigrationGroup]' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode

    app.beforeServerStarts {
        try await postgresMigrations.apply(client: postgresClient, logger: logger, dryRun: false)
    }

Memory will grow until the server is restarted.

Disabling the Postgres migration, the application stays steady at 6mb until traffic starts following.

Swift version
swift-driver version: 1.112.3 Apple Swift version 6.0 (swiftlang-6.0.0.6.8 clang-1600.0.23.1) Target: arm64-apple-macosx15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions