Skip to content

Conversation

@DougGregor
Copy link
Member

A change to the way we determined whether a protocol conformance is "dependent" for marker protocols caused an ABI break for Sendable-refining protocols built with pre-6.0 Swift compilers. The fix for this issue (#75769) gated the change on deployment target.

The deployment target change fixed the original problem, then caused a related issue when a project mixes deployment targets (pre-6.0 and 6.0+) with non-resilient protocols. Rework the logic here to (1) look at the availability of the protocol rather than the deployment target, and (2) always use the more efficient (non-dependent) answer for non-resilient protocols.

Fixes rdar://134953989.

… targets

A change to the way we determined whether a protocol conformance is
"dependent" for marker protocols caused an ABI break for
Sendable-refining protocols built with pre-6.0 Swift compilers. The
fix for this issue (swiftlang#75769)
gated the change on deployment target.

The deployment target change fixed the original problem, then caused a
related issue when a project mixes deployment targets (pre-6.0 and
6.0+) with non-resilient protocols. Rework the logic here to (1) look at
the availability of the protocol rather than the deployment target, and
(2) always use the more efficient (non-dependent) answer for
non-resilient protocols.

Fixes rdar://134953989.
@DougGregor DougGregor marked this pull request as ready for review September 10, 2024 18:17
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

The change here to use availability is not strictly necessary, because it's acceptable for programs to be compiled with the dependent-conformance access pattern even if the protocol itself is non-dependent. It's also less optimal, because it prevents conformances tied to newer Swift runtimes (e.g., shipped in an OS with a 6.0 runtime) from being emitted as non-dependent. Closing this in favor of the narrower and more desirable change at #76380

@DougGregor DougGregor closed this Sep 10, 2024
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