Skip to content

Make SQLiteVersion struct sendable #1308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jozefizso opened this issue Mar 19, 2025 · 1 comment · May be fixed by #1312
Open

Make SQLiteVersion struct sendable #1308

jozefizso opened this issue Mar 19, 2025 · 1 comment · May be fixed by #1312

Comments

@jozefizso
Copy link

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.

@jozefizso
Copy link
Author

I can make the PR for this change.

jozefizso added a commit to jozefizso/SQLite.swift that referenced this issue Apr 2, 2025
@jozefizso jozefizso linked a pull request Apr 2, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant