Skip to content

Make SQLiteVersion struct sendable #1308

Open
@jozefizso

Description

@jozefizso

To add support for Swift 6 concurrency model in the SQLite.swift package, the SQLiteVersion struct must be made sendable.

The static variable SQLiteVersion.zero must be changed to a immutable let variable:

-    static var zero: SQLiteVersion = .init(major: 0, minor: 0)
+    static let zero: SQLiteVersion = .init(major: 0, minor: 0)

This will be a breaking change for clients who change the value of SQLiteVersion.zero.point as the point field is defined as public var:

public struct SQLiteVersion: Comparable, CustomStringConvertible {
    public let major: Int
    public let minor: Int
    public var point: Int = 0
}

I think it is not desired to change the value of the SQLiteVersion.zero and it can be safely changed to let.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions