From afdf500a23cc7eabcb759044f5524514e91a99dc Mon Sep 17 00:00:00 2001 From: Andreas Bauer Date: Tue, 16 Jul 2024 09:13:41 +0200 Subject: [PATCH] Properly mark ModuleOwnership as Sendable (#109) # Properly mark ModuleOwnership as Sendable ## :recycle: Current situation & Problem This PR adds a missing and forgotten Sendable conformance. ## :gear: Release Notes * Sendable and Hashable conformance for ModuleOwnership. ## :books: Documentation - ## :white_check_mark: Testing - ## :pencil: Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md). --- Package.swift | 2 +- Sources/Spezi/Module/ModuleOwnership.swift | 3 +++ .../StandardTests/StandardUnfulfilledConstraintTests.swift | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index f35423f9..addb895e 100644 --- a/Package.swift +++ b/Package.swift @@ -34,7 +34,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/StanfordSpezi/SpeziFoundation", from: "1.0.2"), - .package(url: "https://github.com/StanfordBDHG/XCTRuntimeAssertions", from: "1.0.1"), + .package(url: "https://github.com/StanfordBDHG/XCTRuntimeAssertions", from: "1.1.1"), .package(url: "https://github.com/apple/swift-collections.git", from: "1.1.1") ] + swiftLintPackage(), targets: [ diff --git a/Sources/Spezi/Module/ModuleOwnership.swift b/Sources/Spezi/Module/ModuleOwnership.swift index 667fe601..3b92a5a8 100644 --- a/Sources/Spezi/Module/ModuleOwnership.swift +++ b/Sources/Spezi/Module/ModuleOwnership.swift @@ -21,3 +21,6 @@ public enum ModuleOwnership { /// The module is managed and strongly referenced by Spezi. case spezi } + + +extension ModuleOwnership: Sendable, Hashable {} diff --git a/Tests/SpeziTests/StandardTests/StandardUnfulfilledConstraintTests.swift b/Tests/SpeziTests/StandardTests/StandardUnfulfilledConstraintTests.swift index 0684dd80..cd2d3613 100644 --- a/Tests/SpeziTests/StandardTests/StandardUnfulfilledConstraintTests.swift +++ b/Tests/SpeziTests/StandardTests/StandardUnfulfilledConstraintTests.swift @@ -37,7 +37,7 @@ final class StandardUnfulfilledConstraintTests: XCTestCase { } } - + @MainActor func testStandardUnfulfilledConstraint() throws { let standardCUTestApplicationDelegate = StandardUCTestApplicationDelegate()