Skip to content

[Serialization] Wire up the generic parameter of a protocol early. #7473

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
Feb 14, 2017

Conversation

DougGregor
Copy link
Member

When we deserialize a protocol declaration, we had a bunch of
intervening code before it would deserialize and wire up its generic
parameter (Self), including configuring the generic environment. If
any of that code referenced an AssociatedTypeDecl of that protocol,
the deserialization of the AssociatedTypeDecl could end up computing
an erroneous type.

This might be the source of the nondeterministic deserialization
failure that seems to afflict AssociatedTypeDecls in
rdar://problem/30382791.

When we deserialize a protocol declaration, we had a bunch of
intervening code before it would deserialize and wire up its generic
parameter (Self), including configuring the generic environment. If
any of that code referenced an AssociatedTypeDecl of that protocol,
the deserialization of the AssociatedTypeDecl could end up computing
an erroneous type.

This might be the source of the nondeterministic deserialization
failure that seems to afflict AssociatedTypeDecls in
rdar://problem/30382791.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@slavapestov
Copy link
Contributor

But why was it non-deterministic?

@DougGregor
Copy link
Member Author

... we still don't know the source of nondeterminism here.

@DougGregor DougGregor merged commit 2869ddc into swiftlang:master Feb 14, 2017
@DougGregor DougGregor deleted the early-protocol-self branch February 14, 2017 22:53
@jrose-apple
Copy link
Contributor

Looks like this didn't do it. :-( https://ci.swift.org/job/oss-swift_tools-RA_stdlib-RDA_long-test/1624

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