Skip to content

Drop @unchecked from SendingStorage's Sendable conformance - #701

Merged
sebsto merged 1 commit into
awslabs:mainfrom
d-date:remove-unchecked-sendable-sending-storage
Oct 30, 2026
Merged

sebsto merged 1 commit into
awslabs:mainfrom
d-date:remove-unchecked-sendable-sending-storage

Conversation

@d-date

@d-date d-date commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Issue #

N/A

Description of changes

SendingStorage is declared @unchecked Sendable, but its only stored property is let storage: Mutex<Value?>. Mutex is unconditionally Sendable (regardless of Value), so the compiler can verify this conformance on its own. Dropping @unchecked keeps the same semantics while letting the compiler catch any future change that would make the type non-Sendable (e.g. adding a mutable stored property).

Verified locally on macOS (Swift 6.4.2):

  • swift build -Xswiftc -strict-concurrency=complete produces no new diagnostics
  • swift test passes

New/existing dependencies impact assessment, if applicable

No new dependencies were added to this change.

Conventional Commits

refactor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The only stored property is a Mutex, which is unconditionally Sendable,
so the compiler can verify the conformance without @unchecked.
@sebsto sebsto self-assigned this Oct 30, 2026
@sebsto sebsto added the 🆕 semver/minor Adds new public API. label Oct 30, 2026
@sebsto
sebsto merged commit c985be2 into awslabs:main Oct 30, 2026
99 of 102 checks passed
@sebsto sebsto added 🔨 semver/patch No public API change. and removed 🆕 semver/minor Adds new public API. labels Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants