Skip to content

[Serialization] Deal with ErrorTypes in specialized conformances #17523

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

jrose-apple
Copy link
Contributor

This can represent a conformance that can never actually be used, such as an inherited conditional conformance where the subclass has provided a concrete generic parameter. (See the test case.)

We probably shouldn't be forming these conformances at all, but for now this lets us build without errors. Alternate solution compared to #17406.

SR-7337 / rdar://problem/39142121

@jrose-apple jrose-apple requested review from slavapestov and huonw June 26, 2018 20:08
@jrose-apple
Copy link
Contributor Author

Note that this is going straight to the 4.2 branch, since we don't serialize Substitutions like this at all on master.

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. I had thought we'd addressed this issues well-enough to get through 4.2, but tolerating error types seems reasonable.

@jrose-apple
Copy link
Contributor Author

Oops, a bit of another change slipped in. Will fix. Source compatibility test here.

This can represent a conformance that can never actually be used, such
as an inherited conditional conformance where the subclass has
provided a concrete generic parameter. (See the test case.)

We probably shouldn't be forming these conformances at all, but for now
this lets us build without errors.

https://bugs.swift.org/browse/SR-7337
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 834da5fc0625017e8fb6567b8f268babaa18c8ba

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 834da5fc0625017e8fb6567b8f268babaa18c8ba

@jrose-apple
Copy link
Contributor Author

Hm, there was a failure building CoreStore that doesn't seem to be present normally. Need to look into this before merging.

@jrose-apple
Copy link
Contributor Author

Reproduced.

@jrose-apple
Copy link
Contributor Author

After a day's worth of investigation, it looks like the CoreStore problem wasn't due to this change. Let's try again.

@swift-ci Please test source compatibility

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

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.

3 participants