Skip to content

[6.2] Make InferIsolatedConformances and StrictMemorySafety migratable features #81744

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

@DougGregor DougGregor commented May 23, 2025

  • Explanation: Both InferIsolatedConformances and StrictMemorySafety have an automatable migration path. Make both into migratable features.
  • Scope: Limited to these two features, behind the migration flags.
  • Issues: rdar://151925275 & rdar://151925332
  • Original PRs: Make InferIsolatedConformances and StrictMemorySafety migratable features #81703
  • Risk: Low. Only enabled by new compilation flags, only create new warnings or re-use existing ones.
  • Testing: CI, here and for SwiftPM
  • Reviewers: @xedin

@DougGregor DougGregor requested a review from a team as a code owner May 23, 2025 15:18
@DougGregor
Copy link
Member Author

@swift-ci please test

xedin and others added 6 commits May 28, 2025 16:15
This is future-proofing the version part of the upcoming
feature. There currently no features that require that
but it's possible that they'd be added in the future.

(cherry picked from commit 4909b9b)
When migrating, provide warnings that add 'nonisolated' to nonisolated
conformances that don't already have it and would end up being inferred
to be isolated under the upcoming feature.

(cherry picked from commit a32782b)
This feature is essentially self-migrating, but fit it into the
migration flow by marking it as migratable, adding
`-strict-memory-safety:migrate`, and introducing a test.

(cherry picked from commit abad2fa)
The name of a migratable feature might differ from the names of the
diagnostic groups containing the diagnostics that are used to drive
migration for that feature. Provide the set of diagnostic categories
that are associated with each migratable feature as part of the
supported features list.

(cherry picked from commit 7f2649f)
(cherry picked from commit 32267f4)
@DougGregor DougGregor force-pushed the more-migratable-features-6.2 branch from bc76b04 to 589fd33 Compare May 28, 2025 23:15
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor enabled auto-merge May 28, 2025 23:16
Check for unsafe constructs in all modes, so that we can emit the
"unsafe does not cover any unsafe constructs" warning consistently.
One does not need to write "unsafe" outside of strict memory safety
mode, but if you do... it needs to cover unsafe behavior.

(cherry picked from commit 1b94c3b)
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 0ed5cff into swiftlang:release/6.2 May 30, 2025
5 checks passed
@DougGregor DougGregor deleted the more-migratable-features-6.2 branch May 30, 2025 17:02
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.

3 participants