Skip to content

[6.2] Infer nonisolated conformances from witnesses #81344

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

Open
wants to merge 4 commits into
base: release/6.2
Choose a base branch
from

Conversation

DougGregor
Copy link
Member

  • Explanation: If all of the witnesses to a conformance are nonisolated, then infer that conformance as nonisolated rather than global-actor-isolated. This is only relevant when InferIsolatedConformances is enabled, and prevents that inference to help maintain source compatibility.
  • Scope: Limited to inference of isolation on conformances under the upcoming feature InferIsolatedConformance or when defaulting to the main actor.
  • Issues: rdar://150691429
  • Original PRs: [SE-0470] Prohibit inference of isolated conformances with nonisolated witnesses #81296
  • Risk: Low, due to narrow scope of the change.
  • Testing: CI.

DougGregor added 4 commits May 6, 2025 16:07
…d witnesses

If all of the witnesses to a conformance are nonisolated, then infer that
conformance as nonisolated rather than global-actor-isolated. This is
only relevant when InferIsolatedConformances is enabled, and prevents
that inference to help maintain source compatibility.
This request was looking through to the root conformance, which could
mess with the caching bits. Sink the "is nonisolated conformance" bit
down into ProtocolConformance, and have the request for a non-root
conformance be defined in terms of the request for the root
conformance.
This assertion will trigger whenever there is a cycle with a
split-cached request. Remove the assertion.
@DougGregor DougGregor requested a review from a team as a code owner May 6, 2025 23:10
@DougGregor
Copy link
Member Author

@swift-ci please test

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.

1 participant