Skip to content

[Serialization] Skip MissingMembers when allowing errors #37553

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
merged 1 commit into from
May 22, 2021

Conversation

bnbarham
Copy link
Contributor

A normal compilation would error before merging modules when there are
MissingMemberDecls, so the missing member case is unreachable. That's
not true when allowing errors though, where we continue regardless. Skip
the missing member instead of crashing.

Resolves rdar://76365694.

@bnbarham bnbarham requested a review from xymus May 21, 2021 01:39
@bnbarham
Copy link
Contributor Author

@swift-ci please test

A normal compilation would error before merging modules when there are
MissingMemberDecls, so the missing member case is unreachable. That's
not true when allowing errors though, where we continue regardless. Skip
the missing member instead of crashing.

Resolves rdar://76365694.
@bnbarham bnbarham force-pushed the write-members-crash branch from 7239d20 to 6b69867 Compare May 21, 2021 03:54
@bnbarham
Copy link
Contributor Author

Added a check for the frontend crashing without allow errors - we should never be serializing missing members in that case (it should fail before getting here).

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 6b69867

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 6b69867

@bnbarham
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 6b69867

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 6b69867

Copy link
Contributor

@xymus xymus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotta love a two line fix!

@ahoppen
Copy link
Member

ahoppen commented May 21, 2021

@swift-ci Please test

@bnbarham bnbarham merged commit 53c1e15 into swiftlang:main May 22, 2021
@bnbarham bnbarham deleted the write-members-crash branch May 22, 2021 01:10
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.

4 participants