Skip to content

RequirementMachine: Relax assertions in verifyRewriteSystem() [5.7] #59935

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

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jul 7, 2022

Fixes rdar://problem/94746399.

The strict assertions here are always true for non-simplified rules, but the old minimal conformances algorithm relied on them being true even for simplified rules, which was hard to guarantee. These invariants were established by extra logic in the completion procedure. Unfortunately, someone found a counter-example. Luckily, everything works in that specific example.

Note that we already did this once (#59557). This relaxes the verify assert further.

On the main branch I reworked the minimal conformances algorithm to not look at rewrite loops at all, in PR #59861 and #59900, and the weird logic in the completion procedure is now gone there.

However on 5.7 I'm keeping everything the same as before, just relaxing the assertion. If this causes any more problems we can cherry pick the rework of minimal conformances to 5.7, but I'd rather not do that at this point since it's a larger change.

@slavapestov slavapestov requested a review from a team as a code owner July 7, 2022 03:56
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov force-pushed the rqm-relax-assert-rdar9474639 branch from 1ce8383 to d334fe9 Compare July 7, 2022 04:27
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov merged commit fe0b00b into swiftlang:release/5.7 Jul 7, 2022
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7 labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants