Skip to content

[4.1] [GSB] Canonicalize conformance access paths on-the-fly. #13428

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

Conversation

DougGregor
Copy link
Member

  • Explanation: Eliminates a crash during IRGen when dealing with redundant associated type conformances in certain multi-file scenarios and with some declaration ordering.
  • Scope of Issue: Only affects cases where associated types are given redundant conformance requirements in a protocol, and only under certain perturbations of the source. Affected some versions of the Vapor project.
  • Risk: Low; it's a proper fix for a previously-broken code path.
  • Reviewed By: @slavapestov
  • Testing: Existing automated test suite, new tests, source compatibility suite
  • Directions for QA: N/A
  • SR / Radar: SR-6200 / rdar://problem/35113583

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

Ugh, gotta rebase

When forming a conformance access path, remove from consideration any
requirement sources that contain protocol requirements that aren't
found in the requirement signature. This ensure well-formedness of the
resulting conformance access path. Huge thanks to Slava for reducing
this one, and apologies to Arnold for having to track it down a second
time before I fixed it.

Fixes SR-6200 / rdar://problem/35113583.

(cherry picked from commit a77dec1)
If we used the requirement signature to create a protocol requirement
element in a requirement source, there's no need to verify that it's
from the requirement signature (duh).

(cherry picked from commit e10ecbd)
@DougGregor DougGregor force-pushed the canonicalize-conformance-access-path-4.1 branch from 08b8859 to 9b2c185 Compare December 14, 2017 07:04
@DougGregor
Copy link
Member Author

@swift-ci please test

2 similar comments
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please nominate

@ematejska ematejska merged commit 2752063 into swiftlang:swift-4.1-branch Dec 14, 2017
@DougGregor DougGregor deleted the canonicalize-conformance-access-path-4.1 branch December 14, 2017 18:22
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