Skip to content

Conversation

@xymus
Copy link
Contributor

@xymus xymus commented Jul 11, 2025

Always give up early when attempting to deserialize a protocol conformance broken by a context change. Don't attempt to replace missing members of the conformance signature with invalid one, just mark the whole protocol conformance as invalid.

The previous recovery logic, applied only for SourceKit mode and LLDB, was inserting invalid conformances in the signature instead of dropping the whole protocol conformance. It lead to failures later in the same finishNormalConformance function when matching conformances to requirements.

Alternatively we could improve the matching logic, but for now I prefer to align the behavior across the different modes of the compiler. It makes it generally more reliable and testable, at the cost of potentially some information missing in the IDE functionalities when errors are present.

rdar://98925842

Follow-up to #79851

Always give up early when attempting to deserialize a protocol
conformance broken by a context change. Don't attempt to replace missing
members of the conformance signature with invalid one, just mark the
whole protocol conformance as invalid.

The previous recovery logic, only for SourceKit mode and LLDB, was
inserting invalid conformances in the signature instead of dropping the
whole protocol conformance. It lead to failures later in the same
`finishNormalConformance` when accessing the invalid conformances.

rdar://98925842
@xymus xymus requested a review from bnbarham July 11, 2025 17:26
@xymus
Copy link
Contributor Author

xymus commented Jul 11, 2025

@swift-ci Please smoke test

@xymus
Copy link
Contributor Author

xymus commented Jul 11, 2025

@swift-ci Please smoke test macOS

@xymus
Copy link
Contributor Author

xymus commented Jul 14, 2025

@swift-ci Please smoke test Windows

@xymus xymus merged commit e3ab9a0 into swiftlang:main Jul 14, 2025
3 checks passed
@xymus xymus deleted the deser-objc-conformance branch July 14, 2025 22:55
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