Skip to content

Revert "Merge pull request #28665 from CodaFi/the-phantom-menace" #29237

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
Jan 16, 2020

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Jan 15, 2020

In #28665, @CodaFi tied CodingKeys synthesis to a new attribute and annotated the two declarations that should trigger synthesis with that attribute. This means that a modified compiler would not perform CodingKeys synthesis when used with an unmodified standard library, breaking source compatibility. That kind of change is not necessarily forbidden, but it needs to be carefully considered and staged in when it does happen.

This PR reverts #28665 for now. We should either land the change in three steps—first add support for the attribute, then annotate the standard library protocols with it, then drop support for standard libraries without the annotation—or tie the behavior to these protocols in a way that does not require standard library modifications.

This reverts commit 43a3ab7, reversing changes made to 4f39d9c. The revert was not clean because we've added other attributes since #28665 landed, so I want to run full tests before we merge it.

Fixes rdar://problem/58576551.

…nace"

This reverts commit 43a3ab7, reversing
changes made to 4f39d9c.

# Conflicts:
#	include/swift/AST/Attr.def
#	lib/AST/Attr.cpp
#	lib/Serialization/Deserialization.cpp
#	lib/Serialization/ModuleFormat.h
#	lib/Serialization/Serialization.cpp
@beccadax beccadax requested a review from CodaFi January 15, 2020 23:42
@beccadax
Copy link
Contributor Author

@swift-ci please test

@@ -89,7 +98,7 @@ static ProtocolConformanceRef typeConformsToCodable(DeclContext *context,
/// \param varDecl The \c VarDecl to validate.
///
/// \param proto The \c ProtocolDecl to check conformance to.
static ProtocolConformanceRef
static CodableConformanceType
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll cherry-pick this cleanup back over. It's the only NFC part of this patch.

Copy link
Contributor

@CodaFi CodaFi left a comment

Choose a reason for hiding this comment

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

Thanks!

@beccadax beccadax merged commit 99e60b0 into swiftlang:master Jan 16, 2020
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