Skip to content
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

[Source compatibility suite] GRDB failing to build debug config - error: capture of 'witness' with non-sendable type 'Witness' in a '@Sendable' closure [#sendable-closure-captures] #79888

Open
justice-adams-apple opened this issue Mar 10, 2025 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. source compatibility suite Flag: An issue that surfaced in the source compatibility suite triage needed This issue needs more specific labels

Comments

@justice-adams-apple
Copy link
Contributor

Description

GRDB is failing to build the debug configuration on MacOs with the following error:

GRDB.swift/Tests/GRDBTests/DatabaseAfterNextTransactionCommitTests.swift:53:42: error: capture of 'witness' with non-sendable type 'Witness' in a '@Sendable' closure [#sendable-closure-captures]
 39 |     
 40 |     func assertTransaction_registerBefore(start startSQL: String, end endSQL: String, isNotifiedAs expectedCompletion: Database.TransactionCompletion) throws {
 41 |         class Witness { }
    |               `- note: class 'Witness' does not conform to the 'Sendable' protocol
 42 |         
 43 |         let dbQueue = try makeDatabaseQueue()
    :
 51 |                 db.afterNextTransaction { _ in
 52 |                     // use witness
 53 |                     withExtendedLifetime(witness, { })
    |                                          `- error: capture of 'witness' with non-sendable type 'Witness' in a '@Sendable' closure [#sendable-closure-captures]
 54 |                     commitCountMutex.increment()
 55 |                 }

Reproduction

swift build --disable-sandbox --package-path GRDB.swift --verbose --configuration debug --build-tests -Xswiftc -swift-version -Xswiftc 6 -Xswiftc -enable-testing

Expected behavior

Expected the project to build correctly

Environment

Apple Swift version 6.2-dev (LLVM de6bfa2f4bd7aac, Swift 80050bb)
Target: x86_64-apple-macosx10.15

Additional information

https://ci.swift.org/job/swift-main-source-compat-suite-debug/1052

@justice-adams-apple justice-adams-apple added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Mar 10, 2025
justice-adams-apple added a commit to swiftlang/swift-source-compat-suite that referenced this issue Mar 10, 2025
@compnerd compnerd added the source compatibility suite Flag: An issue that surfaced in the source compatibility suite label Mar 11, 2025
justice-adams-apple added a commit to swiftlang/swift-source-compat-suite that referenced this issue Mar 11, 2025
* update grpc xfail

* GRBD - swiftlang/swift#79888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. source compatibility suite Flag: An issue that surfaced in the source compatibility suite triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

2 participants