Skip to content

[6.2] Allow '@unsafe' on import declarations to silence '@preconcurrency' warning #82444

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

Merged

Conversation

DougGregor
Copy link
Member

  • Explanation: '@preconcurrency' imports open up memory safety holes with respect to Sendable, which are diagnosed under strict memory safety + strict concurrency checking. Allow one to write '@unsafe' on those imports to silence the diagnostic about it.
  • Scope: Narrow. Only impacts a warning under strict memory safety + strict concurrency checking.
  • Issues: rdar://154147698
  • Original PRs: Allow '@unsafe' on import declarations to silence '@preconcurrency' warning #82443
  • Risk: Very low. Very narrow change that doesn't impact much Swift code at all.
  • Testing: CI, new test

…arning

'@preconcurrency' imports open up memory safety holes with respect to
Sendable, which are diagnosed under strict memory safety + strict
concurrency checking. Allow one to write '@unsafe' on those imports to
silence the diagnostic about it.
@DougGregor DougGregor requested a review from a team as a code owner June 24, 2025 02:14
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 11d3547 into swiftlang:release/6.2 Jun 24, 2025
5 checks passed
@DougGregor DougGregor deleted the preconcurrency-unsafe-silence-6.2 branch June 24, 2025 13:32
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 this pull request may close these issues.

2 participants